use https:// rather than http://
This commit is contained in:
parent
6fa5b19d9f
commit
2936a60950
@ -5,7 +5,7 @@ describe AbstractDownloadStrategy do
|
||||
|
||||
let(:specs) { {} }
|
||||
let(:name) { "foo" }
|
||||
let(:url) { "http://example.com/foo.tar.gz" }
|
||||
let(:url) { "https://example.com/foo.tar.gz" }
|
||||
let(:version) { nil }
|
||||
let(:args) { %w[foo bar baz] }
|
||||
|
||||
@ -34,7 +34,7 @@ describe AbstractDownloadStrategy do
|
||||
end
|
||||
|
||||
describe VCSDownloadStrategy do
|
||||
let(:url) { "http://example.com/bar" }
|
||||
let(:url) { "https://example.com/bar" }
|
||||
let(:version) { nil }
|
||||
|
||||
describe "#cached_location" do
|
||||
@ -204,14 +204,14 @@ describe S3DownloadStrategy do
|
||||
subject { described_class.new(url, name, version) }
|
||||
|
||||
let(:name) { "foo" }
|
||||
let(:url) { "http://bucket.s3.amazonaws.com/foo.tar.gz" }
|
||||
let(:url) { "https://bucket.s3.amazonaws.com/foo.tar.gz" }
|
||||
let(:version) { nil }
|
||||
|
||||
describe "#_fetch" do
|
||||
subject { described_class.new(url, name, version)._fetch }
|
||||
|
||||
context "when given Bad S3 URL" do
|
||||
let(:url) { "http://example.com/foo.tar.gz" }
|
||||
let(:url) { "https://example.com/foo.tar.gz" }
|
||||
|
||||
it "raises Bad S3 URL error" do
|
||||
expect {
|
||||
@ -226,7 +226,7 @@ describe CurlDownloadStrategy do
|
||||
subject { described_class.new(url, name, version, **specs) }
|
||||
|
||||
let(:name) { "foo" }
|
||||
let(:url) { "http://example.com/foo.tar.gz" }
|
||||
let(:url) { "https://example.com/foo.tar.gz" }
|
||||
let(:version) { "1.2.3" }
|
||||
let(:specs) { { user: "download:123456" } }
|
||||
|
||||
@ -242,7 +242,7 @@ describe CurlDownloadStrategy do
|
||||
end
|
||||
|
||||
context "when URL file is in middle" do
|
||||
let(:url) { "http://example.com/foo.tar.gz/from/this/mirror" }
|
||||
let(:url) { "https://example.com/foo.tar.gz/from/this/mirror" }
|
||||
|
||||
it { is_expected.to eq(HOMEBREW_CACHE/"foo--1.2.3.tar.gz") }
|
||||
end
|
||||
@ -312,11 +312,11 @@ describe CurlDownloadStrategy do
|
||||
end
|
||||
|
||||
context "with referer set" do
|
||||
let(:specs) { { referer: "http://somehost/also" } }
|
||||
let(:specs) { { referer: "https://somehost/also" } }
|
||||
|
||||
it "adds the appropriate curl args" do
|
||||
expect(subject).to receive(:system_command!) { |*, args:, **|
|
||||
expect(args.each_cons(2)).to include(["-e", "http://somehost/also"])
|
||||
expect(args.each_cons(2)).to include(["-e", "https://somehost/also"])
|
||||
}
|
||||
|
||||
subject.fetch
|
||||
@ -326,22 +326,22 @@ describe CurlDownloadStrategy do
|
||||
|
||||
describe "#cached_location" do
|
||||
context "with a file name trailing the URL path" do
|
||||
let(:url) { "http://example.com/cask.dmg" }
|
||||
let(:url) { "https://example.com/cask.dmg" }
|
||||
its("cached_location.extname") { is_expected.to eq(".dmg") }
|
||||
end
|
||||
|
||||
context "with no discernible file name in it" do
|
||||
let(:url) { "http://example.com/download" }
|
||||
let(:url) { "https://example.com/download" }
|
||||
its("cached_location.basename.to_path") { is_expected.to eq("foo--1.2.3") }
|
||||
end
|
||||
|
||||
context "with a file name trailing the first query parameter" do
|
||||
let(:url) { "http://example.com/download?file=cask.zip&a=1" }
|
||||
let(:url) { "https://example.com/download?file=cask.zip&a=1" }
|
||||
its("cached_location.extname") { is_expected.to eq(".zip") }
|
||||
end
|
||||
|
||||
context "with a file name trailing the second query parameter" do
|
||||
let(:url) { "http://example.com/dl?a=1&file=cask.zip&b=2" }
|
||||
let(:url) { "https://example.com/dl?a=1&file=cask.zip&b=2" }
|
||||
its("cached_location.extname") { is_expected.to eq(".zip") }
|
||||
end
|
||||
|
||||
@ -374,7 +374,7 @@ describe CurlPostDownloadStrategy do
|
||||
subject { described_class.new(url, name, version, **specs) }
|
||||
|
||||
let(:name) { "foo" }
|
||||
let(:url) { "http://example.com/foo.tar.gz" }
|
||||
let(:url) { "https://example.com/foo.tar.gz" }
|
||||
let(:version) { "1.2.3" }
|
||||
let(:specs) { {} }
|
||||
|
||||
@ -426,7 +426,7 @@ describe ScpDownloadStrategy do
|
||||
|
||||
describe "#initialize" do
|
||||
invalid_urls = %w[
|
||||
http://example.com/foo.tar.gz
|
||||
https://example.com/foo.tar.gz
|
||||
scp://@example.com/foo.tar.gz
|
||||
scp://example.com:/foo.tar.gz
|
||||
scp://example.com
|
||||
@ -502,7 +502,7 @@ describe SubversionDownloadStrategy do
|
||||
subject { described_class.new(url, name, version, **specs) }
|
||||
|
||||
let(:name) { "foo" }
|
||||
let(:url) { "http://example.com/foo.tar.gz" }
|
||||
let(:url) { "https://example.com/foo.tar.gz" }
|
||||
let(:version) { "1.2.3" }
|
||||
let(:specs) { {} }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user