Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Don't hardcode the logger in paperclip.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed Aug 23, 2011
1 parent f71ebb4 commit 6b6ce9e
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -88,7 +88,7 @@ DEPENDENCIES
appraisal
aws-s3
bundler
cocaine
cocaine (~> 0.2)
fog
jruby-openssl
mime-types
Expand Down
22 changes: 11 additions & 11 deletions gemfiles/rails2.gemfile
Expand Up @@ -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"

4 changes: 2 additions & 2 deletions gemfiles/rails2.gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -108,7 +108,7 @@ DEPENDENCIES
appraisal
aws-s3
bundler
cocaine
cocaine (~> 0.2)
fog
jruby-openssl
mime-types
Expand Down
22 changes: 11 additions & 11 deletions gemfiles/rails3.gemfile
Expand Up @@ -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"

4 changes: 2 additions & 2 deletions gemfiles/rails3.gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -150,7 +150,7 @@ DEPENDENCIES
appraisal
aws-s3
bundler
cocaine
cocaine (~> 0.2)
fog
jruby-openssl
mime-types
Expand Down
22 changes: 11 additions & 11 deletions gemfiles/rails3_1.gemfile
Expand Up @@ -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"

6 changes: 3 additions & 3 deletions gemfiles/rails3_1.gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion lib/paperclip.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6b6ce9e

Please sign in to comment.