Merge pull request #3030 from reitermarkus/curl-args
Allow `curl` args to be overriden.
This commit is contained in:
commit
33abea9eb3
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user