Commit 06a5d776 by Jon Yurek

Formatting tweaks

parent dfb603d1
...@@ -114,7 +114,7 @@ module Paperclip ...@@ -114,7 +114,7 @@ module Paperclip
@s3_options = @options[:s3_options] || {} @s3_options = @options[:s3_options] || {}
@s3_permissions = @options[:s3_permissions] || 'public-read' @s3_permissions = @options[:s3_permissions] || 'public-read'
@s3_protocol = @options[:s3_protocol] || (@s3_permissions == 'public-read' ? 'http' : 'https') @s3_protocol = @options[:s3_protocol] || (@s3_permissions == 'public-read' ? 'http' : 'https')
@s3_headers = @options[:s3_headers] || {} @s3_headers = @options[:s3_headers] || {}
@url = ":s3_path_url" unless @url.to_s.match(/^:s3.*url$/) @url = ":s3_path_url" unless @url.to_s.match(/^:s3.*url$/)
end end
base.class.interpolations[:s3_path_url] = lambda do |attachment, style| base.class.interpolations[:s3_path_url] = lambda do |attachment, style|
......
...@@ -153,7 +153,10 @@ class StorageTest < Test::Unit::TestCase ...@@ -153,7 +153,10 @@ class StorageTest < Test::Unit::TestCase
@key_mock = stub @key_mock = stub
@bucket_mock.expects(:key).returns(@key_mock) @bucket_mock.expects(:key).returns(@key_mock)
@key_mock.expects(:data=) @key_mock.expects(:data=)
@key_mock.expects(:put).with(nil, 'public-read', 'Content-type' => 'image/png', 'Cache-Control' => 'max-age=31557600') @key_mock.expects(:put).with(nil,
'public-read',
'Content-type' => 'image/png',
'Cache-Control' => 'max-age=31557600')
@dummy.save @dummy.save
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment