paperclip-s3 1.0.0pre → 1.0.0pre2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/paperclip-s3.rb CHANGED
@@ -2,24 +2,23 @@ require "paperclip-s3/version"
2
2
 
3
3
  module Paperclip
4
4
  module S3
5
-
6
- # Extends the paperclips has_attached_file method
7
- # It will use S3 Storage. The credentials will be read from the environment
8
- def has_attached_file(name, options = {})
9
- options[:storage] ||= :s3
10
- options[:path] ||= "/:class-:attachment/:id/:style-:basename.:extension"
11
- options[:bucket] ||= ENV["S3_BUCKET"]
12
- options[:s3_credentials] ||= {
13
- :access_key_id => ENV['S3_KEY'],
14
- :secret_access_key => ENV['S3_SECRET']
15
- }
16
- super(name, options)
5
+ module Zinergia
6
+ # Extends the paperclips has_attached_file method
7
+ # It will use S3 Storage. The credentials will be read from the environment
8
+ def has_attached_file(name, options = {})
9
+ options[:storage] ||= :s3
10
+ options[:path] ||= "/:class-:attachment/:id/:style-:basename.:extension"
11
+ options[:bucket] ||= ENV["S3_BUCKET"]
12
+ options[:s3_credentials] ||= {
13
+ :access_key_id => ENV['S3_KEY'],
14
+ :secret_access_key => ENV['S3_SECRET']
15
+ }
16
+ super(name, options)
17
+ end
17
18
  end
18
19
 
19
20
 
20
21
  end
21
22
  end
22
23
 
23
- if defined?(ActiveRecord) and defined?(Rails)
24
- ActiveRecord::Base.send :extend, Paperclip::S3 if Rails.env.production?
25
- end
24
+ ActiveRecord::Base.send :extend, Paperclip::S3::Zinergia if Rails.env.production?
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module S3
3
- VERSION = "1.0.0pre"
3
+ VERSION = "1.0.0pre2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: paperclip-s3
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 5
5
- version: 1.0.0pre
5
+ version: 1.0.0pre2
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Nicol\xC3\xA1s Hock Isaza"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-08 00:00:00 -05:00
13
+ date: 2011-06-09 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency