Add --compressed option to curl #14

Merged
merged 2 commits into from Dec 3, 2012
Jump to file or symbol
Failed to load files and symbols.
+13 −1
Diff settings

Always

Just for now

View
@@ -18,7 +18,7 @@ def file(path, url=nil)
if @copy_from_url
copy_from_path(target_path, url || path)
else
- run "curl '#{url}' -L -o #{target_path}"
+ run "curl '#{url}' -L --compressed -o #{target_path}"
raise "Downloaded empty file" unless File.exist?(target_path)
end
yield target_path if block_given?
View
@@ -159,6 +159,18 @@ def simple_vendorfile
vendorer.should_not include(@output)
end
end
+
+ context "with a compressed resource" do
+ def vendorfile_for_compressed_resource
+ write 'Vendorfile', "file 'public/javascripts/highcharts.js', 'http://code.highcharts.com/highcharts.js'"
+ end
+
+ it "decompresses to plain text" do
+ vendorfile_for_compressed_resource
+ vendorer
+ read('public/javascripts/highcharts.js').should include('Highcharts')
+ end
+ end
end
describe '#folder' do