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
 | 
			
		||||
 | 
			
		||||
      expect(downloader).to have_received(:curl).with(
 | 
			
		||||
        cask.url.to_s,
 | 
			
		||||
        "--location",
 | 
			
		||||
        "--remote-time",
 | 
			
		||||
        "--continue-at", "-",
 | 
			
		||||
        "--output", kind_of(Pathname),
 | 
			
		||||
        cask.url.to_s,
 | 
			
		||||
        user_agent: :default
 | 
			
		||||
      )
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,7 @@ def curl(*args)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
def curl_output(*args, **options)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user