Permalink
Browse files

Don't hardcode the logger in paperclip.rb

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

0 comments on commit 6b6ce9e

Please sign in to comment.