Commit 37e5e5f5 by John Hawthorn Committed by Jon Yurek

only require fog and define interpolation when needed

parent f768cc20
...@@ -8,7 +8,7 @@ module Paperclip ...@@ -8,7 +8,7 @@ module Paperclip
rescue LoadError => e rescue LoadError => e
e.message << " (You may need to install the fog gem)" e.message << " (You may need to install the fog gem)"
raise e raise e
end end unless defined?(Fog)
base.instance_eval do base.instance_eval do
@fog_directory = @options[:fog_directory] @fog_directory = @options[:fog_directory]
...@@ -19,7 +19,7 @@ module Paperclip ...@@ -19,7 +19,7 @@ module Paperclip
@url = ':fog_public_url' @url = ':fog_public_url'
Paperclip.interpolates(:fog_public_url) do |attachment, style| Paperclip.interpolates(:fog_public_url) do |attachment, style|
attachment.public_url(style) attachment.public_url(style)
end end unless Paperclip::Interpolations.respond_to? :fog_public_url
end end
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