paperclip 3.0.3 → 3.5.1

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.

Files changed (121) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +2 -1
  3. data/.travis.yml +3 -0
  4. data/Appraisals +8 -3
  5. data/Gemfile +1 -1
  6. data/LICENSE +1 -1
  7. data/NEWS +198 -35
  8. data/README.md +332 -113
  9. data/features/basic_integration.feature +24 -12
  10. data/features/migration.feature +94 -0
  11. data/features/rake_tasks.feature +2 -3
  12. data/features/step_definitions/attachment_steps.rb +28 -0
  13. data/features/step_definitions/rails_steps.rb +94 -8
  14. data/features/step_definitions/s3_steps.rb +1 -1
  15. data/features/step_definitions/web_steps.rb +3 -3
  16. data/features/support/fakeweb.rb +4 -1
  17. data/features/support/file_helpers.rb +10 -0
  18. data/features/support/rails.rb +18 -2
  19. data/gemfiles/3.0.gemfile +2 -2
  20. data/gemfiles/3.1.gemfile +2 -2
  21. data/gemfiles/3.2.gemfile +2 -2
  22. data/gemfiles/4.0.gemfile +11 -0
  23. data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +4 -8
  24. data/lib/paperclip/attachment.rb +96 -43
  25. data/lib/paperclip/attachment_registry.rb +57 -0
  26. data/lib/paperclip/callbacks.rb +2 -2
  27. data/lib/paperclip/content_type_detector.rb +78 -0
  28. data/lib/paperclip/file_command_content_type_detector.rb +32 -0
  29. data/lib/paperclip/filename_cleaner.rb +16 -0
  30. data/lib/paperclip/geometry.rb +66 -30
  31. data/lib/paperclip/geometry_detector_factory.rb +41 -0
  32. data/lib/paperclip/geometry_parser_factory.rb +31 -0
  33. data/lib/paperclip/glue.rb +2 -8
  34. data/lib/paperclip/has_attached_file.rb +99 -0
  35. data/lib/paperclip/helpers.rb +12 -15
  36. data/lib/paperclip/interpolations/plural_cache.rb +17 -0
  37. data/lib/paperclip/interpolations.rb +15 -5
  38. data/lib/paperclip/io_adapters/abstract_adapter.rb +45 -0
  39. data/lib/paperclip/io_adapters/attachment_adapter.rb +14 -49
  40. data/lib/paperclip/io_adapters/data_uri_adapter.rb +27 -0
  41. data/lib/paperclip/io_adapters/empty_string_adapter.rb +18 -0
  42. data/lib/paperclip/io_adapters/file_adapter.rb +8 -69
  43. data/lib/paperclip/io_adapters/identity_adapter.rb +1 -1
  44. data/lib/paperclip/io_adapters/nil_adapter.rb +2 -2
  45. data/lib/paperclip/io_adapters/stringio_adapter.rb +16 -45
  46. data/lib/paperclip/io_adapters/uploaded_file_adapter.rb +17 -40
  47. data/lib/paperclip/io_adapters/uri_adapter.rb +44 -0
  48. data/lib/paperclip/matchers/have_attached_file_matcher.rb +1 -5
  49. data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +36 -17
  50. data/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +5 -1
  51. data/lib/paperclip/matchers.rb +3 -3
  52. data/lib/paperclip/missing_attachment_styles.rb +11 -16
  53. data/lib/paperclip/processor.rb +12 -0
  54. data/lib/paperclip/railtie.rb +5 -1
  55. data/lib/paperclip/schema.rb +59 -23
  56. data/lib/paperclip/storage/filesystem.rb +23 -5
  57. data/lib/paperclip/storage/fog.rb +64 -25
  58. data/lib/paperclip/storage/s3.rb +93 -52
  59. data/lib/paperclip/style.rb +2 -2
  60. data/lib/paperclip/tempfile_factory.rb +21 -0
  61. data/lib/paperclip/thumbnail.rb +18 -3
  62. data/lib/paperclip/validators/attachment_content_type_validator.rb +38 -10
  63. data/lib/paperclip/validators/attachment_presence_validator.rb +8 -8
  64. data/lib/paperclip/validators/attachment_size_validator.rb +12 -7
  65. data/lib/paperclip/validators.rb +21 -2
  66. data/lib/paperclip/version.rb +1 -1
  67. data/lib/paperclip.rb +15 -44
  68. data/lib/tasks/paperclip.rake +26 -7
  69. data/paperclip.gemspec +11 -7
  70. data/test/attachment_definitions_test.rb +12 -0
  71. data/test/attachment_processing_test.rb +83 -0
  72. data/test/attachment_registry_test.rb +77 -0
  73. data/test/attachment_test.rb +253 -44
  74. data/test/content_type_detector_test.rb +50 -0
  75. data/test/file_command_content_type_detector_test.rb +25 -0
  76. data/test/filename_cleaner_test.rb +14 -0
  77. data/test/fixtures/animated +0 -0
  78. data/test/fixtures/animated.unknown +0 -0
  79. data/test/fixtures/rotated.jpg +0 -0
  80. data/test/generator_test.rb +26 -24
  81. data/test/geometry_detector_test.rb +24 -0
  82. data/test/geometry_parser_test.rb +73 -0
  83. data/test/geometry_test.rb +55 -4
  84. data/test/has_attached_file_test.rb +125 -0
  85. data/test/helper.rb +38 -7
  86. data/test/integration_test.rb +105 -89
  87. data/test/interpolations_test.rb +12 -0
  88. data/test/io_adapters/abstract_adapter_test.rb +58 -0
  89. data/test/io_adapters/attachment_adapter_test.rb +120 -33
  90. data/test/io_adapters/data_uri_adapter_test.rb +60 -0
  91. data/test/io_adapters/empty_string_adapter_test.rb +17 -0
  92. data/test/io_adapters/file_adapter_test.rb +32 -1
  93. data/test/io_adapters/stringio_adapter_test.rb +29 -10
  94. data/test/io_adapters/uploaded_file_adapter_test.rb +53 -5
  95. data/test/io_adapters/uri_adapter_test.rb +102 -0
  96. data/test/matchers/validate_attachment_presence_matcher_test.rb +22 -0
  97. data/test/meta_class_test.rb +32 -0
  98. data/test/paperclip_missing_attachment_styles_test.rb +4 -8
  99. data/test/paperclip_test.rb +27 -51
  100. data/test/plural_cache_test.rb +36 -0
  101. data/test/processor_test.rb +16 -0
  102. data/test/rake_test.rb +103 -0
  103. data/test/schema_test.rb +179 -77
  104. data/test/storage/filesystem_test.rb +26 -3
  105. data/test/storage/fog_test.rb +181 -3
  106. data/test/storage/s3_test.rb +239 -4
  107. data/test/style_test.rb +18 -14
  108. data/test/tempfile_factory_test.rb +13 -0
  109. data/test/thumbnail_test.rb +96 -16
  110. data/test/validators/attachment_content_type_validator_test.rb +181 -55
  111. data/test/validators/attachment_size_validator_test.rb +10 -0
  112. data/test/validators_test.rb +8 -1
  113. metadata +126 -92
  114. data/Gemfile.lock +0 -157
  115. data/features/support/fixtures/.boot_config.rb.swo +0 -0
  116. data/images.rake +0 -21
  117. data/lib/.DS_Store +0 -0
  118. data/lib/paperclip/.DS_Store +0 -0
  119. data/lib/paperclip/attachment_options.rb +0 -9
  120. data/lib/paperclip/instance_methods.rb +0 -35
  121. data/test/attachment_options_test.rb +0 -27
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDk3MDQ5M2FjY2Q3OTIzMDQzNTg4YzE3OGMwMTU1YTBiZGM0ZDVmNg==
5
+ data.tar.gz: !binary |-
6
+ MDkwNWQ0M2I2MzAwMDk0NDA4NDdhZDM0ZTFiODg3MjZlY2ZmYTU1NA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ Y2U4ZDI0Y2Q3MGE2NTJmZTQ5MDZlODJiZDIzOTJlNjM5MDAwZDI5Yjk5NmYx
10
+ MWRmNjc1YjQ3MmI2YzMwMzU2ODIwZGI2NTcyZjNhY2I3YWVhOWViNTZmOTZj
11
+ Yjc1ZDI1OTExNWE3MTgxN2Y2Nzc5YzdjODU1ZjA1ZDk3ZjNjOGM=
12
+ data.tar.gz: !binary |-
13
+ Y2RkZGY4MjViZTVjOTczMmRiZTNjYjBhYzMyNTRkODczOWVkMjdmMzU0ZDY0
14
+ ZmRkNGNiNGM2MjRkMmNjYTU4ODQzZTQwZmY5YmVmMGM1ZmE3NTZiYzRjMzIy
15
+ NDdkY2JkNDFmNTNhNDk0ZjAxNDZhNWNkZDk3ZTU0YjAyNzI5ZDM=
data/.gitignore CHANGED
@@ -5,8 +5,9 @@
5
5
  tmp
6
6
  .DS_Store
7
7
 
8
+ *.log
9
+
8
10
  test/s3.yml
9
- test/debug.log
10
11
  test/paperclip.db
11
12
  test/doc
12
13
  test/pkg
data/.travis.yml CHANGED
@@ -2,6 +2,8 @@ rvm:
2
2
  - 1.9.2
3
3
  - 1.9.3
4
4
  - jruby-19mode
5
+ - rbx-19mode
6
+ - 2.0.0
5
7
 
6
8
  before_script: "sudo ntpdate -ub ntp.ubuntu.com pool.ntp.org; true"
7
9
  script: "bundle exec rake clean test cucumber"
@@ -14,3 +16,4 @@ gemfile:
14
16
  matrix:
15
17
  allow_failures:
16
18
  - rvm: jruby-19mode
19
+ - rvm: rbx-19mode
data/Appraisals CHANGED
@@ -1,14 +1,19 @@
1
1
  appraise "3.0" do
2
- gem "rails", "~> 3.0.12"
2
+ gem "rails", "~> 3.0.15"
3
3
  gem "paperclip", :path => "../"
4
4
  end
5
5
 
6
6
  appraise "3.1" do
7
- gem "rails", "~> 3.1.4"
7
+ gem "rails", "~> 3.1.6"
8
8
  gem "paperclip", :path => "../"
9
9
  end
10
10
 
11
11
  appraise "3.2" do
12
- gem "rails", "~> 3.2.2"
12
+ gem "rails", "~> 3.2.6"
13
+ gem "paperclip", :path => "../"
14
+ end
15
+
16
+ appraise "4.0" do
17
+ gem "rails", "~> 4.0.0"
13
18
  gem "paperclip", :path => "../"
14
19
  end
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
data/LICENSE CHANGED
@@ -3,7 +3,7 @@ LICENSE
3
3
 
4
4
  The MIT License
5
5
 
6
- Copyright (c) 2008 Jon Yurek and thoughtbot, inc.
6
+ Copyright (c) 2008-2013 Jon Yurek and thoughtbot, inc.
7
7
 
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
  of this software and associated documentation files (the "Software"), to deal
data/NEWS CHANGED
@@ -1,13 +1,175 @@
1
+ New in 3.5.1:
2
+
3
+ * Bug Fix: Returned the class-level `attachment_definitions` method for compatability.
4
+ * Improvement: Ensured compatability with Rails 4
5
+ * Improvement: Added Rails 4 to the Appraisals
6
+ * Bug Fix: #1296, where validations were generating errors
7
+ * Improvement: Specify MIT license in the gemspec
8
+
9
+ New in 3.5.0:
10
+
11
+ * Feature: Handle Base64-encoded data URIs as uploads
12
+ * Feature: Add a FilenameCleaner class to allow custom filename sanitation
13
+ * Improvement: Satisfied Mocha deprecation warnings
14
+ * Bug Fix: Allow empty string to be submitted and ignored, as some forms do this
15
+ * Improvement: Make #expiring_url behavior consistent with #url
16
+ * Bug Fix: "Validate" attachments without invoking AR's validations
17
+ * Improvement: Various refactorings for a cleaner codebase
18
+ * Improvement: Be agnostic, use ActiveModel when appropriate
19
+ * Improvement: Add validation errors to the base attachment attribute
20
+ * Improvement: Handle errors in rake tasks
21
+ * Improvement: Largely refactor has_attached_file into a new class
22
+ * Improvement: Added Ruby 2.0.0 as a supported platform and removed 1.8.7
23
+ * Improvement: Fixed some incompatabilities in the test suite
24
+
25
+ New in 3.4.2:
26
+
27
+ * Improvement: Use https for Gemfile urls
28
+ * Improvement: Updated and more correct documentation
29
+ * Improvement: Use the -optimize flag on animated GIFs
30
+ * Improvement: Remove the Gemfile.lock
31
+ * Improvement: Add #expiring_url as an alias for #url until the storage defines it
32
+ * Improvement: Remove path clash checking, as it's unnecessary
33
+ * Bug Fix: Do not rely on checking version numbers for aws-sdk
34
+
35
+ New in 3.4.1:
36
+
37
+ * Improvement: Various documentation fixes and improvements
38
+ * Bug Fix: Clearing an attachment with `preserve_files` on should still clear the attachment
39
+ * Bug Fix: Instances are #changed? when a new file is assigned
40
+ * Bug Fix: Correctly deal with S3 styles when using a lambda
41
+ * Improvement: Accept and pass :credential_provider option to AWS-SDK
42
+ * Bug Fix: Sanitize original_filename more correctly in IO Adapters
43
+ * Improvement: s3_host_name can be a lambda
44
+ * Improvement: Cache some interpolations for speed
45
+ * Improvement: Update to latest cocaine
46
+ * Improvement: Update copyrights, various typos
47
+
48
+ New in 3.4.0:
49
+
50
+ * Bug Fix: Allow UploadedFileAdapter to force the use of `file`
51
+ * Bug Fix: Close the file handle when dealing with URIs
52
+ * Bug Fix: Ensure files are closed for writing when we're done.
53
+ * Bug Fix: Fixed 'type' being nil on Windows 7 error.
54
+ * Bug Fix: Fixed nil access when no s3 headers are defined
55
+ * Bug Fix: Fixes auto_orientation
56
+ * Bug Fix: Prevent a missing method error when switching from aws_sdk to fog
57
+ * Bug Fix: Properly fail to process invalid attachments
58
+ * Bug Fix: Server-side encryption is specified correctly
59
+ * Bug Fix: fog_public returned to true by default
60
+ * Bug Fix: Check attachment paths for duplicates, not URLs
61
+ * Feature: Add Attachment#blank?
62
+ * Feature: Add support for blacklisting certain content_types
63
+ * Feature: Add support for style-specific s3 headers and meta data
64
+ * Feature: Allow only_process to be a lambda
65
+ * Feature: Allow setting of escape url as a default option
66
+ * Feature: Create :override_file_permissions option for filesystem attachments
67
+ * Improvement: Add Attachment#as_json
68
+ * Improvement: Evaluate lambdas for fog_file properties
69
+ * Improvement: Extract geometry parsing into factories
70
+ * Improvement: Fixed various typos
71
+ * Improvement: Refactored some tests
72
+ * Improvement: Reuse S3 connections
73
+
74
+ New In 3.3.1:
75
+
76
+ * Bug Fix: Moved Filesystem's copy_to_local_file to the right place.
77
+
78
+ New in 3.3.0:
79
+
80
+ * Improvement: Upgrade cocaine to 0.4
81
+
82
+ New in 3.2.0:
83
+
84
+ * Bug Fix: Use the new correct Amazon S3 encryption header.
85
+ * Bug Fix: The rake task respects the updated_at column.
86
+ * Bug Fix: Strip newline from content type.
87
+ * Feature: Fog file visibility can be specified per style.
88
+ * Feature: Automatically rotate images.
89
+ * Feature: Reduce class-oriented programming of the attachment definitions.
90
+
91
+ New in 3.1.4:
92
+
93
+ * Bug Fix: Allow user to be able to set path without `:style` attribute and not raising an error.
94
+ This is a regression introduced in 3.1.3, and that feature will be postponed to another minor
95
+ release instead.
96
+ * Feature: Allow for URI Adapter as an optional paperclip io adapter.
97
+
98
+ New in 3.1.3:
99
+
100
+ * Bug Fix: Copy empty attachment between instances is now working.
101
+ * Bug Fix: Correctly rescue Fog error.
102
+ * Bug Fix: Using default path and url options in Fog storage now work as expected.
103
+ * Bug Fix: `Attachment#s3_protocol` now returns a protocol without colon suffix.
104
+ * Feature: Paperclip will now raise an error if multiple styles are defined but no `:style`
105
+ interpolation exists in `:path`.
106
+ * Feature: Add support for `#{attachment}_created_at` field
107
+ * Bug Fix: Paperclip now gracefully handles msising file command.
108
+ * Bug Fix: `StringIOAdapter` now accepts content type.
109
+
110
+ New in 3.1.2:
111
+
112
+ * Bug Fix: #remove_attachment on 3.1.0 and 3.1.1 mistakenly trying to remove the column that has
113
+ the same name as data type (such as :string, :datetime, :interger.) You're advised to update to
114
+ Paperclip 3.1.2 as soon as possible.
115
+
116
+ New in 3.1.1:
117
+
118
+ * Bug Fix: Paperclip will only load Paperclip::Schema only when Active Record is available.
119
+
120
+ New in 3.1.0:
121
+
122
+ * Feature: Paperclip now support new migration syntax (sexy migration) that reads better:
123
+
124
+ class AddAttachmentToUsers < ActiveRecord::Migration
125
+ def self.up
126
+ create_table :users do |t|
127
+ t.attachment :avatar
128
+ end
129
+ end
130
+ end
131
+
132
+ Also, schema-definition level syntax has been added:
133
+
134
+ add_attachment :users, :avatar
135
+ remove_attachment :users, :avatar
136
+
137
+ * Feature: Migration now support Rails 3.2+ `change` method.
138
+ * API CHANGE: Old `t.has_attached_file` and `drop_attached_file` are now deprecated. You're advised
139
+ to update your migration file before the next MAJOR version.
140
+ * Bug Fix: Tempfile now rewinded before generating fingerprint
141
+ * API CHANGE: Tempfiles are now unlinked after `after_flush_writes`
142
+
143
+ If you need to interact with the generated tempfiles, please define an `after_flush_writes` method
144
+ in your model. You'll be able to access files via `@queue_for_write` instance variable.
145
+
146
+ * Bug Fix: `:s3_protocol` can now be defined as either String or Symbol
147
+ * Bug Fix: Tempfiles are now rewinded before get passed into `after_flush_writes`
148
+ * Feature: Added expiring_url method to Fog Storage
149
+ * API CHANGE: Paperclip now tested against AWS::SDK 1.5.2 onward
150
+ * Bug Fix: Improved the output of the content_type validator so the actual failure is displayed
151
+ * Feature: Animated formats now identified using ImageMagick.
152
+ * Feature: AttachmentAdapter now support fetching attachment with specific style.
153
+ * Feature: Paperclip default options can now be configured in Rails.configuration.
154
+ * Feature: add Geometry#resize_to to calculate dimensions of new source.
155
+ * Bug Fix: Fixed a bug whereby a file type with multiple mime types but no official type would cause
156
+ the best_content_type to throw an error on trying nil.content_type.
157
+ * Bug Fix: Fix problem when the gem cannot be installed on the system that has Asepsis installed.
158
+
159
+ New in 3.0.4:
160
+
161
+ * Feature: Adds support for S3 scheme-less URL generation.
162
+
1
163
  New in 3.0.3:
2
164
 
3
- * Bug fix: ThumbnailProcessor now correctly detects and preserve animated GIF.
4
- * Bug fix: File extension is now preserved in generated Tempfile from adapter.
5
- * Bug fix: Uploading file with unicode file name now won't raise an error when
165
+ * Bug Fix: ThumbnailProcessor now correctly detects and preserve animated GIF.
166
+ * Bug Fix: File extension is now preserved in generated Tempfile from adapter.
167
+ * Bug Fix: Uploading file with unicode file name now won't raise an error when
6
168
  logging in the AWS is turned on.
7
- * Bug fix: Task "paperclip:refresh:missing_styles" now work correctly.
8
- * Bug fix: Handle the case when :restricted_characters is nil.
9
- * Bug fix: Don't delete all the existing styles if we reprocess.
10
- * Bug fix: Content type is now ensured to not having a new line character.
169
+ * Bug Fix: Task "paperclip:refresh:missing_styles" now work correctly.
170
+ * Bug Fix: Handle the case when :restricted_characters is nil.
171
+ * Bug Fix: Don't delete all the existing styles if we reprocess.
172
+ * Bug Fix: Content type is now ensured to not having a new line character.
11
173
  * API CHANGE: Non-Rails usage should include Paperclip::Glue directly.
12
174
 
13
175
  `Paperclip::Railtie` was intended to be used with Ruby on Rails only. If you're
@@ -16,24 +178,25 @@ New in 3.0.3:
16
178
 
17
179
  ActiveRecord::Base.send :include, Paperclip::Glue
18
180
 
19
- * Bug fix: AttachmentContentTypeValidator now allow you to specify :allow_blank/:allow_nil
20
- * Bug fix: Make sure content type always a String.
21
- * Bug fix: Fix attachment.reprocess! when using storage providers fog and s3.
22
- * Bug fix: Fix a problem with incorrect content_type detected with 'file' command for an empty file on Mac.
181
+ * Bug Fix: AttachmentContentTypeValidator now allow you to specify :allow_blank/:allow_nil
182
+ * Bug Fix: Make sure content type always a String.
183
+ * Bug Fix: Fix attachment.reprocess! when using storage providers fog and s3.
184
+ * Bug Fix: Fix a problem with incorrect content_type detected with 'file' command for an empty file on Mac.
23
185
 
24
186
  New in 3.0.2:
25
187
 
26
188
  * API CHANGE: Generated migration class name is now plural (AddAttachmentToUsers instead of AddAttachmentToUser)
27
189
  * API CHANGE: Remove Rails plugin initialization code.
28
190
  * API CHANGE: Explicitly require Ruby 1.9.2 in the Gemfile.
29
- * Bug fix: Fixes AWS::S3::Errors::RequestTimeout on Model#save.
30
- * Bug fix: Fix a problem when there's no logger specified.
31
- * Bug fix: Fix a problem when attaching Rack::Test::UploadedFile instance.
191
+ * Bug Fix: Fixes AWS::S3::Errors::RequestTimeout on Model#save.
192
+ * Bug Fix: Fix a problem when there's no logger specified.
193
+ * Bug Fix: Fix a problem when attaching Rack::Test::UploadedFile instance.
32
194
 
33
195
  New in 3.0.1:
34
196
 
35
197
  * Feature: Introduce Paperlip IO adapter.
36
- * Bug fix: Regression in AttachmentContentTypeValidator has been fixed.
198
+ * Bug Fix: Regression in AttachmentContentTypeValidator has been fixed.
199
+ * API CHANGE: #to_file has been removed. Use the #copy_to_local_file method instead.
37
200
 
38
201
  New in 3.0.0:
39
202
 
@@ -49,29 +212,29 @@ New in 3.0.0:
49
212
  :url => "/system/:attachment/:id/:style/:filename"
50
213
 
51
214
  * Feature: Adding Rails 3 style validators, and adding `validates_attachment` method as a shorthand.
52
- * Bug fix: Paperclip's rake tasks now loading records in batch.
53
- * Bug fix: Attachment style name with leading number now not raising an error.
54
- * Bug fix: File given to S3 and Fog storage will now be rewinded after flush_write.
215
+ * Bug Fix: Paperclip's rake tasks now loading records in batch.
216
+ * Bug Fix: Attachment style name with leading number now not raising an error.
217
+ * Bug Fix: File given to S3 and Fog storage will now be rewinded after flush_write.
55
218
  * Feature: You can now pass addional parameter to S3 expiring URL, such as :content_type.
56
219
 
57
220
  New in 2.7.0:
58
221
 
59
- * Bug fix: Checking the existence of a file on S3 handles all AWS errors.
60
- * Bug fix: Clear the fingerprint when removing an attachment.
61
- * Bug fix: Attachment size validation message reads more nicely now.
222
+ * Bug Fix: Checking the existence of a file on S3 handles all AWS errors.
223
+ * Bug Fix: Clear the fingerprint when removing an attachment.
224
+ * Bug Fix: Attachment size validation message reads more nicely now.
62
225
  * Feature: Style names can be either symbols or strings.
63
226
  * Compatibility: Support for ActiveSupport < 2.3.12.
64
227
  * Compatibility: Support for Rails 3.2.
65
228
 
66
229
  New in 2.6.0:
67
230
 
68
- * Bug fix: Files are re-wound after reading.
231
+ * Bug Fix: Files are re-wound after reading.
69
232
  * Feature: Remove Rails dependency from specs that need Paperclip.
70
233
  * Feature: Validation matchers support conditionals.
71
234
 
72
235
  New in 2.5.2:
73
236
 
74
- * Bug fix: Can be installed on Windows.
237
+ * Bug Fix: Can be installed on Windows.
75
238
  * Feature: The Fog bucket name, authentication, and host can be determined at runtime via Proc.
76
239
  * Feature: Special characters are replaced with underscores in #url and #path.
77
240
 
@@ -84,23 +247,23 @@ New in 2.5.1:
84
247
  New in 2.5.0:
85
248
 
86
249
  * Performance: Only connect to S3 when absolutely needed.
87
- * Bug fix: STI with cached classes respect new options.
88
- * Bug fix: conditional validations broke, and now work again.
250
+ * Bug Fix: STI with cached classes respect new options.
251
+ * Bug Fix: conditional validations broke, and now work again.
89
252
  * Feature: URL generation is now parameterized and can be changed with plugins or custom code.
90
253
  * Feature: :convert_options and :source_file_options to control the ImageMagick processing.
91
254
  * Performance: String geometry specifications now parse more quickly.
92
- * Bug fix: Handle files with question marks in the filename.
93
- * Bug fix: Don't raise an error when generating an expiring URL on an unassigned attachment.
94
- * Bug fix: The rake task runs over all instances of an ActiveRecord model, ignoring default scopes.
255
+ * Bug Fix: Handle files with question marks in the filename.
256
+ * Bug Fix: Don't raise an error when generating an expiring URL on an unassigned attachment.
257
+ * Bug Fix: The rake task runs over all instances of an ActiveRecord model, ignoring default scopes.
95
258
  * Feature: DB migration has_attached_file and drop_attached_file methods.
96
- * Bug fix: Switch from AWS::S3 to AWS::SDK for the S3 backend.
97
- * Bug fix: URL generator uses '?' in the URL unless it already appears and there is no prior '='.
98
- * Bug fix: Always convert the content type to a string before stripping blanks.
259
+ * Bug Fix: Switch from AWS::S3 to AWS::SDK for the S3 backend.
260
+ * Bug Fix: URL generator uses '?' in the URL unless it already appears and there is no prior '='.
261
+ * Bug Fix: Always convert the content type to a string before stripping blanks.
99
262
  * Feature: The :keep_old_files option preserves the files in storage even when the attachment is cleared or changed.
100
263
  * Performance: Optimize Fog's public_url access by avoiding it when possible.
101
- * Bug fix: Avoid a runtime error when generating the ID partition for an unsaved attachment.
264
+ * Bug Fix: Avoid a runtime error when generating the ID partition for an unsaved attachment.
102
265
  * Performance: Do not calculate the fingerprint if it is never persisted.
103
- * Bug fix: Process the :original style before all others, in case of a dependency.
266
+ * Bug Fix: Process the :original style before all others, in case of a dependency.
104
267
  * Feature: S3 headers can be set at runtime by passing a proc object as the value.
105
- * Bug fix: Generating missing attachment styles for a model which has had its attachment changed should not raise.
106
- * Bug fix: Do not collide with the built-in Ruby hashing method.
268
+ * Bug Fix: Generating missing attachment styles for a model which has had its attachment changed should not raise.
269
+ * Bug Fix: Do not collide with the built-in Ruby hashing method.