Merge branch '3.0-stable'

This commit is contained in:
Ben Hollis 2013-03-10 16:32:55 -07:00
commit 6672c1c324
4 changed files with 35 additions and 2 deletions

View file

@ -137,7 +137,7 @@ module Middleman::Cli
response = self.class.shared_rack.get(URI.escape(resource.destination_path))
if response.status == 200
create_file(output_file, response.body)
create_file(output_file, binary_encode(response.body))
else
handle_error(output_file, response.body)
end
@ -160,6 +160,13 @@ module Middleman::Cli
self.shell.error(response)
end
end
def binary_encode(string)
if string.respond_to?(:force_encoding)
string.force_encoding("ascii-8bit")
end
string
end
}
end