Commit 825e1f15 by Prem Sichanugrist

Remove whitespaces

parent 4661cefa
......@@ -95,12 +95,12 @@ module Paperclip
@url = ":s3_path_url"
end
@url = ":asset_host" if @options[:url].to_s == ":asset_host"
@http_proxy = @options[:http_proxy] || nil
if @http_proxy
@s3_options.merge!({:proxy => @http_proxy})
end
AWS::S3::Base.establish_connection!( @s3_options.merge(
:access_key_id => @s3_credentials[:access_key_id],
:secret_access_key => @s3_credentials[:secret_access_key]
......@@ -127,11 +127,11 @@ module Paperclip
def bucket_name
@bucket
end
def using_http_proxy?
!!@http_proxy
end
def http_proxy_host
using_http_proxy? ? @http_proxy[:host] : nil
end
......@@ -139,7 +139,7 @@ module Paperclip
def http_proxy_port
using_http_proxy? ? @http_proxy[:port] : nil
end
def http_proxy_user
using_http_proxy? ? @http_proxy[:user] : nil
end
......@@ -147,7 +147,6 @@ module Paperclip
def http_proxy_password
using_http_proxy? ? @http_proxy[:password] : nil
end
def s3_host_name
@s3_host_name || "s3.amazonaws.com"
......
......@@ -70,7 +70,7 @@ class StorageTest < Test::Unit::TestCase
rails_env("not really an env")
assert_equal({:test => "12345"}, @avatar.parse_credentials(:test => "12345"))
end
should "support HTTP proxy settings" do
rails_env("development")
assert_equal(true, @avatar.using_http_proxy?)
......@@ -79,7 +79,7 @@ class StorageTest < Test::Unit::TestCase
assert_equal(@proxy_settings[:user], @avatar.http_proxy_user)
assert_equal(@proxy_settings[:password], @avatar.http_proxy_password)
end
end
context "" do
......
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