fix more insecure protocols

This commit is contained in:
Reto Kromer 2018-08-06 16:50:42 +02:00
parent d630f0885b
commit 456571b15d
12 changed files with 61 additions and 61 deletions

View File

@ -31,7 +31,7 @@ describe Hbc::Artifact::App, :cask do
let(:cask) { let(:cask) {
Hbc::Cask.new("subdir") do Hbc::Cask.new("subdir") do
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "http://example.com/local-caffeine" homepage "https://example.com/local-caffeine"
version "1.2.3" version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
app "subdir/Caffeine.app", target: "AnotherName.app" app "subdir/Caffeine.app", target: "AnotherName.app"

View File

@ -26,7 +26,7 @@ describe Hbc::Artifact::App, :cask do
let(:cask) { let(:cask) {
Hbc::Cask.new("subdir") do Hbc::Cask.new("subdir") do
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip" url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "http://example.com/local-caffeine" homepage "https://example.com/local-caffeine"
version "1.2.3" version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
app "subdir/Caffeine.app" app "subdir/Caffeine.app"

View File

@ -12,8 +12,8 @@ describe Hbc::CLI::Cat, :cask do
version '1.2.3' version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
url 'http://example.com/TestCask.dmg' url 'https://example.com/TestCask.dmg'
homepage 'http://example.com/' homepage 'https://example.com/'
app 'TestCask.app' app 'TestCask.app'
end end

View File

@ -8,13 +8,13 @@ describe Hbc::CLI::Home, :cask do
it_behaves_like "a command that handles invalid options" it_behaves_like "a command that handles invalid options"
it "opens the homepage for the specified Cask" do it "opens the homepage for the specified Cask" do
expect(described_class).to receive(:open_url).with("http://example.com/local-caffeine") expect(described_class).to receive(:open_url).with("https://example.com/local-caffeine")
described_class.run("local-caffeine") described_class.run("local-caffeine")
end end
it "works for multiple Casks" do it "works for multiple Casks" do
expect(described_class).to receive(:open_url).with("http://example.com/local-caffeine") expect(described_class).to receive(:open_url).with("https://example.com/local-caffeine")
expect(described_class).to receive(:open_url).with("http://example.com/local-transmission") expect(described_class).to receive(:open_url).with("https://example.com/local-transmission")
described_class.run("local-caffeine", "local-transmission") described_class.run("local-caffeine", "local-transmission")
end end

View File

@ -10,7 +10,7 @@ describe Hbc::CLI::Info, :cask do
described_class.run("local-caffeine") described_class.run("local-caffeine")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
local-caffeine: 1.2.3 local-caffeine: 1.2.3
http://example.com/local-caffeine https://example.com/local-caffeine
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
==> Name ==> Name
@ -25,7 +25,7 @@ describe Hbc::CLI::Info, :cask do
described_class.run("with-auto-updates") described_class.run("with-auto-updates")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-auto-updates: 1.0 (auto_updates) with-auto-updates: 1.0 (auto_updates)
http://example.com/autoupdates https://example.com/autoupdates
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-auto-updates.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-auto-updates.rb
==> Name ==> Name
@ -39,7 +39,7 @@ describe Hbc::CLI::Info, :cask do
let(:expected_output) { let(:expected_output) {
<<~EOS <<~EOS
local-caffeine: 1.2.3 local-caffeine: 1.2.3
http://example.com/local-caffeine https://example.com/local-caffeine
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
==> Name ==> Name
@ -47,7 +47,7 @@ describe Hbc::CLI::Info, :cask do
==> Artifacts ==> Artifacts
Caffeine.app (App) Caffeine.app (App)
local-transmission: 2.61 local-transmission: 2.61
http://example.com/local-transmission https://example.com/local-transmission
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb
==> Name ==> Name
@ -69,7 +69,7 @@ describe Hbc::CLI::Info, :cask do
described_class.run("with-caveats") described_class.run("with-caveats")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-caveats: 1.2.3 with-caveats: 1.2.3
http://example.com/local-caffeine https://example.com/local-caffeine
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb
==> Name ==> Name
@ -95,7 +95,7 @@ describe Hbc::CLI::Info, :cask do
described_class.run("with-conditional-caveats") described_class.run("with-conditional-caveats")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-conditional-caveats: 1.2.3 with-conditional-caveats: 1.2.3
http://example.com/local-caffeine https://example.com/local-caffeine
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb
==> Name ==> Name
@ -110,7 +110,7 @@ describe Hbc::CLI::Info, :cask do
described_class.run("with-languages") described_class.run("with-languages")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
with-languages: 1.2.3 with-languages: 1.2.3
http://example.com/local-caffeine https://example.com/local-caffeine
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb
==> Name ==> Name
@ -127,7 +127,7 @@ describe Hbc::CLI::Info, :cask do
described_class.run("without-languages") described_class.run("without-languages")
}.to output(<<~EOS).to_stdout }.to output(<<~EOS).to_stdout
without-languages: 1.2.3 without-languages: 1.2.3
http://example.com/local-caffeine https://example.com/local-caffeine
Not installed Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb
==> Name ==> Name

View File

@ -3,7 +3,7 @@ describe Hbc::CLI::InternalStanza, :cask do
command = described_class.new("gpg", "with-gpg") command = described_class.new("gpg", "with-gpg")
expect { expect {
command.run command.run
}.to output("http://example.com/gpg-signature.asc\n").to_stdout }.to output("https://example.com/gpg-signature.asc\n").to_stdout
end end
it "raises an exception when stanza is unknown/unsupported" do it "raises an exception when stanza is unknown/unsupported" do

View File

@ -1,5 +1,5 @@
describe "download strategies", :cask do describe "download strategies", :cask do
let(:url) { "http://example.com/cask.dmg" } let(:url) { "https://example.com/cask.dmg" }
let(:url_options) { {} } let(:url_options) { {} }
let(:cask) { let(:cask) {
instance_double(Hbc::Cask, token: "some-cask", instance_double(Hbc::Cask, token: "some-cask",
@ -16,7 +16,7 @@ describe "download strategies", :cask do
it "properly assigns a name and uri based on the Cask" do it "properly assigns a name and uri based on the Cask" do
expect(downloader.name).to eq("some-cask") expect(downloader.name).to eq("some-cask")
expect(downloader.url).to eq("http://example.com/cask.dmg") expect(downloader.url).to eq("https://example.com/cask.dmg")
expect(downloader.version.to_s).to eq("1.2.3.4") expect(downloader.version.to_s).to eq("1.2.3.4")
end end
@ -82,7 +82,7 @@ describe "download strategies", :cask do
end end
context "with referer set" do context "with referer set" do
let(:url_options) { { referer: "http://somehost/also" } } let(:url_options) { { referer: "https://somehost/also" } }
it "adds curl args for referer" do it "adds curl args for referer" do
curl_args = [] curl_args = []
@ -90,7 +90,7 @@ describe "download strategies", :cask do
downloader.fetch downloader.fetch
expect(curl_args.each_cons(2)).to include(["-e", "http://somehost/also"]) expect(curl_args.each_cons(2)).to include(["-e", "https://somehost/also"])
end end
end end
@ -103,7 +103,7 @@ describe "download strategies", :cask do
end end
context "with no discernible file name in it" do context "with no discernible file name in it" do
let(:url) { "http://example.com/download" } let(:url) { "https://example.com/download" }
describe "#tarball_path" do describe "#tarball_path" do
subject { downloader.tarball_path } subject { downloader.tarball_path }
@ -113,7 +113,7 @@ describe "download strategies", :cask do
end end
context "with a file name trailing the first query parameter" do 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" }
describe "#tarball_path" do describe "#tarball_path" do
subject { downloader.tarball_path } subject { downloader.tarball_path }
@ -123,7 +123,7 @@ describe "download strategies", :cask do
end end
context "with a file name trailing the second query parameter" do 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" }
describe "#tarball_path" do describe "#tarball_path" do
subject { downloader.tarball_path } subject { downloader.tarball_path }

View File

@ -3,13 +3,13 @@ require "cmd/cask"
describe Hbc::DSL::Appcast do describe Hbc::DSL::Appcast do
subject { described_class.new(url, params) } subject { described_class.new(url, params) }
let(:url) { "http://example.com" } let(:url) { "https://example.com" }
let(:uri) { URI(url) } let(:uri) { URI(url) }
let(:params) { {} } let(:params) { {} }
describe "#to_s" do describe "#to_s" do
it "returns the parsed URI string" do it "returns the parsed URI string" do
expect(subject.to_s).to eq("http://example.com") expect(subject.to_s).to eq("https://example.com")
end end
end end

View File

@ -4,8 +4,8 @@ describe Hbc::DSL, :cask do
context "stanzas" do context "stanzas" do
it "lets you set url, homepage, and version" do it "lets you set url, homepage, and version" do
expect(cask.url.to_s).to eq("http://example.com/TestCask.dmg") expect(cask.url.to_s).to eq("https://example.com/TestCask.dmg")
expect(cask.homepage).to eq("http://example.com/") expect(cask.homepage).to eq("https://example.com/")
expect(cask.version.to_s).to eq("1.2.3") expect(cask.version.to_s).to eq("1.2.3")
end end
end end
@ -65,8 +65,8 @@ describe Hbc::DSL, :cask do
it "does not require a DSL version in the header" do it "does not require a DSL version in the header" do
expect(cask.token).to eq("no-dsl-version") expect(cask.token).to eq("no-dsl-version")
expect(cask.url.to_s).to eq("http://example.com/TestCask.dmg") expect(cask.url.to_s).to eq("https://example.com/TestCask.dmg")
expect(cask.homepage).to eq("http://example.com/") expect(cask.homepage).to eq("https://example.com/")
expect(cask.version.to_s).to eq("1.2.3") expect(cask.version.to_s).to eq("1.2.3")
end end
end end

View File

@ -31,7 +31,7 @@ module Homebrew
specify "simple valid Formula" do specify "simple valid Formula" do
ft = formula_text "valid", <<~RUBY ft = formula_text "valid", <<~RUBY
url "http://www.example.com/valid-1.0.tar.gz" url "https://www.example.com/valid-1.0.tar.gz"
RUBY RUBY
expect(ft).not_to have_data expect(ft).not_to have_data
@ -80,7 +80,7 @@ module Homebrew
it "is empty by default" do it "is empty by default" do
fa = formula_auditor "foo", <<~RUBY fa = formula_auditor "foo", <<~RUBY
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
end end
RUBY RUBY
@ -94,7 +94,7 @@ module Homebrew
fa = formula_auditor "foo", <<~RUBY fa = formula_auditor "foo", <<~RUBY
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
end end
RUBY RUBY
@ -109,7 +109,7 @@ module Homebrew
specify "DATA but no __END__" do specify "DATA but no __END__" do
fa = formula_auditor "foo", <<~RUBY fa = formula_auditor "foo", <<~RUBY
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
patch :DATA patch :DATA
end end
RUBY RUBY
@ -121,7 +121,7 @@ module Homebrew
specify "__END__ but no DATA" do specify "__END__ but no DATA" do
fa = formula_auditor "foo", <<~RUBY fa = formula_auditor "foo", <<~RUBY
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
end end
__END__ __END__
a patch goes here a patch goes here
@ -141,8 +141,8 @@ module Homebrew
specify "no issue" do specify "no issue" do
fa = formula_auditor "foo", <<~RUBY fa = formula_auditor "foo", <<~RUBY
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
homepage "http://example.com" homepage "https://example.com"
end end
RUBY RUBY
@ -155,7 +155,7 @@ module Homebrew
specify "pkgshare" do specify "pkgshare" do
fa = formula_auditor "foo", <<~RUBY, strict: true fa = formula_auditor "foo", <<~RUBY, strict: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
end end
RUBY RUBY
@ -188,7 +188,7 @@ module Homebrew
fa = formula_auditor "foolibc++", <<~RUBY, strict: true fa = formula_auditor "foolibc++", <<~RUBY, strict: true
class Foolibcxx < Formula class Foolibcxx < Formula
desc "foolibc++ is a test" desc "foolibc++ is a test"
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
end end
RUBY RUBY
@ -209,7 +209,7 @@ module Homebrew
fa = formula_auditor "foo", <<~RUBY, strict: true, online: true fa = formula_auditor "foo", <<~RUBY, strict: true, online: true
class Foo < Formula class Foo < Formula
homepage "https://github.com/example/example" homepage "https://github.com/example/example"
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
end end
RUBY RUBY
@ -226,8 +226,8 @@ module Homebrew
let(:fa) do let(:fa) do
formula_auditor "foo", <<~RUBY, new_formula: true formula_auditor "foo", <<~RUBY, new_formula: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
homepage "http://example.com" homepage "https://example.com"
depends_on "openssl" depends_on "openssl"
end end
@ -236,8 +236,8 @@ module Homebrew
let(:f_openssl) do let(:f_openssl) do
formula do formula do
url "http://example.com/openssl-1.0.tgz" url "https://example.com/openssl-1.0.tgz"
homepage "http://example.com" homepage "https://example.com"
keg_only :provided_by_macos keg_only :provided_by_macos
end end
@ -258,8 +258,8 @@ module Homebrew
let(:fa) do let(:fa) do
formula_auditor "foo", <<~RUBY, new_formula: true formula_auditor "foo", <<~RUBY, new_formula: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
homepage "http://example.com" homepage "https://example.com"
depends_on "bc" depends_on "bc"
end end
@ -268,8 +268,8 @@ module Homebrew
let(:f_bc) do let(:f_bc) do
formula do formula do
url "http://example.com/bc-1.0.tgz" url "https://example.com/bc-1.0.tgz"
homepage "http://example.com" homepage "https://example.com"
keg_only :provided_by_macos keg_only :provided_by_macos
end end
@ -290,7 +290,7 @@ module Homebrew
specify "keg_only_needs_downcasing" do specify "keg_only_needs_downcasing" do
fa = formula_auditor "foo", <<~RUBY, strict: true fa = formula_auditor "foo", <<~RUBY, strict: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
keg_only "Because why not" keg_only "Because why not"
end end
@ -304,7 +304,7 @@ module Homebrew
specify "keg_only_redundant_period" do specify "keg_only_redundant_period" do
fa = formula_auditor "foo", <<~RUBY, strict: true fa = formula_auditor "foo", <<~RUBY, strict: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
keg_only "because this line ends in a period." keg_only "because this line ends in a period."
end end
@ -318,7 +318,7 @@ module Homebrew
specify "keg_only_handles_block_correctly" do specify "keg_only_handles_block_correctly" do
fa = formula_auditor "foo", <<~RUBY, strict: true fa = formula_auditor "foo", <<~RUBY, strict: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
keg_only <<~EOF keg_only <<~EOF
this line starts with a lowercase word. this line starts with a lowercase word.
@ -337,7 +337,7 @@ module Homebrew
specify "keg_only_handles_whitelist_correctly" do specify "keg_only_handles_whitelist_correctly" do
fa = formula_auditor "foo", <<~RUBY, strict: true fa = formula_auditor "foo", <<~RUBY, strict: true
class Foo < Formula class Foo < Formula
url "http://example.com/foo-1.0.tgz" url "https://example.com/foo-1.0.tgz"
keg_only "Apple ships foo in the CLT package" keg_only "Apple ships foo in the CLT package"
end end

View File

@ -12,19 +12,19 @@ describe DependencyCollector do
context "when xz, unzip, and bzip2 are not available" do context "when xz, unzip, and bzip2 are not available" do
it "creates a resource dependency from a '.xz' URL" do it "creates a resource dependency from a '.xz' URL" do
resource.url("http://example.com/foo.xz") resource.url("https://example.com/foo.xz")
allow_any_instance_of(Object).to receive(:which).with("xz") allow_any_instance_of(Object).to receive(:which).with("xz")
expect(subject.add(resource)).to eq(Dependency.new("xz", [:build])) expect(subject.add(resource)).to eq(Dependency.new("xz", [:build]))
end end
it "creates a resource dependency from a '.zip' URL" do it "creates a resource dependency from a '.zip' URL" do
resource.url("http://example.com/foo.zip") resource.url("https://example.com/foo.zip")
allow_any_instance_of(Object).to receive(:which).with("unzip") allow_any_instance_of(Object).to receive(:which).with("unzip")
expect(subject.add(resource)).to eq(Dependency.new("unzip", [:build])) expect(subject.add(resource)).to eq(Dependency.new("unzip", [:build]))
end end
it "creates a resource dependency from a '.bz2' URL" do it "creates a resource dependency from a '.bz2' URL" do
resource.url("http://example.com/foo.tar.bz2") resource.url("https://example.com/foo.tar.bz2")
allow_any_instance_of(Object).to receive(:which).with("bzip2") allow_any_instance_of(Object).to receive(:which).with("bzip2")
expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build])) expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build]))
end end
@ -32,19 +32,19 @@ describe DependencyCollector do
context "when xz, zip, and bzip2 are available" do context "when xz, zip, and bzip2 are available" do
it "does not create a resource dependency from a '.xz' URL" do it "does not create a resource dependency from a '.xz' URL" do
resource.url("http://example.com/foo.xz") resource.url("https://example.com/foo.xz")
allow_any_instance_of(Object).to receive(:which).with("xz").and_return(Pathname.new("foo")) allow_any_instance_of(Object).to receive(:which).with("xz").and_return(Pathname.new("foo"))
expect(subject.add(resource)).to be nil expect(subject.add(resource)).to be nil
end end
it "does not create a resource dependency from a '.zip' URL" do it "does not create a resource dependency from a '.zip' URL" do
resource.url("http://example.com/foo.zip") resource.url("https://example.com/foo.zip")
allow_any_instance_of(Object).to receive(:which).with("unzip").and_return(Pathname.new("foo")) allow_any_instance_of(Object).to receive(:which).with("unzip").and_return(Pathname.new("foo"))
expect(subject.add(resource)).to be nil expect(subject.add(resource)).to be nil
end end
it "does not create a resource dependency from a '.bz2' URL" do it "does not create a resource dependency from a '.bz2' URL" do
resource.url("http://example.com/foo.tar.bz2") resource.url("https://example.com/foo.tar.bz2")
allow_any_instance_of(Object).to receive(:which).with("bzip2").and_return(Pathname.new("foo")) allow_any_instance_of(Object).to receive(:which).with("bzip2").and_return(Pathname.new("foo"))
expect(subject.add(resource)).to be nil expect(subject.add(resource)).to be nil
end end

View File

@ -25,26 +25,26 @@ describe DependencyCollector do
specify "Resource xz pre-Mavericks dependency" do specify "Resource xz pre-Mavericks dependency" do
allow(MacOS).to receive(:version).and_return(MacOS::Version.new("10.8")) allow(MacOS).to receive(:version).and_return(MacOS::Version.new("10.8"))
resource = Resource.new resource = Resource.new
resource.url("http://example.com/foo.tar.xz") resource.url("https://example.com/foo.tar.xz")
expect(subject.add(resource)).to eq(Dependency.new("xz", [:build])) expect(subject.add(resource)).to eq(Dependency.new("xz", [:build]))
end end
specify "Resource xz Mavericks or newer dependency" do specify "Resource xz Mavericks or newer dependency" do
allow(MacOS).to receive(:version).and_return(MacOS::Version.new("10.9")) allow(MacOS).to receive(:version).and_return(MacOS::Version.new("10.9"))
resource = Resource.new resource = Resource.new
resource.url("http://example.com/foo.tar.xz") resource.url("https://example.com/foo.tar.xz")
expect(subject.add(resource)).to be nil expect(subject.add(resource)).to be nil
end end
specify "Resource dependency from a '.zip' URL" do specify "Resource dependency from a '.zip' URL" do
resource = Resource.new resource = Resource.new
resource.url("http://example.com/foo.zip") resource.url("https://example.com/foo.zip")
expect(subject.add(resource)).to be nil expect(subject.add(resource)).to be nil
end end
specify "Resource dependency from a '.bz2' URL" do specify "Resource dependency from a '.bz2' URL" do
resource = Resource.new resource = Resource.new
resource.url("http://example.com/foo.tar.bz2") resource.url("https://example.com/foo.tar.bz2")
expect(subject.add(resource)).to be nil expect(subject.add(resource)).to be nil
end end