Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
deps.rs is now available for self-hosted Gitea at
/repo/gitea/<DOMAIN>/owner/repo
, e. g./repo/gitea/git.example.org/deps-rs/deps.rs
,/repo/gitea/git.example.org:1234/deps-rs/deps.rs
,/repo/gitea/http://unsafe-gitea.org/deps-rs/deps.rs
.This should also include support for Gitea hosted in subdirectories,
e. g.
www.example.org/gitea
, though I haven't tested this yet.If no protocol (
https://
/http://
) is specified,https://
isautomatically added to the beginning of the gitea server's URL.
However I could also change this to only accept https. Another
option might be the use of URL-encoding.
I am open for feedback, feel free to suggest changes.
Implementation notes:
The Router now matches
/repo/*site/:qual/:name
instead of/repo/:site/:qual/:name
to allow for an arbitrary number of/
s before qual and name.RepoSite
now has a new variantGitea(GiteaDomain)
.RepoSite
no longer implementsCopy
. However this should notbe problematic because
Copy
ing was only used forto_base_uri
,to_usercontent_base_uri
andto_usercontent_repo_suffix
whichnow accept
&self
references.RepoSite
:to_base_uri
andto_usercontent_base_uri
now return&str
instead of&'static str
.RepoSite
no longer implementsAsRef
and now usesDisplay
instead.
updated test
correct_raw_url_generation
updated readme
Related to #84, #141