Merge pull request #3030 from reitermarkus/curl-args

Allow `curl` args to be overriden.
This commit is contained in:
Markus Reiter 2017-08-09 07:51:07 +02:00 committed by GitHub
commit 33abea9eb3
2 changed files with 2 additions and 2 deletions

View File

@ -26,11 +26,11 @@ describe "download strategies", :cask do
downloader.fetch downloader.fetch
expect(downloader).to have_received(:curl).with( expect(downloader).to have_received(:curl).with(
cask.url.to_s,
"--location", "--location",
"--remote-time", "--remote-time",
"--continue-at", "-", "--continue-at", "-",
"--output", kind_of(Pathname), "--output", kind_of(Pathname),
cask.url.to_s,
user_agent: :default user_agent: :default
) )
end end

View File

@ -38,7 +38,7 @@ def curl(*args)
end end
def curl_download(*args, to: nil, **options) def curl_download(*args, to: nil, **options)
curl(*args, "--location", "--remote-time", "--continue-at", "-", "--output", to, **options) curl("--location", "--remote-time", "--continue-at", "-", "--output", to, *args, **options)
end end
def curl_output(*args, **options) def curl_output(*args, **options)