Skip to content

Commit

Permalink
Bump to pre2
Browse files Browse the repository at this point in the history
  • Loading branch information
nhocki committed Jun 9, 2011
1 parent 49226fa commit 9da31e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
29 changes: 14 additions & 15 deletions lib/paperclip-s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@

module Paperclip
module S3

# Extends the paperclips has_attached_file method
# It will use S3 Storage. The credentials will be read from the environment
def has_attached_file(name, options = {})
options[:storage] ||= :s3
options[:path] ||= "/:class-:attachment/:id/:style-:basename.:extension"
options[:bucket] ||= ENV["S3_BUCKET"]
options[:s3_credentials] ||= {
:access_key_id => ENV['S3_KEY'],
:secret_access_key => ENV['S3_SECRET']
}
super(name, options)
module Zinergia
# Extends the paperclips has_attached_file method
# It will use S3 Storage. The credentials will be read from the environment
def has_attached_file(name, options = {})
options[:storage] ||= :s3
options[:path] ||= "/:class-:attachment/:id/:style-:basename.:extension"
options[:bucket] ||= ENV["S3_BUCKET"]
options[:s3_credentials] ||= {
:access_key_id => ENV['S3_KEY'],
:secret_access_key => ENV['S3_SECRET']
}
super(name, options)
end
end


end
end

if defined?(ActiveRecord) and defined?(Rails)
ActiveRecord::Base.send :extend, Paperclip::S3 if Rails.env.production?
end
ActiveRecord::Base.send :extend, Paperclip::S3::Zinergia if Rails.env.production?
2 changes: 1 addition & 1 deletion lib/paperclip-s3/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Paperclip
module S3
VERSION = "1.0.0pre"
VERSION = "1.0.0pre2"
end
end

0 comments on commit 9da31e7

Please sign in to comment.