paperclip 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of paperclip might be problematic. Click here for more details.

data/.travis.yml CHANGED
@@ -3,7 +3,6 @@ rvm:
3
3
  - 1.9.2
4
4
  - ree
5
5
  - rbx-18mode
6
- - rbx-19mode
7
6
 
8
7
  before_script: "sudo ntpdate -ub ntp.ubuntu.com pool.ntp.org; true"
9
8
  script: "bundle exec rake clean test cucumber"
@@ -12,3 +11,4 @@ gemfile:
12
11
  - gemfiles/rails2.gemfile
13
12
  - gemfiles/rails3.gemfile
14
13
  - gemfiles/rails3_1.gemfile
14
+ - gemfiles/rails3_2.gemfile
data/Appraisals CHANGED
@@ -12,3 +12,9 @@ appraise "rails3_1" do
12
12
  gem "rails", "~> 3.1.0"
13
13
  gem "paperclip", :path => "../"
14
14
  end
15
+
16
+ appraise "rails3_2" do
17
+ gem "rails", "~> 3.2.0"
18
+ gem "paperclip", :path => "../"
19
+ end
20
+
data/NEWS CHANGED
@@ -1,3 +1,12 @@
1
+ New in 2.7.0:
2
+
3
+ * Bug fix: Checking the existence of a file on S3 handles all AWS errors.
4
+ * Bug fix: Clear the fingerprint when removing an attachment.
5
+ * Bug fix: Attachment size validation message reads more nicely now.
6
+ * Feature: Style names can be either symbols or strings.
7
+ * Compatibility: Support for ActiveSupport < 2.3.12.
8
+ * Compatibility: Support for Rails 3.2.
9
+
1
10
  New in 2.6.0:
2
11
 
3
12
  * Bug fix: Files are re-wound after reading.
data/README.md CHANGED
@@ -60,7 +60,7 @@ Include the gem in your Gemfile:
60
60
  Or, if you want to get the latest, you can get master from the main paperclip repository:
61
61
 
62
62
  gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
63
-
63
+
64
64
  If you're trying to use features that don't seem to be in the latest released gem, but are
65
65
  mentioned in this README, then you probably need to specify the master branch if you want to
66
66
  use them. This README is probably ahead of the latest released version, if you're reading it
@@ -75,7 +75,7 @@ Anyway, if you don't use Bundler (though you probably should, even in Rails 2),
75
75
  config.gem "paperclip", :version => "~> 2.4"
76
76
  ...
77
77
  end
78
-
78
+
79
79
  For Non-Rails usage:
80
80
 
81
81
  class ModuleName < ActiveRecord::Base
@@ -176,9 +176,9 @@ safer choice for the default file store._
176
176
  You may also choose to store your files using Amazon's S3 service. To do so, include
177
177
  the `aws-sdk` gem in your Gemfile:
178
178
 
179
- gem 'aws-sdk'
179
+ gem 'aws-sdk', '~> 1.3.4'
180
180
 
181
- And then you can specify using S3 from `has_attached_file`.
181
+ And then you can specify using S3 from `has_attached_file`.
182
182
  You can find more information about configuring and using S3 storage in
183
183
  [the `Paperclip::Storage::S3` documentation](http://rubydoc.info/gems/paperclip/Paperclip/Storage/S3).
184
184
 
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "jruby-openssl", :platform=>:jruby
6
+ gem "rails", "~> 3.2.0"
7
+ gem "paperclip", :path=>"../"
8
+
9
+ gemspec :path=>"../"
data/lib/paperclip.rb CHANGED
@@ -323,7 +323,11 @@ module Paperclip
323
323
  write_inheritable_attribute(:attachment_definitions, {})
324
324
  end
325
325
  else
326
- self.attachment_definitions = self.attachment_definitions.dup
326
+ if respond_to?(:class_attribute)
327
+ self.attachment_definitions = self.attachment_definitions.dup
328
+ else
329
+ write_inheritable_attribute(:attachment_definitions, self.attachment_definitions.dup)
330
+ end
327
331
  end
328
332
 
329
333
  attachment_definitions[name] = Paperclip::AttachmentOptions.new(options)
@@ -368,7 +372,7 @@ module Paperclip
368
372
  min = options[:greater_than] || (options[:in] && options[:in].first) || 0
369
373
  max = options[:less_than] || (options[:in] && options[:in].last) || (1.0/0)
370
374
  range = (min..max)
371
- message = options[:message] || "file size must be between :min and :max bytes"
375
+ message = options[:message] || "must be between :min and :max bytes"
372
376
  message = message.call if message.respond_to?(:call)
373
377
  message = message.gsub(/:min/, min.to_s).gsub(/:max/, max.to_s)
374
378
 
@@ -462,6 +462,7 @@ module Paperclip
462
462
  instance_write(:file_name, nil)
463
463
  instance_write(:content_type, nil)
464
464
  instance_write(:file_size, nil)
465
+ instance_write(:fingerprint, nil)
465
466
  instance_write(:updated_at, nil)
466
467
  end
467
468
 
@@ -93,7 +93,7 @@ module Paperclip
93
93
  # If the style has a format defined, it will return the format instead
94
94
  # of the actual extension.
95
95
  def extension attachment, style_name
96
- ((style = attachment.styles[style_name]) && style[:format]) ||
96
+ ((style = attachment.styles[style_name.to_sym]) && style[:format]) ||
97
97
  File.extname(attachment.original_filename).gsub(/^\.+/, "")
98
98
  end
99
99
 
@@ -238,6 +238,8 @@ module Paperclip
238
238
  else
239
239
  false
240
240
  end
241
+ rescue AWS::Errors::Base => e
242
+ false
241
243
  end
242
244
 
243
245
  def s3_permissions(style = default_style)
@@ -1,3 +1,3 @@
1
1
  module Paperclip
2
- VERSION = "2.6.0" unless defined? Paperclip::VERSION
2
+ VERSION = "2.7.0" unless defined? Paperclip::VERSION
3
3
  end
@@ -925,6 +925,7 @@ class AttachmentTest < Test::Unit::TestCase
925
925
  @attachment.expects(:instance_write).with(:file_name, nil)
926
926
  @attachment.expects(:instance_write).with(:content_type, nil)
927
927
  @attachment.expects(:instance_write).with(:file_size, nil)
928
+ @attachment.expects(:instance_write).with(:fingerprint, nil)
928
929
  @attachment.expects(:instance_write).with(:updated_at, nil)
929
930
  @attachment.assign nil
930
931
  @attachment.save
@@ -935,6 +936,7 @@ class AttachmentTest < Test::Unit::TestCase
935
936
  @attachment.expects(:instance_write).with(:file_name, nil)
936
937
  @attachment.expects(:instance_write).with(:content_type, nil)
937
938
  @attachment.expects(:instance_write).with(:file_size, nil)
939
+ @attachment.expects(:instance_write).with(:fingerprint, nil)
938
940
  @attachment.expects(:instance_write).with(:updated_at, nil)
939
941
  @attachment.clear
940
942
  @attachment.save
@@ -945,6 +947,7 @@ class AttachmentTest < Test::Unit::TestCase
945
947
  @attachment.expects(:instance_write).with(:file_name, nil)
946
948
  @attachment.expects(:instance_write).with(:content_type, nil)
947
949
  @attachment.expects(:instance_write).with(:file_size, nil)
950
+ @attachment.expects(:instance_write).with(:fingerprint, nil)
948
951
  @attachment.expects(:instance_write).with(:updated_at, nil)
949
952
  @attachment.destroy
950
953
  @existing_names.each{|f| assert ! File.exists?(f) }
@@ -959,6 +962,7 @@ class AttachmentTest < Test::Unit::TestCase
959
962
  @attachment.expects(:instance_write).with(:file_name, nil)
960
963
  @attachment.expects(:instance_write).with(:content_type, nil)
961
964
  @attachment.expects(:instance_write).with(:file_size, nil)
965
+ @attachment.expects(:instance_write).with(:fingerprint, nil)
962
966
  @attachment.expects(:instance_write).with(:updated_at, nil)
963
967
  @attachment.assign nil
964
968
  @attachment.save
@@ -969,6 +973,7 @@ class AttachmentTest < Test::Unit::TestCase
969
973
  @attachment.expects(:instance_write).with(:file_name, nil)
970
974
  @attachment.expects(:instance_write).with(:content_type, nil)
971
975
  @attachment.expects(:instance_write).with(:file_size, nil)
976
+ @attachment.expects(:instance_write).with(:fingerprint, nil)
972
977
  @attachment.expects(:instance_write).with(:updated_at, nil)
973
978
  @attachment.clear
974
979
  @attachment.save
@@ -979,6 +984,7 @@ class AttachmentTest < Test::Unit::TestCase
979
984
  @attachment.expects(:instance_write).with(:file_name, nil)
980
985
  @attachment.expects(:instance_write).with(:content_type, nil)
981
986
  @attachment.expects(:instance_write).with(:file_size, nil)
987
+ @attachment.expects(:instance_write).with(:fingerprint, nil)
982
988
  @attachment.expects(:instance_write).with(:updated_at, nil)
983
989
  @attachment.destroy
984
990
  @existing_names.each{|f| assert File.exists?(f) }
@@ -46,8 +46,11 @@ class InterpolationsTest < Test::Unit::TestCase
46
46
  should "return the extension of the file as the format if defined in the style" do
47
47
  attachment = mock
48
48
  attachment.expects(:original_filename).never
49
- attachment.expects(:styles).returns({:style => {:format => "png"}})
50
- assert_equal "png", Paperclip::Interpolations.extension(attachment, :style)
49
+ attachment.expects(:styles).twice.returns({:style => {:format => "png"}})
50
+
51
+ [:style, 'style'].each do |style|
52
+ assert_equal "png", Paperclip::Interpolations.extension(attachment, style)
53
+ end
51
54
  end
52
55
 
53
56
  should "return the extension of the file based on the content type" do
@@ -542,6 +542,16 @@ class S3Test < Test::Unit::TestCase
542
542
  assert true
543
543
  end
544
544
  end
545
+
546
+ context 'that the file were missing' do
547
+ setup do
548
+ AWS::S3::S3Object.any_instance.stubs(:exists?).raises(AWS::Errors::Base)
549
+ end
550
+
551
+ should 'return false on exists?' do
552
+ assert !@dummy.avatar.exists?
553
+ end
554
+ end
545
555
  end
546
556
  end
547
557
 
@@ -226,11 +226,16 @@ class ThumbnailTest < Test::Unit::TestCase
226
226
  end
227
227
 
228
228
  context "passing a custom file geometry parser" do
229
+ teardown do
230
+ self.class.send(:remove_const, :GeoParser)
231
+ end
232
+
229
233
  should "produce the appropriate transformation_command" do
230
234
  GeoParser = Class.new do
231
235
  def self.from_file(file)
232
236
  new
233
237
  end
238
+
234
239
  def transformation_to(target, should_crop)
235
240
  ["SCALE", "CROP"]
236
241
  end
@@ -252,6 +257,10 @@ class ThumbnailTest < Test::Unit::TestCase
252
257
  end
253
258
 
254
259
  context "passing a custom geometry string parser" do
260
+ teardown do
261
+ self.class.send(:remove_const, :GeoParser)
262
+ end
263
+
255
264
  should "produce the appropriate transformation_command" do
256
265
  GeoParser = Class.new do
257
266
  def self.parse(s)
@@ -77,7 +77,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
77
77
  end.new
78
78
  mock_attachment = MockAttachment.new
79
79
  mock_interpolator = MockInterpolator.new(:result => expected)
80
- options = { :interpolator => mock_interpolator}
80
+ options = { :interpolator => mock_interpolator }
81
81
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
82
82
 
83
83
  result = url_generator.for(:style_name, {:escape => true})
@@ -89,7 +89,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
89
89
  expected = "the expected result"
90
90
  mock_attachment = MockAttachment.new
91
91
  mock_interpolator = MockInterpolator.new(:result => expected)
92
- options = { :interpolator => mock_interpolator}
92
+ options = { :interpolator => mock_interpolator }
93
93
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
94
94
 
95
95
  result = url_generator.for(:style_name, {:escape => false})
@@ -101,7 +101,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
101
101
  expected = "the expected result"
102
102
  mock_attachment = MockAttachment.new
103
103
  mock_interpolator = MockInterpolator.new(:result => expected)
104
- options = { :interpolator => mock_interpolator}
104
+ options = { :interpolator => mock_interpolator }
105
105
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
106
106
 
107
107
  result = url_generator.for(:style_name, {})
@@ -113,7 +113,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
113
113
  expected = "the expected result"
114
114
  mock_interpolator = MockInterpolator.new(:result => expected)
115
115
  mock_attachment = MockAttachment.new(:responds_to_updated_at => false)
116
- options = { :interpolator => mock_interpolator}
116
+ options = { :interpolator => mock_interpolator }
117
117
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
118
118
 
119
119
  result = url_generator.for(:style_name, {:timestamp => true})
@@ -125,7 +125,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
125
125
  expected = "the expected result"
126
126
  mock_interpolator = MockInterpolator.new(:result => expected)
127
127
  mock_attachment = MockAttachment.new(:responds_to_updated_at => true, :updated_at => nil)
128
- options = { :interpolator => mock_interpolator}
128
+ options = { :interpolator => mock_interpolator }
129
129
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
130
130
 
131
131
  result = url_generator.for(:style_name, {:timestamp => true})
@@ -138,7 +138,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
138
138
  updated_at = 1231231234
139
139
  mock_interpolator = MockInterpolator.new(:result => expected)
140
140
  mock_attachment = MockAttachment.new(:updated_at => updated_at)
141
- options = { :interpolator => mock_interpolator}
141
+ options = { :interpolator => mock_interpolator }
142
142
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
143
143
 
144
144
  result = url_generator.for(:style_name, {:timestamp => true})
@@ -151,7 +151,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
151
151
  updated_at = 1231231234
152
152
  mock_interpolator = MockInterpolator.new(:result => expected)
153
153
  mock_attachment = MockAttachment.new(:updated_at => updated_at)
154
- options = { :interpolator => mock_interpolator}
154
+ options = { :interpolator => mock_interpolator }
155
155
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
156
156
 
157
157
  result = url_generator.for(:style_name, {:timestamp => true})
@@ -164,7 +164,7 @@ class UrlGeneratorTest < Test::Unit::TestCase
164
164
  updated_at = 1231231234
165
165
  mock_interpolator = MockInterpolator.new(:result => expected)
166
166
  mock_attachment = MockAttachment.new(:updated_at => updated_at)
167
- options = { :interpolator => mock_interpolator}
167
+ options = { :interpolator => mock_interpolator }
168
168
  url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
169
169
 
170
170
  result = url_generator.for(:style_name, {:timestamp => false})
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 6
8
+ - 7
9
9
  - 0
10
- version: 2.6.0
10
+ version: 2.7.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jon Yurek
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-10 00:00:00 Z
18
+ date: 2012-02-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :runtime
@@ -30,9 +30,9 @@ dependencies:
30
30
  - 3
31
31
  - 0
32
32
  version: 2.3.0
33
- prerelease: false
34
33
  name: activerecord
35
34
  version_requirements: *id001
35
+ prerelease: false
36
36
  - !ruby/object:Gem::Dependency
37
37
  type: :runtime
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
@@ -46,9 +46,9 @@ dependencies:
46
46
  - 3
47
47
  - 2
48
48
  version: 2.3.2
49
- prerelease: false
50
49
  name: activesupport
51
50
  version_requirements: *id002
51
+ prerelease: false
52
52
  - !ruby/object:Gem::Dependency
53
53
  type: :runtime
54
54
  requirement: &id003 !ruby/object:Gem::Requirement
@@ -62,9 +62,9 @@ dependencies:
62
62
  - 0
63
63
  - 2
64
64
  version: 0.0.2
65
- prerelease: false
66
65
  name: cocaine
67
66
  version_requirements: *id003
67
+ prerelease: false
68
68
  - !ruby/object:Gem::Dependency
69
69
  type: :runtime
70
70
  requirement: &id004 !ruby/object:Gem::Requirement
@@ -76,9 +76,9 @@ dependencies:
76
76
  segments:
77
77
  - 0
78
78
  version: "0"
79
- prerelease: false
80
79
  name: mime-types
81
80
  version_requirements: *id004
81
+ prerelease: false
82
82
  - !ruby/object:Gem::Dependency
83
83
  type: :development
84
84
  requirement: &id005 !ruby/object:Gem::Requirement
@@ -90,9 +90,9 @@ dependencies:
90
90
  segments:
91
91
  - 0
92
92
  version: "0"
93
- prerelease: false
94
93
  name: shoulda
95
94
  version_requirements: *id005
95
+ prerelease: false
96
96
  - !ruby/object:Gem::Dependency
97
97
  type: :development
98
98
  requirement: &id006 !ruby/object:Gem::Requirement
@@ -106,9 +106,9 @@ dependencies:
106
106
  - 4
107
107
  - 0
108
108
  version: 0.4.0
109
- prerelease: false
110
109
  name: appraisal
111
110
  version_requirements: *id006
111
+ prerelease: false
112
112
  - !ruby/object:Gem::Dependency
113
113
  type: :development
114
114
  requirement: &id007 !ruby/object:Gem::Requirement
@@ -120,9 +120,9 @@ dependencies:
120
120
  segments:
121
121
  - 0
122
122
  version: "0"
123
- prerelease: false
124
123
  name: mocha
125
124
  version_requirements: *id007
125
+ prerelease: false
126
126
  - !ruby/object:Gem::Dependency
127
127
  type: :development
128
128
  requirement: &id008 !ruby/object:Gem::Requirement
@@ -134,9 +134,9 @@ dependencies:
134
134
  segments:
135
135
  - 0
136
136
  version: "0"
137
- prerelease: false
138
137
  name: aws-sdk
139
138
  version_requirements: *id008
139
+ prerelease: false
140
140
  - !ruby/object:Gem::Dependency
141
141
  type: :development
142
142
  requirement: &id009 !ruby/object:Gem::Requirement
@@ -150,9 +150,9 @@ dependencies:
150
150
  - 3
151
151
  - 4
152
152
  version: 1.3.4
153
- prerelease: false
154
153
  name: sqlite3
155
154
  version_requirements: *id009
155
+ prerelease: false
156
156
  - !ruby/object:Gem::Dependency
157
157
  type: :development
158
158
  requirement: &id010 !ruby/object:Gem::Requirement
@@ -166,9 +166,9 @@ dependencies:
166
166
  - 1
167
167
  - 0
168
168
  version: 1.1.0
169
- prerelease: false
170
169
  name: cucumber
171
170
  version_requirements: *id010
171
+ prerelease: false
172
172
  - !ruby/object:Gem::Dependency
173
173
  type: :development
174
174
  requirement: &id011 !ruby/object:Gem::Requirement
@@ -180,9 +180,9 @@ dependencies:
180
180
  segments:
181
181
  - 0
182
182
  version: "0"
183
- prerelease: false
184
183
  name: aruba
185
184
  version_requirements: *id011
185
+ prerelease: false
186
186
  - !ruby/object:Gem::Dependency
187
187
  type: :development
188
188
  requirement: &id012 !ruby/object:Gem::Requirement
@@ -194,9 +194,9 @@ dependencies:
194
194
  segments:
195
195
  - 0
196
196
  version: "0"
197
- prerelease: false
198
197
  name: capybara
199
198
  version_requirements: *id012
199
+ prerelease: false
200
200
  - !ruby/object:Gem::Dependency
201
201
  type: :development
202
202
  requirement: &id013 !ruby/object:Gem::Requirement
@@ -208,9 +208,9 @@ dependencies:
208
208
  segments:
209
209
  - 0
210
210
  version: "0"
211
- prerelease: false
212
211
  name: bundler
213
212
  version_requirements: *id013
213
+ prerelease: false
214
214
  - !ruby/object:Gem::Dependency
215
215
  type: :development
216
216
  requirement: &id014 !ruby/object:Gem::Requirement
@@ -223,9 +223,9 @@ dependencies:
223
223
  - 0
224
224
  - 2
225
225
  version: "0.2"
226
- prerelease: false
227
226
  name: cocaine
228
227
  version_requirements: *id014
228
+ prerelease: false
229
229
  - !ruby/object:Gem::Dependency
230
230
  type: :development
231
231
  requirement: &id015 !ruby/object:Gem::Requirement
@@ -237,9 +237,9 @@ dependencies:
237
237
  segments:
238
238
  - 0
239
239
  version: "0"
240
- prerelease: false
241
240
  name: fog
242
241
  version_requirements: *id015
242
+ prerelease: false
243
243
  - !ruby/object:Gem::Dependency
244
244
  type: :development
245
245
  requirement: &id016 !ruby/object:Gem::Requirement
@@ -251,9 +251,9 @@ dependencies:
251
251
  segments:
252
252
  - 0
253
253
  version: "0"
254
- prerelease: false
255
254
  name: rake
256
255
  version_requirements: *id016
256
+ prerelease: false
257
257
  - !ruby/object:Gem::Dependency
258
258
  type: :development
259
259
  requirement: &id017 !ruby/object:Gem::Requirement
@@ -265,9 +265,9 @@ dependencies:
265
265
  segments:
266
266
  - 0
267
267
  version: "0"
268
- prerelease: false
269
268
  name: fakeweb
270
269
  version_requirements: *id017
270
+ prerelease: false
271
271
  description: Easy upload management for ActiveRecord
272
272
  email:
273
273
  - jyurek@thoughtbot.com
@@ -282,7 +282,6 @@ files:
282
282
  - .travis.yml
283
283
  - Appraisals
284
284
  - CONTRIBUTING.md
285
- - ChangeLog
286
285
  - Gemfile
287
286
  - Gemfile.lock
288
287
  - LICENSE
@@ -309,6 +308,7 @@ files:
309
308
  - gemfiles/rails2.gemfile
310
309
  - gemfiles/rails3.gemfile
311
310
  - gemfiles/rails3_1.gemfile
311
+ - gemfiles/rails3_2.gemfile
312
312
  - generators/paperclip/USAGE
313
313
  - generators/paperclip/paperclip_generator.rb
314
314
  - generators/paperclip/templates/paperclip_migration.rb.erb
@@ -413,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
413
413
  requirements:
414
414
  - ImageMagick
415
415
  rubyforge_project: paperclip
416
- rubygems_version: 1.8.11
416
+ rubygems_version: 1.8.17
417
417
  signing_key:
418
418
  specification_version: 3
419
419
  summary: File attachments as attributes for ActiveRecord
data/ChangeLog DELETED
@@ -1,74 +0,0 @@
1
- 2012-02-10 Mike Burns <mburns@thoughtbot.com>
2
-
3
- * lib/paperclip/version.rb, ChangeLog, NEWS: Bump to 2.6.0.
4
-
5
- 2012-02-06 Kelley Reynolds <kelley@insidesystems.net>
6
-
7
- * filesystem.rb (to_file), fog.rb (to_file), s3.rb (to_file): Rewind after
8
- reading from the file.
9
- * filesystem.rb (flush_writes): Replace mv and unlink complication with a
10
- cp, since the unlink already happens elsewhere.
11
-
12
- 2012-02-03 Luke Griffiths <wlgriffiths@gmail.com>
13
-
14
- * lib/paperclip.rb (has_attached_file), lib/paperclip/attachment_options.rb,
15
- attachment_options_test.rb, test/helper.rb, paperclip_test.rb:
16
- Introduce Paperclip::AttachmentOptions, a hash-like object that knows about
17
- Paperclip-specific options, defaults, and deprecations.
18
-
19
- 2012-02-03 Jon Yurek <jyurek@thoughtbot.com>
20
-
21
- * lib/paperclip/matchers/validate_attachment_content_type_matcher.rb
22
- (matches?, type_allowed?),
23
- lib/paperclip/matches/validate_attachment_presence_matcher.rb (matches?,
24
- error_when_not_valid?, no_error_when_valid?),
25
- lib/paperclip/matches/validate_attachment_size_matcher.rb (matches?,
26
- passes_validation_with_size),
27
- validate_attachment_content_type_matcher_test.rb,
28
- validate_attachment_presence_matcher_test.rb,
29
- validate_attachment_size_matcher_test.rb:
30
- Validation matchers respect conditionals.
31
-
32
- 2012-02-01 Justin Ko <justin@kospecinc.com>
33
-
34
- * lib/paperclip/railtie.rb (insert): Guard against the Rails constant not
35
- existing.
36
-
37
- 2012-01-27 Prem Sichanugrist <psichanugrist@thoughtbot.com>
38
-
39
- * lib/paperclip/attachment.rb (assign), attachment_test.rb,
40
- filesystem_test.rb, s3_test.rb:
41
- Introduce :restricted_characters in Paperclip::Attachment.default_options as
42
- an overrideable blacklist of characters that will be replaced with an
43
- underscore.
44
-
45
- * lib/paperclip/version.rb: Bump to 2.5.2.
46
-
47
- 2012-01-27 Prem Sichanugrist <s@sikachu.com>
48
-
49
- * test/storage/s3_live_test.rb, test/storage/s3_test.rb:
50
- Remove the questionmark filename test, for Windows compatibility.
51
-
52
- 2012-01-19 Benjamin Hüttinger <huettinger@kupferwerk.com>
53
-
54
- * lib/paperclip/storage/fog.rb: fog_host, fog_credentials, and fog_directory
55
- can be Proc objects.
56
-
57
- 2012-01-27 Mike Burns <mburns@thoughtbot.com>
58
-
59
- * lib/paperclip/version.rb: Bump to 2.5.1.
60
-
61
- 2012-01-20 Jon Yurek <jyurek@thoughtbot.com>
62
-
63
- * lib/paperclip/railtie.rb (insert): Hide ActiveRecord-specific stuff in
64
- the Railtie
65
-
66
- 2012-01-18 Luke Griffiths <wlgriffiths@gmail.com>
67
-
68
- * lib/paperclip/storage/s3.rb (self.extended),
69
- test/storage/s3_live_test.rb, test/storage/s3_test.rb: Add S3 encryption
70
-
71
- 2012-01-16 Jeremy McNevin <jeremy.mcnevin@thedolancompany.com> and ralph <ralph@rvdh.de>
72
-
73
- * lib/paperclip/storage/fog.rb (flush_writes), fog_test.rb: Pass the
74
- content type to Fog.