Commit 6b6ce9ed by Jon Yurek

Don't hardcode the logger in paperclip.rb

parent f71ebb44
......@@ -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"
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -40,6 +40,7 @@ require 'paperclip/attachment'
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 @@ module Paperclip
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:
......
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