kt-paperclip 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +17 -0
  3. data/.github/issue_template.md +3 -0
  4. data/.gitignore +19 -0
  5. data/.hound.yml +1050 -0
  6. data/.rubocop.yml +1 -0
  7. data/.travis.yml +47 -0
  8. data/Appraisals +24 -0
  9. data/CONTRIBUTING.md +86 -0
  10. data/Gemfile +18 -0
  11. data/LICENSE +24 -0
  12. data/NEWS +515 -0
  13. data/README.md +1053 -0
  14. data/RELEASING.md +17 -0
  15. data/Rakefile +52 -0
  16. data/UPGRADING +17 -0
  17. data/features/basic_integration.feature +85 -0
  18. data/features/migration.feature +29 -0
  19. data/features/rake_tasks.feature +62 -0
  20. data/features/step_definitions/attachment_steps.rb +110 -0
  21. data/features/step_definitions/html_steps.rb +15 -0
  22. data/features/step_definitions/rails_steps.rb +257 -0
  23. data/features/step_definitions/s3_steps.rb +14 -0
  24. data/features/step_definitions/web_steps.rb +106 -0
  25. data/features/support/env.rb +12 -0
  26. data/features/support/fakeweb.rb +11 -0
  27. data/features/support/file_helpers.rb +34 -0
  28. data/features/support/fixtures/boot_config.txt +15 -0
  29. data/features/support/fixtures/gemfile.txt +5 -0
  30. data/features/support/fixtures/preinitializer.txt +20 -0
  31. data/features/support/paths.rb +28 -0
  32. data/features/support/rails.rb +39 -0
  33. data/features/support/selectors.rb +19 -0
  34. data/gemfiles/4.2.gemfile +20 -0
  35. data/gemfiles/5.0.gemfile +20 -0
  36. data/gemfiles/5.1.gemfile +20 -0
  37. data/gemfiles/5.2.gemfile +20 -0
  38. data/gemfiles/6.0.gemfile +20 -0
  39. data/lib/generators/paperclip/USAGE +8 -0
  40. data/lib/generators/paperclip/paperclip_generator.rb +36 -0
  41. data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +15 -0
  42. data/lib/paperclip.rb +215 -0
  43. data/lib/paperclip/attachment.rb +617 -0
  44. data/lib/paperclip/attachment_registry.rb +60 -0
  45. data/lib/paperclip/callbacks.rb +42 -0
  46. data/lib/paperclip/content_type_detector.rb +80 -0
  47. data/lib/paperclip/errors.rb +34 -0
  48. data/lib/paperclip/file_command_content_type_detector.rb +28 -0
  49. data/lib/paperclip/filename_cleaner.rb +15 -0
  50. data/lib/paperclip/geometry.rb +157 -0
  51. data/lib/paperclip/geometry_detector_factory.rb +45 -0
  52. data/lib/paperclip/geometry_parser_factory.rb +31 -0
  53. data/lib/paperclip/glue.rb +17 -0
  54. data/lib/paperclip/has_attached_file.rb +116 -0
  55. data/lib/paperclip/helpers.rb +60 -0
  56. data/lib/paperclip/interpolations.rb +201 -0
  57. data/lib/paperclip/interpolations/plural_cache.rb +18 -0
  58. data/lib/paperclip/io_adapters/abstract_adapter.rb +75 -0
  59. data/lib/paperclip/io_adapters/attachment_adapter.rb +47 -0
  60. data/lib/paperclip/io_adapters/data_uri_adapter.rb +22 -0
  61. data/lib/paperclip/io_adapters/empty_string_adapter.rb +19 -0
  62. data/lib/paperclip/io_adapters/file_adapter.rb +26 -0
  63. data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +16 -0
  64. data/lib/paperclip/io_adapters/identity_adapter.rb +17 -0
  65. data/lib/paperclip/io_adapters/nil_adapter.rb +37 -0
  66. data/lib/paperclip/io_adapters/registry.rb +36 -0
  67. data/lib/paperclip/io_adapters/stringio_adapter.rb +36 -0
  68. data/lib/paperclip/io_adapters/uploaded_file_adapter.rb +44 -0
  69. data/lib/paperclip/io_adapters/uri_adapter.rb +68 -0
  70. data/lib/paperclip/locales/en.yml +18 -0
  71. data/lib/paperclip/logger.rb +21 -0
  72. data/lib/paperclip/matchers.rb +64 -0
  73. data/lib/paperclip/matchers/have_attached_file_matcher.rb +54 -0
  74. data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +101 -0
  75. data/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +59 -0
  76. data/lib/paperclip/matchers/validate_attachment_size_matcher.rb +97 -0
  77. data/lib/paperclip/media_type_spoof_detector.rb +90 -0
  78. data/lib/paperclip/missing_attachment_styles.rb +84 -0
  79. data/lib/paperclip/processor.rb +56 -0
  80. data/lib/paperclip/processor_helpers.rb +52 -0
  81. data/lib/paperclip/rails_environment.rb +21 -0
  82. data/lib/paperclip/railtie.rb +31 -0
  83. data/lib/paperclip/schema.rb +81 -0
  84. data/lib/paperclip/storage.rb +3 -0
  85. data/lib/paperclip/storage/filesystem.rb +99 -0
  86. data/lib/paperclip/storage/fog.rb +252 -0
  87. data/lib/paperclip/storage/s3.rb +461 -0
  88. data/lib/paperclip/style.rb +106 -0
  89. data/lib/paperclip/tempfile.rb +42 -0
  90. data/lib/paperclip/tempfile_factory.rb +22 -0
  91. data/lib/paperclip/thumbnail.rb +131 -0
  92. data/lib/paperclip/url_generator.rb +76 -0
  93. data/lib/paperclip/validators.rb +73 -0
  94. data/lib/paperclip/validators/attachment_content_type_validator.rb +88 -0
  95. data/lib/paperclip/validators/attachment_file_name_validator.rb +75 -0
  96. data/lib/paperclip/validators/attachment_file_type_ignorance_validator.rb +28 -0
  97. data/lib/paperclip/validators/attachment_presence_validator.rb +28 -0
  98. data/lib/paperclip/validators/attachment_size_validator.rb +109 -0
  99. data/lib/paperclip/validators/media_type_spoof_detection_validator.rb +29 -0
  100. data/lib/paperclip/version.rb +3 -0
  101. data/lib/tasks/paperclip.rake +140 -0
  102. data/paperclip.gemspec +50 -0
  103. data/shoulda_macros/paperclip.rb +134 -0
  104. data/spec/database.yml +4 -0
  105. data/spec/paperclip/attachment_definitions_spec.rb +13 -0
  106. data/spec/paperclip/attachment_processing_spec.rb +79 -0
  107. data/spec/paperclip/attachment_registry_spec.rb +158 -0
  108. data/spec/paperclip/attachment_spec.rb +1590 -0
  109. data/spec/paperclip/content_type_detector_spec.rb +47 -0
  110. data/spec/paperclip/file_command_content_type_detector_spec.rb +40 -0
  111. data/spec/paperclip/filename_cleaner_spec.rb +13 -0
  112. data/spec/paperclip/geometry_detector_spec.rb +38 -0
  113. data/spec/paperclip/geometry_parser_spec.rb +73 -0
  114. data/spec/paperclip/geometry_spec.rb +255 -0
  115. data/spec/paperclip/glue_spec.rb +42 -0
  116. data/spec/paperclip/has_attached_file_spec.rb +78 -0
  117. data/spec/paperclip/integration_spec.rb +702 -0
  118. data/spec/paperclip/interpolations_spec.rb +270 -0
  119. data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +160 -0
  120. data/spec/paperclip/io_adapters/attachment_adapter_spec.rb +140 -0
  121. data/spec/paperclip/io_adapters/data_uri_adapter_spec.rb +88 -0
  122. data/spec/paperclip/io_adapters/empty_string_adapter_spec.rb +17 -0
  123. data/spec/paperclip/io_adapters/file_adapter_spec.rb +131 -0
  124. data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +137 -0
  125. data/spec/paperclip/io_adapters/identity_adapter_spec.rb +8 -0
  126. data/spec/paperclip/io_adapters/nil_adapter_spec.rb +25 -0
  127. data/spec/paperclip/io_adapters/registry_spec.rb +35 -0
  128. data/spec/paperclip/io_adapters/stringio_adapter_spec.rb +64 -0
  129. data/spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb +146 -0
  130. data/spec/paperclip/io_adapters/uri_adapter_spec.rb +221 -0
  131. data/spec/paperclip/matchers/have_attached_file_matcher_spec.rb +19 -0
  132. data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +108 -0
  133. data/spec/paperclip/matchers/validate_attachment_presence_matcher_spec.rb +69 -0
  134. data/spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb +88 -0
  135. data/spec/paperclip/media_type_spoof_detector_spec.rb +120 -0
  136. data/spec/paperclip/meta_class_spec.rb +30 -0
  137. data/spec/paperclip/paperclip_missing_attachment_styles_spec.rb +88 -0
  138. data/spec/paperclip/paperclip_spec.rb +196 -0
  139. data/spec/paperclip/plural_cache_spec.rb +37 -0
  140. data/spec/paperclip/processor_helpers_spec.rb +57 -0
  141. data/spec/paperclip/processor_spec.rb +26 -0
  142. data/spec/paperclip/rails_environment_spec.rb +30 -0
  143. data/spec/paperclip/rake_spec.rb +103 -0
  144. data/spec/paperclip/schema_spec.rb +252 -0
  145. data/spec/paperclip/storage/filesystem_spec.rb +79 -0
  146. data/spec/paperclip/storage/fog_spec.rb +560 -0
  147. data/spec/paperclip/storage/s3_live_spec.rb +188 -0
  148. data/spec/paperclip/storage/s3_spec.rb +1695 -0
  149. data/spec/paperclip/style_spec.rb +251 -0
  150. data/spec/paperclip/tempfile_factory_spec.rb +33 -0
  151. data/spec/paperclip/tempfile_spec.rb +35 -0
  152. data/spec/paperclip/thumbnail_spec.rb +504 -0
  153. data/spec/paperclip/url_generator_spec.rb +221 -0
  154. data/spec/paperclip/validators/attachment_content_type_validator_spec.rb +322 -0
  155. data/spec/paperclip/validators/attachment_file_name_validator_spec.rb +159 -0
  156. data/spec/paperclip/validators/attachment_presence_validator_spec.rb +85 -0
  157. data/spec/paperclip/validators/attachment_size_validator_spec.rb +235 -0
  158. data/spec/paperclip/validators/media_type_spoof_detection_validator_spec.rb +48 -0
  159. data/spec/paperclip/validators_spec.rb +164 -0
  160. data/spec/spec_helper.rb +45 -0
  161. data/spec/support/assertions.rb +84 -0
  162. data/spec/support/fake_model.rb +24 -0
  163. data/spec/support/fake_rails.rb +12 -0
  164. data/spec/support/fixtures/12k.png +0 -0
  165. data/spec/support/fixtures/50x50.png +0 -0
  166. data/spec/support/fixtures/5k.png +0 -0
  167. data/spec/support/fixtures/animated +0 -0
  168. data/spec/support/fixtures/animated.gif +0 -0
  169. data/spec/support/fixtures/animated.unknown +0 -0
  170. data/spec/support/fixtures/bad.png +1 -0
  171. data/spec/support/fixtures/empty.html +1 -0
  172. data/spec/support/fixtures/empty.xlsx +0 -0
  173. data/spec/support/fixtures/fog.yml +8 -0
  174. data/spec/support/fixtures/rotated.jpg +0 -0
  175. data/spec/support/fixtures/s3.yml +8 -0
  176. data/spec/support/fixtures/spaced file.jpg +0 -0
  177. data/spec/support/fixtures/spaced file.png +0 -0
  178. data/spec/support/fixtures/text.txt +1 -0
  179. data/spec/support/fixtures/twopage.pdf +0 -0
  180. data/spec/support/fixtures/uppercase.PNG +0 -0
  181. data/spec/support/matchers/accept.rb +5 -0
  182. data/spec/support/matchers/exist.rb +5 -0
  183. data/spec/support/matchers/have_column.rb +23 -0
  184. data/spec/support/mock_attachment.rb +24 -0
  185. data/spec/support/mock_interpolator.rb +24 -0
  186. data/spec/support/mock_url_generator_builder.rb +26 -0
  187. data/spec/support/model_reconstruction.rb +72 -0
  188. data/spec/support/reporting.rb +11 -0
  189. data/spec/support/test_data.rb +13 -0
  190. data/spec/support/version_helper.rb +9 -0
  191. metadata +586 -0
@@ -0,0 +1 @@
1
+ inherit_from: .hound.yml
@@ -0,0 +1,47 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
10
+
11
+ script: "bundle exec rake clean spec cucumber"
12
+
13
+ addons:
14
+ apt:
15
+ update: true
16
+ packages:
17
+ - ghostscript
18
+
19
+ before_install:
20
+ - sudo rm /etc/ImageMagick-6/policy.xml
21
+
22
+ gemfile:
23
+ - gemfiles/4.2.gemfile
24
+ - gemfiles/5.0.gemfile
25
+ - gemfiles/5.1.gemfile
26
+ - gemfiles/5.2.gemfile
27
+ - gemfiles/6.0.gemfile
28
+
29
+ matrix:
30
+ fast_finish: true
31
+ exclude:
32
+ - gemfile: gemfiles/5.0.gemfile
33
+ rvm: 2.1
34
+ - gemfile: gemfiles/5.1.gemfile
35
+ rvm: 2.1
36
+ - gemfile: gemfiles/5.2.gemfile
37
+ rvm: 2.1
38
+ - gemfile: gemfiles/5.2.gemfile
39
+ rvm: 2.2
40
+ - gemfile: gemfiles/6.0.gemfile
41
+ rvm: 2.1
42
+ - gemfile: gemfiles/6.0.gemfile
43
+ rvm: 2.2
44
+ - gemfile: gemfiles/6.0.gemfile
45
+ rvm: 2.3
46
+ - gemfile: gemfiles/6.0.gemfile
47
+ rvm: 2.4
@@ -0,0 +1,24 @@
1
+ appraise "4.2" do
2
+ gem "sqlite3", "~> 1.3.8", platforms: :ruby
3
+ gem "rails", "~> 4.2.0"
4
+ end
5
+
6
+ appraise "5.0" do
7
+ gem "sqlite3", "~> 1.3.8", platforms: :ruby
8
+ gem "rails", "~> 5.0.0"
9
+ end
10
+
11
+ appraise "5.1" do
12
+ gem "sqlite3", "~> 1.3.8", platforms: :ruby
13
+ gem "rails", "~> 5.1.0"
14
+ end
15
+
16
+ appraise "5.2" do
17
+ gem "sqlite3", "~> 1.3.8", platforms: :ruby
18
+ gem "rails", "~> 5.2.0"
19
+ end
20
+
21
+ appraise "6.0" do
22
+ gem "sqlite3", "~> 1.4", platforms: :ruby
23
+ gem "rails", "~> 6.0.0"
24
+ end
@@ -0,0 +1,86 @@
1
+ Contributing
2
+ ============
3
+
4
+ We love pull requests from everyone. By participating in this project, you agree
5
+ to abide by the thoughtbot [code of conduct].
6
+
7
+ [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
8
+
9
+ Here's a quick guide for contributing:
10
+
11
+ 1. Fork the repo.
12
+
13
+ 1. Make sure you have ImageMagick and Ghostscript installed. See [this section]
14
+ (./README.md#image-processor) of the README.
15
+
16
+ 1. Run the tests. We only take pull requests with passing tests, and it's great
17
+ to know that you have a clean slate: `bundle && bundle exec rake`
18
+
19
+ 1. Add a test for your change. Only refactoring and documentation changes
20
+ require no new tests. If you are adding functionality or fixing a bug, we need
21
+ a test!
22
+
23
+ 1. Make the test pass.
24
+
25
+ 1. Mention how your changes affect the project to other developers and users in
26
+ the `NEWS.md` file.
27
+
28
+ 1. Push to your fork and submit a pull request.
29
+
30
+ At this point you're waiting on us. We like to at least comment on, if not
31
+ accept, pull requests within seven business days (most of the work on Paperclip
32
+ gets done on Fridays). We may suggest some changes or improvements or
33
+ alternatives.
34
+
35
+ Some things that will increase the chance that your pull request is accepted,
36
+ taken straight from the Ruby on Rails guide:
37
+
38
+ * Use Rails idioms and helpers
39
+ * Include tests that fail without your code, and pass with it
40
+ * Update the documentation, the surrounding one, examples elsewhere, guides,
41
+ whatever is affected by your contribution
42
+
43
+ Running Tests
44
+ -------------
45
+
46
+ Paperclip uses [Appraisal](https://github.com/thoughtbot/appraisal) to aid
47
+ testing against multiple version of Ruby on Rails. This helps us to make sure
48
+ that Paperclip performs correctly with them.
49
+
50
+ Paperclip also uses [RSpec](http://rspec.info) for its unit tests. If you submit
51
+ tests that are not written for Cucumber or RSpec without a very good reason, you
52
+ will be asked to rewrite them before we'll accept.
53
+
54
+ ### Bootstrapping your test suite:
55
+
56
+ bundle install
57
+ bundle exec appraisal install
58
+
59
+ This will install all the required gems that requires to test against each
60
+ version of Rails, which defined in `gemfiles/*.gemfile`.
61
+
62
+ ### To run a full test suite:
63
+
64
+ bundle exec appraisal rake
65
+
66
+ This will run RSpec and Cucumber against all version of Rails
67
+
68
+ ### To run single Test::Unit or Cucumber test
69
+
70
+ You need to specify a `BUNDLE_GEMFILE` pointing to the gemfile before running
71
+ the normal test command:
72
+
73
+ BUNDLE_GEMFILE=gemfiles/4.1.gemfile rspec spec/paperclip/attachment_spec.rb
74
+ BUNDLE_GEMFILE=gemfiles/4.1.gemfile cucumber features/basic_integration.feature
75
+
76
+ Syntax
77
+ ------
78
+
79
+ * Two spaces, no tabs.
80
+ * No trailing whitespace. Blank lines should not have any space.
81
+ * Prefer &&/|| over and/or.
82
+ * MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
83
+ * a = b and not a=b.
84
+ * Follow the conventions you see used in the source already.
85
+
86
+ And in case we didn't emphasize it enough: we love tests!
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem "pry"
6
+
7
+ # Hinting at development dependencies
8
+ # Prevents bundler from taking a long-time to resolve
9
+ group :development, :test do
10
+ gem "activerecord-import"
11
+ gem 'bootsnap', require: false
12
+ gem "builder"
13
+ gem 'listen', '~> 3.0.8'
14
+ gem "mime-types"
15
+ gem "rspec"
16
+ gem "rubocop", require: false
17
+ gem "sprockets", "3.7.2"
18
+ end
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+
2
+ LICENSE
3
+
4
+ The MIT License
5
+
6
+ Copyright (c) 2008-2016 Jon Yurek and thoughtbot, inc.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
data/NEWS ADDED
@@ -0,0 +1,515 @@
1
+ 6.1.0 (2018-07-27):
2
+
3
+ * BUGFIX: Don't double-encode URLs (Roderick Monje).
4
+ * BUGFIX: Only use the content_type when it exists (Jean-Philippe Doyle).
5
+ * STABILITY: Better handling of the content-disposition header. Now supports
6
+ file name that is either enclosed or not in double quotes and is case
7
+ insensitive as per RC6266 grammar (Hasan Kumar, Yves Riel).
8
+ * STABILITY: Change database column type of attachment file size from unsigned 4-byte
9
+ `integer` to unsigned 8-byte `bigint`. The former type limits attachment size
10
+ to just over 2GB, which can easily be exceeded by a large video file (Laurent
11
+ Arnoud, Alen Zamanyan).
12
+ * STABILITY: Better error message when thumbnail processing errors (Hayden Ball).
13
+ * STABILITY: Fix file linking issues around Windows (Akihiko Odaki).
14
+ * STABILITY: Files without an extension will now be checked for spoofing attempts
15
+ (George Walters II).
16
+ * STABILITY: Manually close Tempfiles when we are done with them (Erkki Eilonen).
17
+
18
+ 6.0.0 (2018-03-09):
19
+
20
+ * Improvement: Depend only on `aws-sdk-s3` instead of `aws-sdk` (https://github.com/thoughtbot/paperclip/pull/2481)
21
+
22
+ 5.3.0 (2018-03-09):
23
+
24
+ * Improvement: Use `FactoryBot` instead of `FactoryGirl` (https://github.com/thoughtbot/paperclip/pull/2501)
25
+ * Improvement: README updates (https://github.com/thoughtbot/paperclip/pull/2411, https://github.com/thoughtbot/paperclip/pull/2433, https://github.com/thoughtbot/paperclip/pull/2374, https://github.com/thoughtbot/paperclip/pull/2417, https://github.com/thoughtbot/paperclip/pull/2536)
26
+ * Improvement: Remove Ruby 2.4 deprecation warning (https://github.com/thoughtbot/paperclip/pull/2401)
27
+ * Improvement: Rails 5 migration compatibility (https://github.com/thoughtbot/paperclip/pull/2470)
28
+ * Improvement: Documentation around post processing (https://github.com/thoughtbot/paperclip/pull/2381)
29
+ * Improvement: S3 hostname example documentation (https://github.com/thoughtbot/paperclip/pull/2379)
30
+ * Bugfix: Allow paperclip to load in IRB (https://github.com/thoughtbot/paperclip/pull/2369)
31
+ * Bugfix: MIME type detection (https://github.com/thoughtbot/paperclip/issues/2527)
32
+ * Bugfix: Bad tempfile state after symlink failure (https://github.com/thoughtbot/paperclip/pull/2540)
33
+ * Bugfix: Rewind file after Fog bucket creation (https://github.com/thoughtbot/paperclip/pull/2572)
34
+ * Improvement: Use `Terrapin` instead of `Cocaine` (https://github.com/thoughtbot/paperclip/pull/2553)
35
+
36
+ 5.2.1 (2018-01-25):
37
+
38
+ * Bugfix: Fix copying files on Windows. (#2532)
39
+
40
+ 5.2.0 (2018-01-23):
41
+
42
+ * Security: Remove the automatic loading of URI adapters. Some of these
43
+ adapters can be specially crafted to expose your network topology. (#2435)
44
+ * Bugfix: The rake task no longer rescues `Exception`. (#2476)
45
+ * Bugfix: Handle malformed `Content-Disposition` headers (#2283)
46
+ * Bugfix: The `:only_process` option works when passed a lambda again. (#2289)
47
+ * Improvement: Added `:use_accelerate_endpoint` option when using S3 to enable
48
+ [Amazon S3 Transfer Acceleration](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
49
+ (#2291)
50
+ * Improvement: Make the fingerprint digest configurable per attachment. The
51
+ default remains MD5. Making this configurable means it can change in a future
52
+ version because it is not considered secure anymore against intentional file
53
+ corruption. For more info, see https://en.wikipedia.org/wiki/MD5#Security
54
+
55
+ You can change the digest used for an attachment by adding the
56
+ `:adapter_options` parameter to the `has_attached_file` options like this:
57
+ `has_attached_file :avatar, adapter_options: { hash_digest: Digest::SHA256 }`
58
+
59
+ Use the rake task to regenerate fingerprints with the new digest for a given
60
+ class. Note that this does **not** check the file integrity using the old
61
+ fingerprint. Run the following command to regenerate fingerprints for all
62
+ User attachments:
63
+ `CLASS=User rake paperclip:refresh:fingerprints`
64
+ You can optionally limit the attachment that will be processed, e.g:
65
+ `CLASS=User ATTACHMENT=avatar rake paperclip:refresh:fingerprints` (#2229)
66
+ * Improvement: The new `frame_index` option on the thumbnail processor allows
67
+ you to select a specific frame from an animated upload to use as a thumbnail.
68
+ Initial support is for mkv, avi, MP4, mov, MPEG, and GIF. (#2155)
69
+ * Improvement: Instead of copying files, use hard links. This is an
70
+ optimization. (#2120)
71
+ * Improvement: S3 storage option `:s3_prefixes_in_alias`. (#2287)
72
+ * Improvement: Fog option `:fog_public` can be a lambda. (#2302)
73
+ * Improvement: One fewer warning on JRuby. (#2352)
74
+ * Ruby 2.4.0 compatibility (doesn't use Fixnum anymore)
75
+
76
+ 5.1.0 (2016-08-19):
77
+
78
+ * Add default `content_type_detector` to `UploadedFileAdapter` (#2270)
79
+ * Default S3 protocol to empty string (#2038)
80
+ * Don't write original file if it wasn't reprocessed (#1993)
81
+ * Disallow trailing newlines in regular expressions (#2266)
82
+ * Support for readbyte in Paperclip attachments (#2034)
83
+ * (port from 4.3) Uri io adapter uses the content-disposition filename (#2250)
84
+ * General refactors and documentation improvements
85
+
86
+ 5.0.0 (2016-07-01):
87
+
88
+ * Improvement: Add `read_timeout` configuration for URI Adapter download_content method.
89
+ * README adjustments for Ruby beginners (add links, elucidate model in Quick Start)
90
+ * Bugfix: Now it's possible to save images from URLs with special characters [#1932]
91
+ * Bugfix: Return false when file to copy is not present in cloud storage [#2173]
92
+ * Automatically close file while checking mime type [#2016]
93
+ * Add `read_timeout` option to `UriAdapter#download_content` method [#2232]
94
+ * Fix a nil error in content type validation matcher [#1910]
95
+ * Documentation improvements
96
+
97
+ 5.0.0.beta2 (2016-04-01):
98
+
99
+ * Bugfix: Dynamic fog directory option is now respected
100
+ * Bugfix: Fixes cocaine duplicated paths [#2169]
101
+ * Removal of dead code (older versions of Rails and AWS SDK)
102
+ * README adjustments
103
+
104
+ 5.0.0.beta1 (2016-03-13):
105
+
106
+ * Bug Fix: megabytes of mime-types info in logs when a spoofed media type is detected.
107
+ * Drop support to end-of-life'd ruby 2.0.
108
+ * Drop support for end-of-life'd Rails 3.2 and 4.1
109
+ * Drop support for AWS v1
110
+ * Remove tests for JRuby and Rubinius from Travis CI (they were failing)
111
+ * Improvement: Add `fog_options` configuration to send options to fog when
112
+ storing files.
113
+ * Extracted repository for locales only: https://github.com/thoughtbot/paperclip-i18n
114
+ * Bugfix: Original file could be unlinked during `post_process_style`, producing failures
115
+ * Bugfix for image magick scaling images up
116
+ * Memory consumption improvements
117
+ * `url` on a unpersisted record returns `default_url` rather than `nil`
118
+ * Improvement: aws-sdk v2 support
119
+ https://github.com/thoughtbot/paperclip/pull/1903
120
+
121
+ If your Gemfile contains aws-sdk (>= 2.0.0) and aws-sdk-v1, paperclip will use
122
+ aws-sdk v2. With aws-sdk v2, S3 storage requires you to set the s3_region.
123
+ s3_region may be nested in s3_credentials, and (if not nested in
124
+ s3_credentials) it may be a Proc.
125
+
126
+ 4.3
127
+
128
+ See patch versions in v4.3 NEWS:
129
+ https://github.com/thoughtbot/paperclip/blob/v4.3/NEWS
130
+
131
+ 4.3.0 (2015-06-18):
132
+
133
+ * Improvement: Update aws-sdk and cucumber gem versions.
134
+ * Improvement: Add `length` alias for `size` method in AbstractAdapter.
135
+ * Improvement: Removed some cruft
136
+ * Improvement: deep_merge! Attachment definitions
137
+ * Improvement: Switch to mimemagic gem for content-type detection
138
+ * Improvement: Allows multiple content types for spoof detector
139
+ * Bug Fix: Don't assume we have Rails.env if we have Rails
140
+ * Performance: Decrease Memory footprint
141
+ * Ruby Versioning: Drop support for 1.9.3 (EOL'ed)
142
+ * Rails Versioning: Drop support for 4.0.0 (EOL'ed)
143
+
144
+ 4.2.4 (2015-06-05):
145
+
146
+ * Rollback backwards incompatible change, allowing paperclip to run on
147
+ Ruby >= 1.9.2.
148
+
149
+ 4.2.3:
150
+
151
+ * Fix dependency specifications (didn't work with Rails 4.1)
152
+ * Fix paperclip tests in CI
153
+
154
+ 4.2.2:
155
+
156
+ * Security fix: Fix a potential security issue with spoofing
157
+
158
+ 4.2.1:
159
+
160
+ * Improvement: Added `validate_media_type` options to allow/bypass spoof check
161
+ * Improvement: Added incremental backoff when AWS gives us a SlowDown error.
162
+ * Improvement: Stream downloads when usign aws-sdk.
163
+ * Improvement: Documentation fixes, includes Windows instructions.
164
+ * Improvement: Added pt-BR, zh-HK, zh-CN, zh-TW, and ja-JP locales.
165
+ * Improvement: Better escaping for characters in URLs
166
+ * Improvement: Honor `fog_credentials[:scheme]`
167
+ * Improvement: Also look for custom processors in lib/paperclip
168
+ * Improvement: id partitioning for string IDs works like integer id
169
+ * Improvement: Can pass options to DB adapters in migrations
170
+ * Improvement: Update expiring_url creation for later versions of fog
171
+ * Improvement: `path` can be a Proc in S3 attachments
172
+ * Test Fix: Improves speed and reliability of the specs
173
+ * Bug Fix: #original_filename= does not error when passed `nil`
174
+
175
+ 4.2.0:
176
+
177
+ * Improvement: Converted test suite from test/unit to RSpec
178
+ * Improvement: Refactored Paperclip::Attachment#assign
179
+ * Improvement: Added Spanish and German locales
180
+ * Improvement: Required Validators accept validator subclasses
181
+ * Improvement: EXIF orientation checking can be turned off for performance
182
+ * Improvement: Documentation updates
183
+ * Improvement: Better #human_size method for AttachmentSizeValidators
184
+ * Bug Fix: Allow MIME-types with dots in them
185
+ * Improvement: Travis CI updates
186
+ * Improvement: Validators can take multiple messages
187
+ * Improvement: Per-style options for S3 storage
188
+ * Improvement: Allow `nil` geometry strings
189
+ * Improvement: Use `eager_load!`
190
+
191
+ 4.1.1:
192
+
193
+ * Improvement: Add default translations for spoof validation
194
+ * Bug Fix: Don't check for spoofs if the file hasn't changed
195
+ * Bug Fix: Callback chain terminator is different in Rails 4.1, remove warnings
196
+ * Improvement: Fixed various Ruby warnings
197
+ * Bug Fix: Give bundler a hint, so it doesn't run forever on a fresh bundle
198
+ * Improvement: Documentation fixes
199
+ * Improvement: Allow travis-ci to finish-fast
200
+
201
+
202
+ 4.1.0:
203
+
204
+ * Improvement: Add :content_type_mappings to correct for missing spoof types
205
+ * Improvement: Credit Egor Homakov with discovering the content_type spoof bug
206
+ * Improvement: Memoize calls to identify in the thumbnail processor
207
+ * Improvement: Make MIME type optional for Data URIs.
208
+ * Improvement: Add default format for styles
209
+
210
+ 4.0.0:
211
+
212
+ * Security: Attachments are checked to make sure they're not pulling a fast one.
213
+ * Security: It is now *enforced* that every attachment has a file/mime validation.
214
+ * Bug Fix: Removed a call to IOAdapter#close that was causing issues.
215
+ * Improvement: Added bullets to the 3.5.3 list of changes. Very important.
216
+ * Improvement: Updated the copyright to 2014
217
+
218
+ 3.5.3:
219
+
220
+ * Improvement: After three long, hard years... we know how to upgrade
221
+ * Bug Fix: #expiring_url returns 'missing' urls if nothing is attached
222
+ * Improvement: Lots of documentation fixes
223
+ * Improvement: Lots of fixes for Ruby warnings
224
+ * Improvement: Test the most appropriate Ruby/Rails comobinations on Travis
225
+ * Improvement: Delegate more IO methods through IOAdapters
226
+ * Improvement: Remove Rails 4 deprecations
227
+ * Improvement: Both S3's and Fog's #expiring_url can take a Time or Int
228
+ * Bug Fix: Both S3's and Fog's expiring_url respect style when missing the file
229
+ * Bug Fix: Timefiles will have a reasonable-length name. They're all MD5 hashes now
230
+ * Bug Fix: Don't delete files off S3 when reprocessing due to AWS inconsistencies
231
+ * Bug Fix: "swallow_stream" isn't thread dafe. Use :swallow_stderr
232
+ * Improvement: Regexps use \A and \Z instead of ^ and $
233
+ * Improvement: :s3_credentials can take a lambda as an argument
234
+ * Improvement: Search up the class heirarchy for attachments
235
+ * Improvement: deep_merge options instead of regular merge
236
+ * Bug Fix: Prevent file deletion on transaction rollback
237
+ * Test Improvement: Ensure more files are properly closed during tests
238
+ * Test Bug Fix: Return the gemfile's syntax to normal
239
+
240
+ 3.5.2:
241
+
242
+ * Security: Force cocaine to at least 0.5.3 to include a security fix
243
+ * Improvement: Fixed some README exmaples
244
+ * Feature: Added HTTP URL Proxy Adapter, can assign string URLs as attachments
245
+ * Improvement: Put validation errors on the base attribute and the sub-attribute
246
+
247
+ 3.5.1:
248
+
249
+ * Bug Fix: Returned the class-level `attachment_definitions` method for compatability.
250
+ * Improvement: Ensured compatability with Rails 4
251
+ * Improvement: Added Rails 4 to the Appraisals
252
+ * Bug Fix: #1296, where validations were generating errors
253
+ * Improvement: Specify MIT license in the gemspec
254
+
255
+ 3.5.0:
256
+
257
+ * Feature: Handle Base64-encoded data URIs as uploads
258
+ * Feature: Add a FilenameCleaner class to allow custom filename sanitation
259
+ * Improvement: Satisfied Mocha deprecation warnings
260
+ * Bug Fix: Allow empty string to be submitted and ignored, as some forms do this
261
+ * Improvement: Make #expiring_url behavior consistent with #url
262
+ * Bug Fix: "Validate" attachments without invoking AR's validations
263
+ * Improvement: Various refactorings for a cleaner codebase
264
+ * Improvement: Be agnostic, use ActiveModel when appropriate
265
+ * Improvement: Add validation errors to the base attachment attribute
266
+ * Improvement: Handle errors in rake tasks
267
+ * Improvement: Largely refactor has_attached_file into a new class
268
+ * Improvement: Added Ruby 2.0.0 as a supported platform and removed 1.8.7
269
+ * Improvement: Fixed some incompatabilities in the test suite
270
+
271
+ 3.4.2:
272
+
273
+ * Improvement: Use https for Gemfile urls
274
+ * Improvement: Updated and more correct documentation
275
+ * Improvement: Use the -optimize flag on animated GIFs
276
+ * Improvement: Remove the Gemfile.lock
277
+ * Improvement: Add #expiring_url as an alias for #url until the storage defines it
278
+ * Improvement: Remove path clash checking, as it's unnecessary
279
+ * Bug Fix: Do not rely on checking version numbers for aws-sdk
280
+
281
+ 3.4.1:
282
+
283
+ * Improvement: Various documentation fixes and improvements
284
+ * Bug Fix: Clearing an attachment with `preserve_files` on should still clear the attachment
285
+ * Bug Fix: Instances are #changed? when a new file is assigned
286
+ * Bug Fix: Correctly deal with S3 styles when using a lambda
287
+ * Improvement: Accept and pass :credential_provider option to AWS-SDK
288
+ * Bug Fix: Sanitize original_filename more correctly in IO Adapters
289
+ * Improvement: s3_host_name can be a lambda
290
+ * Improvement: Cache some interpolations for speed
291
+ * Improvement: Update to latest cocaine
292
+ * Improvement: Update copyrights, various typos
293
+
294
+ 3.4.0:
295
+
296
+ * Bug Fix: Allow UploadedFileAdapter to force the use of `file`
297
+ * Bug Fix: Close the file handle when dealing with URIs
298
+ * Bug Fix: Ensure files are closed for writing when we're done.
299
+ * Bug Fix: Fixed 'type' being nil on Windows 7 error.
300
+ * Bug Fix: Fixed nil access when no s3 headers are defined
301
+ * Bug Fix: Fixes auto_orientation
302
+ * Bug Fix: Prevent a missing method error when switching from aws_sdk to fog
303
+ * Bug Fix: Properly fail to process invalid attachments
304
+ * Bug Fix: Server-side encryption is specified correctly
305
+ * Bug Fix: fog_public returned to true by default
306
+ * Bug Fix: Check attachment paths for duplicates, not URLs
307
+ * Feature: Add Attachment#blank?
308
+ * Feature: Add support for blacklisting certain content_types
309
+ * Feature: Add support for style-specific s3 headers and meta data
310
+ * Feature: Allow only_process to be a lambda
311
+ * Feature: Allow setting of escape url as a default option
312
+ * Feature: Create :override_file_permissions option for filesystem attachments
313
+ * Improvement: Add Attachment#as_json
314
+ * Improvement: Evaluate lambdas for fog_file properties
315
+ * Improvement: Extract geometry parsing into factories
316
+ * Improvement: Fixed various typos
317
+ * Improvement: Refactored some tests
318
+ * Improvement: Reuse S3 connections
319
+
320
+ New In 3.3.1:
321
+
322
+ * Bug Fix: Moved Filesystem's copy_to_local_file to the right place.
323
+
324
+ 3.3.0:
325
+
326
+ * Improvement: Upgrade cocaine to 0.4
327
+
328
+ 3.2.0:
329
+
330
+ * Bug Fix: Use the new correct Amazon S3 encryption header.
331
+ * Bug Fix: The rake task respects the updated_at column.
332
+ * Bug Fix: Strip newline from content type.
333
+ * Feature: Fog file visibility can be specified per style.
334
+ * Feature: Automatically rotate images.
335
+ * Feature: Reduce class-oriented programming of the attachment definitions.
336
+
337
+ 3.1.4:
338
+
339
+ * Bug Fix: Allow user to be able to set path without `:style` attribute and not raising an error.
340
+ This is a regression introduced in 3.1.3, and that feature will be postponed to another minor
341
+ release instead.
342
+ * Feature: Allow for URI Adapter as an optional paperclip io adapter.
343
+
344
+ 3.1.3:
345
+
346
+ * Bug Fix: Copy empty attachment between instances is now working.
347
+ * Bug Fix: Correctly rescue Fog error.
348
+ * Bug Fix: Using default path and url options in Fog storage now work as expected.
349
+ * Bug Fix: `Attachment#s3_protocol` now returns a protocol without colon suffix.
350
+ * Feature: Paperclip will now raise an error if multiple styles are defined but no `:style`
351
+ interpolation exists in `:path`.
352
+ * Feature: Add support for `#{attachment}_created_at` field
353
+ * Bug Fix: Paperclip now gracefully handles msising file command.
354
+ * Bug Fix: `StringIOAdapter` now accepts content type.
355
+
356
+ 3.1.2:
357
+
358
+ * Bug Fix: #remove_attachment on 3.1.0 and 3.1.1 mistakenly trying to remove the column that has
359
+ the same name as data type (such as :string, :datetime, :interger.) You're advised to update to
360
+ Paperclip 3.1.2 as soon as possible.
361
+
362
+ 3.1.1:
363
+
364
+ * Bug Fix: Paperclip will only load Paperclip::Schema only when Active Record is available.
365
+
366
+ 3.1.0:
367
+
368
+ * Feature: Paperclip now support new migration syntax (sexy migration) that reads better:
369
+
370
+ class AddAttachmentToUsers < ActiveRecord::Migration
371
+ def self.up
372
+ create_table :users do |t|
373
+ t.attachment :avatar
374
+ end
375
+ end
376
+ end
377
+
378
+ Also, schema-definition level syntax has been added:
379
+
380
+ add_attachment :users, :avatar
381
+ remove_attachment :users, :avatar
382
+
383
+ * Feature: Migration now support Rails 3.2+ `change` method.
384
+ * API CHANGE: Old `t.has_attached_file` and `drop_attached_file` are now deprecated. You're advised
385
+ to update your migration file before the next MAJOR version.
386
+ * Bug Fix: Tempfile now rewinded before generating fingerprint
387
+ * API CHANGE: Tempfiles are now unlinked after `after_flush_writes`
388
+
389
+ If you need to interact with the generated tempfiles, please define an `after_flush_writes` method
390
+ in your model. You'll be able to access files via `@queue_for_write` instance variable.
391
+
392
+ * Bug Fix: `:s3_protocol` can now be defined as either String or Symbol
393
+ * Bug Fix: Tempfiles are now rewinded before get passed into `after_flush_writes`
394
+ * Feature: Added expiring_url method to Fog Storage
395
+ * API CHANGE: Paperclip now tested against AWS::SDK 1.5.2 onward
396
+ * Bug Fix: Improved the output of the content_type validator so the actual failure is displayed
397
+ * Feature: Animated formats now identified using ImageMagick.
398
+ * Feature: AttachmentAdapter now support fetching attachment with specific style.
399
+ * Feature: Paperclip default options can now be configured in Rails.configuration.
400
+ * Feature: add Geometry#resize_to to calculate dimensions of new source.
401
+ * Bug Fix: Fixed a bug whereby a file type with multiple mime types but no official type would cause
402
+ the best_content_type to throw an error on trying nil.content_type.
403
+ * Bug Fix: Fix problem when the gem cannot be installed on the system that has Asepsis installed.
404
+
405
+ 3.0.4:
406
+
407
+ * Feature: Adds support for S3 scheme-less URL generation.
408
+
409
+ 3.0.3:
410
+
411
+ * Bug Fix: ThumbnailProcessor now correctly detects and preserve animated GIF.
412
+ * Bug Fix: File extension is now preserved in generated Tempfile from adapter.
413
+ * Bug Fix: Uploading file with unicode file name now won't raise an error when
414
+ logging in the AWS is turned on.
415
+ * Bug Fix: Task "paperclip:refresh:missing_styles" now work correctly.
416
+ * Bug Fix: Handle the case when :restricted_characters is nil.
417
+ * Bug Fix: Don't delete all the existing styles if we reprocess.
418
+ * Bug Fix: Content type is now ensured to not having a new line character.
419
+ * API CHANGE: Non-Rails usage should include Paperclip::Glue directly.
420
+
421
+ `Paperclip::Railtie` was intended to be used with Ruby on Rails only. If you're
422
+ using Paperclip without Rails, you should include `Paperclip::Glue` into
423
+ `ActiveRecord::Base` instead of requiring `paperclip/railtie`:
424
+
425
+ ActiveRecord::Base.send :include, Paperclip::Glue
426
+
427
+ * Bug Fix: AttachmentContentTypeValidator now allow you to specify :allow_blank/:allow_nil
428
+ * Bug Fix: Make sure content type always a String.
429
+ * Bug Fix: Fix attachment.reprocess! when using storage providers fog and s3.
430
+ * Bug Fix: Fix a problem with incorrect content_type detected with 'file' command for an empty file on Mac.
431
+
432
+ 3.0.2:
433
+
434
+ * API CHANGE: Generated migration class name is now plural (AddAttachmentToUsers instead of AddAttachmentToUser)
435
+ * API CHANGE: Remove Rails plugin initialization code.
436
+ * API CHANGE: Explicitly require Ruby 1.9.2 in the Gemfile.
437
+ * Bug Fix: Fixes AWS::S3::Errors::RequestTimeout on Model#save.
438
+ * Bug Fix: Fix a problem when there's no logger specified.
439
+ * Bug Fix: Fix a problem when attaching Rack::Test::UploadedFile instance.
440
+
441
+ 3.0.1:
442
+
443
+ * Feature: Introduce Paperlip IO adapter.
444
+ * Bug Fix: Regression in AttachmentContentTypeValidator has been fixed.
445
+ * API CHANGE: #to_file has been removed. Use the #copy_to_local_file method instead.
446
+
447
+ 3.0.0:
448
+
449
+ * API CHANGE: Paperclip now requires at least Ruby on Rails version 3.0.0
450
+ * API CHANGE: The default :url and :path have changed. The new scheme avoids
451
+ filesystem conflicts and scales to handle larger numbers of uploads.
452
+
453
+ The easiest way to upgrade is to add an explicit :url and :path to your
454
+ has_attached_file calls:
455
+
456
+ has_attached_file :avatar,
457
+ :path => ":rails_root/public/system/:attachment/:id/:style/:filename",
458
+ :url => "/system/:attachment/:id/:style/:filename"
459
+
460
+ * Feature: Adding Rails 3 style validators, and adding `validates_attachment` method as a shorthand.
461
+ * Bug Fix: Paperclip's rake tasks now loading records in batch.
462
+ * Bug Fix: Attachment style name with leading number now not raising an error.
463
+ * Bug Fix: File given to S3 and Fog storage will now be rewinded after flush_write.
464
+ * Feature: You can now pass addional parameter to S3 expiring URL, such as :content_type.
465
+
466
+ 2.7.0:
467
+
468
+ * Bug Fix: Checking the existence of a file on S3 handles all AWS errors.
469
+ * Bug Fix: Clear the fingerprint when removing an attachment.
470
+ * Bug Fix: Attachment size validation message reads more nicely now.
471
+ * Feature: Style names can be either symbols or strings.
472
+ * Compatibility: Support for ActiveSupport < 2.3.12.
473
+ * Compatibility: Support for Rails 3.2.
474
+
475
+ 2.6.0:
476
+
477
+ * Bug Fix: Files are re-wound after reading.
478
+ * Feature: Remove Rails dependency from specs that need Paperclip.
479
+ * Feature: Validation matchers support conditionals.
480
+
481
+ 2.5.2:
482
+
483
+ * Bug Fix: Can be installed on Windows.
484
+ * Feature: The Fog bucket name, authentication, and host can be determined at runtime via Proc.
485
+ * Feature: Special characters are replaced with underscores in #url and #path.
486
+
487
+ 2.5.1:
488
+
489
+ * Feature: After we've computed the content type, pass it to Fog.
490
+ * Feature: S3 encryption with the new :s3_server_side_encryption option.
491
+ * Feature: Works without ActiveRecord, allowing for e.g. mongo backends.
492
+
493
+ 2.5.0:
494
+
495
+ * Performance: Only connect to S3 when absolutely needed.
496
+ * Bug Fix: STI with cached classes respect new options.
497
+ * Bug Fix: conditional validations broke, and now work again.
498
+ * Feature: URL generation is now parameterized and can be changed with plugins or custom code.
499
+ * Feature: :convert_options and :source_file_options to control the ImageMagick processing.
500
+ * Performance: String geometry specifications now parse more quickly.
501
+ * Bug Fix: Handle files with question marks in the filename.
502
+ * Bug Fix: Don't raise an error when generating an expiring URL on an unassigned attachment.
503
+ * Bug Fix: The rake task runs over all instances of an ActiveRecord model, ignoring default scopes.
504
+ * Feature: DB migration has_attached_file and drop_attached_file methods.
505
+ * Bug Fix: Switch from AWS::S3 to AWS::SDK for the S3 backend.
506
+ * Bug Fix: URL generator uses '?' in the URL unless it already appears and there is no prior '='.
507
+ * Bug Fix: Always convert the content type to a string before stripping blanks.
508
+ * Feature: The :keep_old_files option preserves the files in storage even when the attachment is cleared or changed.
509
+ * Performance: Optimize Fog's public_url access by avoiding it when possible.
510
+ * Bug Fix: Avoid a runtime error when generating the ID partition for an unsaved attachment.
511
+ * Performance: Do not calculate the fingerprint if it is never persisted.
512
+ * Bug Fix: Process the :original style before all others, in case of a dependency.
513
+ * Feature: S3 headers can be set at runtime by passing a proc object as the value.
514
+ * Bug Fix: Generating missing attachment styles for a model which has had its attachment changed should not raise.
515
+ * Bug Fix: Do not collide with the built-in Ruby hashing method.