twm_paperclip 2.3.6b → 2.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,8 +94,8 @@ module Paperclip
94
94
  end
95
95
  end
96
96
 
97
- def expiring_url(time = 3600, style = default_style)
98
- AWS::S3::S3Object.url_for(path(style), bucket_name, :expires_in => time )
97
+ def expiring_url(time = 3600)
98
+ AWS::S3::S3Object.url_for(path, bucket_name, :expires_in => time )
99
99
  end
100
100
 
101
101
  def bucket_name
@@ -147,28 +147,21 @@ module Paperclip
147
147
  log("saving #{path(style)}")
148
148
  # Nasty hack, thumbnails for PDFs generated in jpg/png/gif are NOT the content_type of the original file!
149
149
  # Override the content_type based on these extensions.
150
- access = @s3_permissions
151
- unless style == :default_style
152
- content_type = case(file.path)
153
- when /.jpg$/
154
- "image/jpeg"
155
- access = :public_read
156
- when /.png$/
157
- "image/png"
158
- access = :public_read
159
- when /.gif$/
160
- "image/gif"
161
- access = :public_read
162
- else
163
- instance_read(:content_type)
164
- end
150
+ content_type = case(file.path)
151
+ when /.jpg$/
152
+ "image/jpeg"
153
+ when /.png$/
154
+ "image/png"
155
+ when /.gif$/
156
+ "image/gif"
157
+ else
158
+ instance_read(:content_type)
165
159
  end
166
160
  AWS::S3::S3Object.store(path(style),
167
161
  file,
168
162
  bucket_name,
169
- {
170
- :content_type => content_type,#instance_read(:content_type),
171
- :access => access,
163
+ {:content_type => content_type,#instance_read(:content_type),
164
+ :access => @s3_permissions,
172
165
  }.merge(@s3_headers))
173
166
  rescue AWS::S3::NoSuchBucket => e
174
167
  create_bucket
@@ -1,3 +1,3 @@
1
1
  module Paperclip
2
- VERSION = "2.3.6b" unless defined? Paperclip::VERSION
2
+ VERSION = "2.3.6" unless defined? Paperclip::VERSION
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twm_paperclip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3653147
5
- prerelease: true
4
+ hash: 15
5
+ prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 6b
10
- version: 2.3.6b
9
+ - 6
10
+ version: 2.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jon Yurek
@@ -206,14 +206,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  none: false
208
208
  requirements:
209
- - - ">"
209
+ - - ">="
210
210
  - !ruby/object:Gem::Version
211
- hash: 25
211
+ hash: 3
212
212
  segments:
213
- - 1
214
- - 3
215
- - 1
216
- version: 1.3.1
213
+ - 0
214
+ version: "0"
217
215
  requirements:
218
216
  - ImageMagick
219
217
  rubyforge_project: paperclip