add ssh://git scheme for git download strategy
This commit is contained in:
parent
8810b7f041
commit
5680ffe2e6
@ -1468,7 +1468,8 @@ class DownloadStrategyDetector
|
|||||||
GitHubGitDownloadStrategy
|
GitHubGitDownloadStrategy
|
||||||
when %r{^https?://.+\.git$},
|
when %r{^https?://.+\.git$},
|
||||||
%r{^git://},
|
%r{^git://},
|
||||||
%r{^https?://git\.sr\.ht/[^/]+/[^/]+$}
|
%r{^https?://git\.sr\.ht/[^/]+/[^/]+$},
|
||||||
|
%r{^ssh://git}
|
||||||
GitDownloadStrategy
|
GitDownloadStrategy
|
||||||
when %r{^https?://www\.apache\.org/dyn/closer\.cgi},
|
when %r{^https?://www\.apache\.org/dyn/closer\.cgi},
|
||||||
%r{^https?://www\.apache\.org/dyn/closer\.lua}
|
%r{^https?://www\.apache\.org/dyn/closer\.lua}
|
||||||
|
|||||||
@ -15,6 +15,12 @@ RSpec.describe DownloadStrategyDetector do
|
|||||||
it { is_expected.to eq(GitDownloadStrategy) }
|
it { is_expected.to eq(GitDownloadStrategy) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when given SSH Git URL" do
|
||||||
|
let(:url) { "ssh://git@example.com/foo.git" }
|
||||||
|
|
||||||
|
it { is_expected.to eq(GitDownloadStrategy) }
|
||||||
|
end
|
||||||
|
|
||||||
context "when given a GitHub Git URL" do
|
context "when given a GitHub Git URL" do
|
||||||
let(:url) { "https://github.com/homebrew/brew.git" }
|
let(:url) { "https://github.com/homebrew/brew.git" }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user