Commit 6b6ce9ed by Jon Yurek

Don't hardcode the logger in paperclip.rb

parent f71ebb44
...@@ -4,7 +4,7 @@ gem "activerecord", :require => "active_record" ...@@ -4,7 +4,7 @@ gem "activerecord", :require => "active_record"
gem "appraisal" gem "appraisal"
gem "aws-s3", :require => "aws/s3" gem "aws-s3", :require => "aws/s3"
gem "bundler" gem "bundler"
gem "cocaine" gem "cocaine", "~>0.2"
gem "fog" gem "fog"
gem "jruby-openssl", :platform => :jruby gem "jruby-openssl", :platform => :jruby
gem "mime-types" gem "mime-types"
......
...@@ -20,7 +20,7 @@ GEM ...@@ -20,7 +20,7 @@ GEM
builder (3.0.0) builder (3.0.0)
childprocess (0.1.9) childprocess (0.1.9)
ffi (~> 1.0.6) ffi (~> 1.0.6)
cocaine (0.1.0) cocaine (0.2.0)
cucumber (0.10.5) cucumber (0.10.5)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.2) diff-lcs (>= 1.1.2)
...@@ -88,7 +88,7 @@ DEPENDENCIES ...@@ -88,7 +88,7 @@ DEPENDENCIES
appraisal appraisal
aws-s3 aws-s3
bundler bundler
cocaine cocaine (~> 0.2)
fog fog
jruby-openssl jruby-openssl
mime-types mime-types
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3", "~>1.3.4"
gem "rails", "~> 2.3.12"
gem "activerecord", :require=>"active_record" gem "activerecord", :require=>"active_record"
gem "cocaine"
gem "rake"
gem "sprockets", "~> 2.0.0.beta.13", :require=>false
gem "shoulda"
gem "mime-types"
gem "jruby-openssl", :platform=>:jruby
gem "mocha"
gem "bundler"
gem "fog"
gem "appraisal" gem "appraisal"
gem "aws-s3", :require=>"aws/s3" gem "aws-s3", :require=>"aws/s3"
gem "bundler"
gem "cocaine", "~>0.2"
gem "fog"
gem "jruby-openssl", :platform=>:jruby
gem "mime-types"
gem "mocha"
gem "rake"
gem "rdoc", :require=>false gem "rdoc", :require=>false
gem "shoulda"
gem "sqlite3", "~>1.3.4"
gem "sprockets", "~> 2.0.0.beta.13", :require=>false
gem "rails", "~> 2.3.12"
...@@ -31,7 +31,7 @@ GEM ...@@ -31,7 +31,7 @@ GEM
builder (3.0.0) builder (3.0.0)
childprocess (0.2.0) childprocess (0.2.0)
ffi (~> 1.0.6) ffi (~> 1.0.6)
cocaine (0.1.0) cocaine (0.2.0)
cucumber (1.0.2) cucumber (1.0.2)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.2) diff-lcs (>= 1.1.2)
...@@ -108,7 +108,7 @@ DEPENDENCIES ...@@ -108,7 +108,7 @@ DEPENDENCIES
appraisal appraisal
aws-s3 aws-s3
bundler bundler
cocaine cocaine (~> 0.2)
fog fog
jruby-openssl jruby-openssl
mime-types mime-types
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3", "~>1.3.4"
gem "rails", "~> 3.0.9"
gem "activerecord", :require=>"active_record" gem "activerecord", :require=>"active_record"
gem "cocaine"
gem "rake"
gem "sprockets", "~> 2.0.0.beta.13", :require=>false
gem "shoulda"
gem "mime-types"
gem "jruby-openssl", :platform=>:jruby
gem "mocha"
gem "bundler"
gem "fog"
gem "appraisal" gem "appraisal"
gem "aws-s3", :require=>"aws/s3" gem "aws-s3", :require=>"aws/s3"
gem "bundler"
gem "cocaine", "~>0.2"
gem "fog"
gem "jruby-openssl", :platform=>:jruby
gem "mime-types"
gem "mocha"
gem "rake"
gem "rdoc", :require=>false gem "rdoc", :require=>false
gem "shoulda"
gem "sqlite3", "~>1.3.4"
gem "sprockets", "~> 2.0.0.beta.13", :require=>false
gem "rails", "~> 3.0.9"
...@@ -49,7 +49,7 @@ GEM ...@@ -49,7 +49,7 @@ GEM
builder (2.1.2) builder (2.1.2)
childprocess (0.2.0) childprocess (0.2.0)
ffi (~> 1.0.6) ffi (~> 1.0.6)
cocaine (0.1.0) cocaine (0.2.0)
cucumber (1.0.2) cucumber (1.0.2)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.2) diff-lcs (>= 1.1.2)
...@@ -150,7 +150,7 @@ DEPENDENCIES ...@@ -150,7 +150,7 @@ DEPENDENCIES
appraisal appraisal
aws-s3 aws-s3
bundler bundler
cocaine cocaine (~> 0.2)
fog fog
jruby-openssl jruby-openssl
mime-types mime-types
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3", "~>1.3.4"
gem "rails", "~> 3.1.0.rc6"
gem "activerecord", :require=>"active_record" gem "activerecord", :require=>"active_record"
gem "cocaine"
gem "rake"
gem "sprockets", "~> 2.0.0.beta.13", :require=>false
gem "shoulda"
gem "mime-types"
gem "jruby-openssl", :platform=>:jruby
gem "mocha"
gem "bundler"
gem "fog"
gem "appraisal" gem "appraisal"
gem "aws-s3", :require=>"aws/s3" gem "aws-s3", :require=>"aws/s3"
gem "bundler"
gem "cocaine", "~>0.2"
gem "fog"
gem "jruby-openssl", :platform=>:jruby
gem "mime-types"
gem "mocha"
gem "rake"
gem "rdoc", :require=>false gem "rdoc", :require=>false
gem "shoulda"
gem "sqlite3", "~>1.3.4"
gem "sprockets", "~> 2.0.0.beta.13", :require=>false
gem "rails", "~> 3.1.0.rc5"
...@@ -53,7 +53,7 @@ GEM ...@@ -53,7 +53,7 @@ GEM
builder (3.0.0) builder (3.0.0)
childprocess (0.2.0) childprocess (0.2.0)
ffi (~> 1.0.6) ffi (~> 1.0.6)
cocaine (0.1.0) cocaine (0.2.0)
cucumber (1.0.2) cucumber (1.0.2)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.2) diff-lcs (>= 1.1.2)
...@@ -159,12 +159,12 @@ DEPENDENCIES ...@@ -159,12 +159,12 @@ DEPENDENCIES
appraisal appraisal
aws-s3 aws-s3
bundler bundler
cocaine cocaine (~> 0.2)
fog fog
jruby-openssl jruby-openssl
mime-types mime-types
mocha mocha
rails (~> 3.1.0.rc6) rails (~> 3.1.0.rc5)
rake rake
rdoc rdoc
shoulda shoulda
......
...@@ -40,6 +40,7 @@ require 'paperclip/attachment' ...@@ -40,6 +40,7 @@ require 'paperclip/attachment'
require 'paperclip/storage' require 'paperclip/storage'
require 'paperclip/callback_compatibility' require 'paperclip/callback_compatibility'
require 'paperclip/railtie' require 'paperclip/railtie'
require 'logger'
require 'cocaine' require 'cocaine'
# The base module that gets included in ActiveRecord::Base. See the # The base module that gets included in ActiveRecord::Base. See the
...@@ -128,7 +129,11 @@ module Paperclip ...@@ -128,7 +129,11 @@ module Paperclip
end end
def logger #:nodoc: def logger #:nodoc:
defined?(ActiveRecord::Base) ? ActiveRecord::Base.logger : Rails.logger @logger ||= options[:logger] || Logger.new(STDOUT)
end
def logger=(logger)
@logger = logger
end end
def logging? #:nodoc: def logging? #:nodoc:
......
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