paperclip 4.2.2 → 5.2.1
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.
- checksums.yaml +4 -4
- data/.codeclimate.yml +17 -0
- data/.hound.yml +1055 -0
- data/.rubocop.yml +1 -0
- data/.travis.yml +17 -15
- data/Appraisals +4 -16
- data/CONTRIBUTING.md +19 -8
- data/Gemfile +5 -9
- data/LICENSE +1 -1
- data/NEWS +148 -31
- data/README.md +327 -191
- data/RELEASING.md +17 -0
- data/Rakefile +2 -2
- data/UPGRADING +12 -9
- data/features/basic_integration.feature +10 -6
- data/features/migration.feature +0 -24
- data/features/step_definitions/attachment_steps.rb +33 -27
- data/features/step_definitions/html_steps.rb +2 -2
- data/features/step_definitions/rails_steps.rb +39 -38
- data/features/step_definitions/s3_steps.rb +2 -2
- data/features/step_definitions/web_steps.rb +1 -103
- data/features/support/env.rb +1 -0
- data/features/support/file_helpers.rb +2 -2
- data/features/support/paths.rb +1 -1
- data/features/support/rails.rb +0 -24
- data/gemfiles/4.2.gemfile +6 -8
- data/gemfiles/5.0.gemfile +17 -0
- data/lib/paperclip/attachment.rb +32 -20
- data/lib/paperclip/attachment_registry.rb +3 -2
- data/lib/paperclip/callbacks.rb +8 -6
- data/lib/paperclip/content_type_detector.rb +27 -11
- data/lib/paperclip/errors.rb +3 -1
- data/lib/paperclip/file_command_content_type_detector.rb +6 -8
- data/lib/paperclip/geometry_parser_factory.rb +1 -1
- data/lib/paperclip/glue.rb +1 -1
- data/lib/paperclip/has_attached_file.rb +9 -2
- data/lib/paperclip/helpers.rb +14 -10
- data/lib/paperclip/interpolations/plural_cache.rb +6 -5
- data/lib/paperclip/interpolations.rb +19 -14
- data/lib/paperclip/io_adapters/abstract_adapter.rb +26 -3
- data/lib/paperclip/io_adapters/attachment_adapter.rb +10 -5
- data/lib/paperclip/io_adapters/data_uri_adapter.rb +8 -8
- data/lib/paperclip/io_adapters/empty_string_adapter.rb +5 -4
- data/lib/paperclip/io_adapters/file_adapter.rb +12 -6
- data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +7 -7
- data/lib/paperclip/io_adapters/identity_adapter.rb +12 -6
- data/lib/paperclip/io_adapters/nil_adapter.rb +8 -5
- data/lib/paperclip/io_adapters/registry.rb +6 -2
- data/lib/paperclip/io_adapters/stringio_adapter.rb +9 -6
- data/lib/paperclip/io_adapters/uploaded_file_adapter.rb +10 -6
- data/lib/paperclip/io_adapters/uri_adapter.rb +41 -19
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +4 -4
- data/lib/paperclip/media_type_spoof_detector.rb +2 -2
- data/lib/paperclip/processor.rb +5 -4
- data/lib/paperclip/rails_environment.rb +25 -0
- data/lib/paperclip/schema.rb +3 -9
- data/lib/paperclip/storage/filesystem.rb +13 -2
- data/lib/paperclip/storage/fog.rb +30 -18
- data/lib/paperclip/storage/s3.rb +92 -65
- data/lib/paperclip/thumbnail.rb +16 -7
- data/lib/paperclip/url_generator.rb +16 -13
- data/lib/paperclip/validators/attachment_size_validator.rb +1 -7
- data/lib/paperclip/validators.rb +1 -1
- data/lib/paperclip/version.rb +3 -1
- data/lib/paperclip.rb +25 -12
- data/lib/tasks/paperclip.rake +33 -3
- data/paperclip.gemspec +18 -15
- data/spec/paperclip/attachment_definitions_spec.rb +1 -1
- data/spec/paperclip/attachment_processing_spec.rb +2 -4
- data/spec/paperclip/attachment_registry_spec.rb +84 -13
- data/spec/paperclip/attachment_spec.rb +130 -39
- data/spec/paperclip/content_type_detector_spec.rb +8 -1
- data/spec/paperclip/file_command_content_type_detector_spec.rb +0 -1
- data/spec/paperclip/geometry_spec.rb +1 -1
- data/spec/paperclip/glue_spec.rb +44 -0
- data/spec/paperclip/has_attached_file_spec.rb +24 -8
- data/spec/paperclip/integration_spec.rb +4 -3
- data/spec/paperclip/interpolations_spec.rb +16 -13
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +47 -23
- data/spec/paperclip/io_adapters/attachment_adapter_spec.rb +6 -3
- data/spec/paperclip/io_adapters/data_uri_adapter_spec.rb +7 -1
- data/spec/paperclip/io_adapters/file_adapter_spec.rb +6 -3
- data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +26 -6
- data/spec/paperclip/io_adapters/identity_adapter_spec.rb +1 -1
- data/spec/paperclip/io_adapters/registry_spec.rb +2 -2
- data/spec/paperclip/io_adapters/stringio_adapter_spec.rb +5 -1
- data/spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb +5 -5
- data/spec/paperclip/io_adapters/uri_adapter_spec.rb +77 -7
- data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +10 -0
- data/spec/paperclip/media_type_spoof_detector_spec.rb +34 -11
- data/spec/paperclip/paperclip_spec.rb +4 -29
- data/spec/paperclip/plural_cache_spec.rb +17 -16
- data/spec/paperclip/rails_environment_spec.rb +33 -0
- data/spec/paperclip/storage/fog_spec.rb +58 -3
- data/spec/paperclip/storage/s3_live_spec.rb +20 -14
- data/spec/paperclip/storage/s3_spec.rb +398 -213
- data/spec/paperclip/tempfile_factory_spec.rb +4 -0
- data/spec/paperclip/tempfile_spec.rb +35 -0
- data/spec/paperclip/thumbnail_spec.rb +51 -32
- data/spec/paperclip/url_generator_spec.rb +55 -44
- data/spec/paperclip/validators/attachment_size_validator_spec.rb +26 -20
- data/spec/paperclip/validators_spec.rb +5 -5
- data/spec/spec_helper.rb +8 -1
- data/spec/support/assertions.rb +12 -1
- data/spec/support/conditional_filter_helper.rb +5 -0
- data/spec/support/fake_model.rb +4 -0
- data/spec/support/fixtures/empty.xlsx +0 -0
- data/spec/support/matchers/have_column.rb +11 -2
- data/spec/support/mock_attachment.rb +2 -0
- data/spec/support/mock_url_generator_builder.rb +2 -2
- data/spec/support/model_reconstruction.rb +9 -1
- data/spec/support/reporting.rb +11 -0
- metadata +109 -162
- data/RUNNING_TESTS.md +0 -4
- data/cucumber/paperclip_steps.rb +0 -6
- data/gemfiles/3.2.gemfile +0 -19
- data/gemfiles/4.0.gemfile +0 -19
- data/gemfiles/4.1.gemfile +0 -19
- data/lib/paperclip/locales/de.yml +0 -18
- data/lib/paperclip/locales/es.yml +0 -18
- data/lib/paperclip/locales/ja.yml +0 -18
- data/lib/paperclip/locales/pt-BR.yml +0 -18
- data/lib/paperclip/locales/zh-CN.yml +0 -18
- data/lib/paperclip/locales/zh-HK.yml +0 -18
- data/lib/paperclip/locales/zh-TW.yml +0 -18
- data/spec/support/mock_model.rb +0 -2
- data/spec/support/rails_helpers.rb +0 -7
data/.rubocop.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
inherit_from: .hound.yml
|
data/.travis.yml
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
- jruby-19mode
|
|
4
|
-
- rbx-2
|
|
5
|
-
- 2.0.0
|
|
6
|
-
- 2.1.1
|
|
1
|
+
language: ruby
|
|
2
|
+
sudo: false
|
|
7
3
|
|
|
8
|
-
|
|
9
|
-
-
|
|
4
|
+
rvm:
|
|
5
|
+
- 2.1
|
|
6
|
+
- 2.2
|
|
7
|
+
- 2.3
|
|
8
|
+
- 2.4
|
|
10
9
|
|
|
11
|
-
before_script: "sudo ntpdate -ub ntp.ubuntu.com pool.ntp.org; true"
|
|
12
10
|
script: "bundle exec rake clean spec cucumber"
|
|
13
11
|
|
|
12
|
+
addons:
|
|
13
|
+
apt:
|
|
14
|
+
packages:
|
|
15
|
+
- ghostscript
|
|
16
|
+
|
|
14
17
|
gemfile:
|
|
15
|
-
- gemfiles/
|
|
16
|
-
- gemfiles/
|
|
17
|
-
- gemfiles/4.1.gemfile
|
|
18
|
+
- gemfiles/4.2.gemfile
|
|
19
|
+
- gemfiles/5.0.gemfile
|
|
18
20
|
|
|
19
21
|
matrix:
|
|
20
22
|
fast_finish: true
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
23
|
+
exclude:
|
|
24
|
+
- gemfile: gemfiles/5.0.gemfile
|
|
25
|
+
rvm: 2.1
|
data/Appraisals
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
appraise "
|
|
2
|
-
gem "rails", "~>
|
|
3
|
-
gem "paperclip", :path => "../"
|
|
4
|
-
end
|
|
5
|
-
|
|
6
|
-
appraise "4.0" do
|
|
7
|
-
gem "rails", "~> 4.0.0"
|
|
8
|
-
gem "paperclip", :path => "../"
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
appraise "4.1" do
|
|
12
|
-
gem "rails", "~> 4.1.0"
|
|
13
|
-
gem "paperclip", :path => "../"
|
|
1
|
+
appraise "4.2" do
|
|
2
|
+
gem "rails", "~> 4.2.0"
|
|
14
3
|
end
|
|
15
4
|
|
|
16
|
-
appraise "
|
|
17
|
-
gem "rails", "~>
|
|
18
|
-
gem "paperclip", :path => "../"
|
|
5
|
+
appraise "5.0" do
|
|
6
|
+
gem "rails", "~> 5.0.0"
|
|
19
7
|
end
|
data/CONTRIBUTING.md
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
Contributing
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
-
We love pull requests.
|
|
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:
|
|
5
10
|
|
|
6
11
|
1. Fork the repo.
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
1. Make sure you have ImageMagick and Ghostscript installed. See [this section]
|
|
14
|
+
(./README.md#image-processor) of the README.
|
|
10
15
|
|
|
11
|
-
|
|
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
|
|
12
20
|
require no new tests. If you are adding functionality or fixing a bug, we need
|
|
13
21
|
a test!
|
|
14
22
|
|
|
15
|
-
|
|
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.
|
|
16
27
|
|
|
17
|
-
|
|
28
|
+
1. Push to your fork and submit a pull request.
|
|
18
29
|
|
|
19
30
|
At this point you're waiting on us. We like to at least comment on, if not
|
|
20
31
|
accept, pull requests within seven business days (most of the work on Paperclip
|
|
@@ -43,14 +54,14 @@ will be asked to rewrite them before we'll accept.
|
|
|
43
54
|
### Bootstrapping your test suite:
|
|
44
55
|
|
|
45
56
|
bundle install
|
|
46
|
-
bundle exec
|
|
57
|
+
bundle exec appraisal install
|
|
47
58
|
|
|
48
59
|
This will install all the required gems that requires to test against each
|
|
49
60
|
version of Rails, which defined in `gemfiles/*.gemfile`.
|
|
50
61
|
|
|
51
62
|
### To run a full test suite:
|
|
52
63
|
|
|
53
|
-
bundle exec rake
|
|
64
|
+
bundle exec appraisal rake
|
|
54
65
|
|
|
55
66
|
This will run RSpec and Cucumber against all version of Rails
|
|
56
67
|
|
data/Gemfile
CHANGED
|
@@ -2,19 +2,15 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
|
-
gem 'sqlite3', '1.3.8', :platforms => :ruby
|
|
6
|
-
|
|
7
|
-
gem 'jruby-openssl', :platforms => :jruby
|
|
8
|
-
gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
|
|
9
|
-
|
|
10
|
-
gem 'rubysl', :platforms => :rbx
|
|
11
|
-
gem 'racc', :platforms => :rbx
|
|
12
|
-
|
|
5
|
+
gem 'sqlite3', '~> 1.3.8', :platforms => :ruby
|
|
13
6
|
gem 'pry'
|
|
14
7
|
|
|
15
8
|
# Hinting at development dependencies
|
|
16
9
|
# Prevents bundler from taking a long-time to resolve
|
|
17
10
|
group :development, :test do
|
|
18
|
-
gem '
|
|
11
|
+
gem 'activerecord-import'
|
|
12
|
+
gem 'mime-types'
|
|
19
13
|
gem 'builder'
|
|
14
|
+
gem 'rubocop', require: false
|
|
15
|
+
gem 'rspec'
|
|
20
16
|
end
|
data/LICENSE
CHANGED
|
@@ -3,7 +3,7 @@ LICENSE
|
|
|
3
3
|
|
|
4
4
|
The MIT License
|
|
5
5
|
|
|
6
|
-
Copyright (c) 2008-
|
|
6
|
+
Copyright (c) 2008-2016 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,8 +1,125 @@
|
|
|
1
|
-
|
|
1
|
+
5.2.1 (2018-01-25):
|
|
2
|
+
|
|
3
|
+
* Bugfix: Fix copying files on Windows. (#2532)
|
|
4
|
+
|
|
5
|
+
5.2.0 (2018-01-23):
|
|
6
|
+
|
|
7
|
+
* Security: Remove the automatic loading of URI adapters. Some of these
|
|
8
|
+
adapters can be specially crafted to expose your network topology. (#2435)
|
|
9
|
+
* Bugfix: The rake task no longer rescues `Exception`. (#2476)
|
|
10
|
+
* Bugfix: Handle malformed `Content-Disposition` headers (#2283)
|
|
11
|
+
* Bugfix: The `:only_process` option works when passed a lambda again. (#2289)
|
|
12
|
+
* Improvement: Added `:use_accelerate_endpoint` option when using S3 to enable
|
|
13
|
+
[Amazon S3 Transfer Acceleration](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
|
|
14
|
+
(#2291)
|
|
15
|
+
* Improvement: Make the fingerprint digest configurable per attachment. The
|
|
16
|
+
default remains MD5. Making this configurable means it can change in a future
|
|
17
|
+
version because it is not considered secure anymore against intentional file
|
|
18
|
+
corruption. For more info, see https://en.wikipedia.org/wiki/MD5#Security
|
|
19
|
+
|
|
20
|
+
You can change the digest used for an attachment by adding the
|
|
21
|
+
`:adapter_options` parameter to the `has_attached_file` options like this:
|
|
22
|
+
`has_attached_file :avatar, adapter_options: { hash_digest: Digest::SHA256 }`
|
|
23
|
+
|
|
24
|
+
Use the rake task to regenerate fingerprints with the new digest for a given
|
|
25
|
+
class. Note that this does **not** check the file integrity using the old
|
|
26
|
+
fingerprint. Run the following command to regenerate fingerprints for all
|
|
27
|
+
User attachments:
|
|
28
|
+
`CLASS=User rake paperclip:refresh:fingerprints`
|
|
29
|
+
You can optionally limit the attachment that will be processed, e.g:
|
|
30
|
+
`CLASS=User ATTACHMENT=avatar rake paperclip:refresh:fingerprints` (#2229)
|
|
31
|
+
* Improvement: The new `frame_index` option on the thumbnail processor allows
|
|
32
|
+
you to select a specific frame from an animated upload to use as a thumbnail.
|
|
33
|
+
Initial support is for mkv, avi, MP4, mov, MPEG, and GIF. (#2155)
|
|
34
|
+
* Improvement: Instead of copying files, use hard links. This is an
|
|
35
|
+
optimization. (#2120)
|
|
36
|
+
* Improvement: S3 storage option `:s3_prefixes_in_alias`. (#2287)
|
|
37
|
+
* Improvement: Fog option `:fog_public` can be a lambda. (#2302)
|
|
38
|
+
* Improvement: One fewer warning on JRuby. (#2352)
|
|
39
|
+
|
|
40
|
+
5.1.0 (2016-08-19):
|
|
41
|
+
|
|
42
|
+
* Add default `content_type_detector` to `UploadedFileAdapter` (#2270)
|
|
43
|
+
* Default S3 protocol to empty string (#2038)
|
|
44
|
+
* Don't write original file if it wasn't reprocessed (#1993)
|
|
45
|
+
* Disallow trailing newlines in regular expressions (#2266)
|
|
46
|
+
* Support for readbyte in Paperclip attachments (#2034)
|
|
47
|
+
* (port from 4.3) Uri io adapter uses the content-disposition filename (#2250)
|
|
48
|
+
* General refactors and documentation improvements
|
|
49
|
+
|
|
50
|
+
5.0.0 (2016-07-01):
|
|
51
|
+
|
|
52
|
+
* Improvement: Add `read_timeout` configuration for URI Adapter download_content method.
|
|
53
|
+
* README adjustments for Ruby beginners (add links, elucidate model in Quick Start)
|
|
54
|
+
* Bugfix: Now it's possible to save images from URLs with special characters [#1932]
|
|
55
|
+
* Bugfix: Return false when file to copy is not present in cloud storage [#2173]
|
|
56
|
+
* Automatically close file while checking mime type [#2016]
|
|
57
|
+
* Add `read_timeout` option to `UriAdapter#download_content` method [#2232]
|
|
58
|
+
* Fix a nil error in content type validation matcher [#1910]
|
|
59
|
+
* Documentation improvements
|
|
60
|
+
|
|
61
|
+
5.0.0.beta2 (2016-04-01):
|
|
62
|
+
|
|
63
|
+
* Bugfix: Dynamic fog directory option is now respected
|
|
64
|
+
* Bugfix: Fixes cocaine duplicated paths [#2169]
|
|
65
|
+
* Removal of dead code (older versions of Rails and AWS SDK)
|
|
66
|
+
* README adjustments
|
|
67
|
+
|
|
68
|
+
5.0.0.beta1 (2016-03-13):
|
|
69
|
+
|
|
70
|
+
* Bug Fix: megabytes of mime-types info in logs when a spoofed media type is detected.
|
|
71
|
+
* Drop support to end-of-life'd ruby 2.0.
|
|
72
|
+
* Drop support for end-of-life'd Rails 3.2 and 4.1
|
|
73
|
+
* Drop support for AWS v1
|
|
74
|
+
* Remove tests for JRuby and Rubinius from Travis CI (they were failing)
|
|
75
|
+
* Improvement: Add `fog_options` configuration to send options to fog when
|
|
76
|
+
storing files.
|
|
77
|
+
* Extracted repository for locales only: https://github.com/thoughtbot/paperclip-i18n
|
|
78
|
+
* Bugfix: Original file could be unlinked during `post_process_style`, producing failures
|
|
79
|
+
* Bugfix for image magick scaling images up
|
|
80
|
+
* Memory consumption improvements
|
|
81
|
+
* `url` on a unpersisted record returns `default_url` rather than `nil`
|
|
82
|
+
* Improvement: aws-sdk v2 support
|
|
83
|
+
https://github.com/thoughtbot/paperclip/pull/1903
|
|
84
|
+
|
|
85
|
+
If your Gemfile contains aws-sdk (>= 2.0.0) and aws-sdk-v1, paperclip will use
|
|
86
|
+
aws-sdk v2. With aws-sdk v2, S3 storage requires you to set the s3_region.
|
|
87
|
+
s3_region may be nested in s3_credentials, and (if not nested in
|
|
88
|
+
s3_credentials) it may be a Proc.
|
|
89
|
+
|
|
90
|
+
4.3
|
|
91
|
+
|
|
92
|
+
See patch versions in v4.3 NEWS:
|
|
93
|
+
https://github.com/thoughtbot/paperclip/blob/v4.3/NEWS
|
|
94
|
+
|
|
95
|
+
4.3.0 (2015-06-18):
|
|
96
|
+
|
|
97
|
+
* Improvement: Update aws-sdk and cucumber gem versions.
|
|
98
|
+
* Improvement: Add `length` alias for `size` method in AbstractAdapter.
|
|
99
|
+
* Improvement: Removed some cruft
|
|
100
|
+
* Improvement: deep_merge! Attachment definitions
|
|
101
|
+
* Improvement: Switch to mimemagic gem for content-type detection
|
|
102
|
+
* Improvement: Allows multiple content types for spoof detector
|
|
103
|
+
* Bug Fix: Don't assume we have Rails.env if we have Rails
|
|
104
|
+
* Performance: Decrease Memory footprint
|
|
105
|
+
* Ruby Versioning: Drop support for 1.9.3 (EOL'ed)
|
|
106
|
+
* Rails Versioning: Drop support for 4.0.0 (EOL'ed)
|
|
107
|
+
|
|
108
|
+
4.2.4 (2015-06-05):
|
|
109
|
+
|
|
110
|
+
* Rollback backwards incompatible change, allowing paperclip to run on
|
|
111
|
+
Ruby >= 1.9.2.
|
|
112
|
+
|
|
113
|
+
4.2.3:
|
|
114
|
+
|
|
115
|
+
* Fix dependency specifications (didn't work with Rails 4.1)
|
|
116
|
+
* Fix paperclip tests in CI
|
|
117
|
+
|
|
118
|
+
4.2.2:
|
|
2
119
|
|
|
3
120
|
* Security fix: Fix a potential security issue with spoofing
|
|
4
121
|
|
|
5
|
-
|
|
122
|
+
4.2.1:
|
|
6
123
|
|
|
7
124
|
* Improvement: Added `validate_media_type` options to allow/bypass spoof check
|
|
8
125
|
* Improvement: Added incremental backoff when AWS gives us a SlowDown error.
|
|
@@ -12,14 +129,14 @@ New in 4.2.1:
|
|
|
12
129
|
* Improvement: Better escaping for characters in URLs
|
|
13
130
|
* Improvement: Honor `fog_credentials[:scheme]`
|
|
14
131
|
* Improvement: Also look for custom processors in lib/paperclip
|
|
15
|
-
* Improvement: id partitioning for string IDs works
|
|
132
|
+
* Improvement: id partitioning for string IDs works like integer id
|
|
16
133
|
* Improvement: Can pass options to DB adapters in migrations
|
|
17
134
|
* Improvement: Update expiring_url creation for later versions of fog
|
|
18
135
|
* Improvement: `path` can be a Proc in S3 attachments
|
|
19
136
|
* Test Fix: Improves speed and reliability of the specs
|
|
20
137
|
* Bug Fix: #original_filename= does not error when passed `nil`
|
|
21
138
|
|
|
22
|
-
|
|
139
|
+
4.2.0:
|
|
23
140
|
|
|
24
141
|
* Improvement: Converted test suite from test/unit to RSpec
|
|
25
142
|
* Improvement: Refactored Paperclip::Attachment#assign
|
|
@@ -35,7 +152,7 @@ New in 4.2.0:
|
|
|
35
152
|
* Improvement: Allow `nil` geometry strings
|
|
36
153
|
* Improvement: Use `eager_load!`
|
|
37
154
|
|
|
38
|
-
|
|
155
|
+
4.1.1:
|
|
39
156
|
|
|
40
157
|
* Improvement: Add default translations for spoof validation
|
|
41
158
|
* Bug Fix: Don't check for spoofs if the file hasn't changed
|
|
@@ -46,7 +163,7 @@ New in 4.1.1:
|
|
|
46
163
|
* Improvement: Allow travis-ci to finish-fast
|
|
47
164
|
|
|
48
165
|
|
|
49
|
-
|
|
166
|
+
4.1.0:
|
|
50
167
|
|
|
51
168
|
* Improvement: Add :content_type_mappings to correct for missing spoof types
|
|
52
169
|
* Improvement: Credit Egor Homakov with discovering the content_type spoof bug
|
|
@@ -54,7 +171,7 @@ New in 4.1.0:
|
|
|
54
171
|
* Improvement: Make MIME type optional for Data URIs.
|
|
55
172
|
* Improvement: Add default format for styles
|
|
56
173
|
|
|
57
|
-
|
|
174
|
+
4.0.0:
|
|
58
175
|
|
|
59
176
|
* Security: Attachments are checked to make sure they're not pulling a fast one.
|
|
60
177
|
* Security: It is now *enforced* that every attachment has a file/mime validation.
|
|
@@ -62,7 +179,7 @@ New in 4.0.0:
|
|
|
62
179
|
* Improvement: Added bullets to the 3.5.3 list of changes. Very important.
|
|
63
180
|
* Improvement: Updated the copyright to 2014
|
|
64
181
|
|
|
65
|
-
|
|
182
|
+
3.5.3:
|
|
66
183
|
|
|
67
184
|
* Improvement: After three long, hard years... we know how to upgrade
|
|
68
185
|
* Bug Fix: #expiring_url returns 'missing' urls if nothing is attached
|
|
@@ -84,14 +201,14 @@ New in 3.5.3:
|
|
|
84
201
|
* Test Improvement: Ensure more files are properly closed during tests
|
|
85
202
|
* Test Bug Fix: Return the gemfile's syntax to normal
|
|
86
203
|
|
|
87
|
-
|
|
204
|
+
3.5.2:
|
|
88
205
|
|
|
89
206
|
* Security: Force cocaine to at least 0.5.3 to include a security fix
|
|
90
207
|
* Improvement: Fixed some README exmaples
|
|
91
208
|
* Feature: Added HTTP URL Proxy Adapter, can assign string URLs as attachments
|
|
92
209
|
* Improvement: Put validation errors on the base attribute and the sub-attribute
|
|
93
210
|
|
|
94
|
-
|
|
211
|
+
3.5.1:
|
|
95
212
|
|
|
96
213
|
* Bug Fix: Returned the class-level `attachment_definitions` method for compatability.
|
|
97
214
|
* Improvement: Ensured compatability with Rails 4
|
|
@@ -99,7 +216,7 @@ New in 3.5.1:
|
|
|
99
216
|
* Bug Fix: #1296, where validations were generating errors
|
|
100
217
|
* Improvement: Specify MIT license in the gemspec
|
|
101
218
|
|
|
102
|
-
|
|
219
|
+
3.5.0:
|
|
103
220
|
|
|
104
221
|
* Feature: Handle Base64-encoded data URIs as uploads
|
|
105
222
|
* Feature: Add a FilenameCleaner class to allow custom filename sanitation
|
|
@@ -115,7 +232,7 @@ New in 3.5.0:
|
|
|
115
232
|
* Improvement: Added Ruby 2.0.0 as a supported platform and removed 1.8.7
|
|
116
233
|
* Improvement: Fixed some incompatabilities in the test suite
|
|
117
234
|
|
|
118
|
-
|
|
235
|
+
3.4.2:
|
|
119
236
|
|
|
120
237
|
* Improvement: Use https for Gemfile urls
|
|
121
238
|
* Improvement: Updated and more correct documentation
|
|
@@ -125,7 +242,7 @@ New in 3.4.2:
|
|
|
125
242
|
* Improvement: Remove path clash checking, as it's unnecessary
|
|
126
243
|
* Bug Fix: Do not rely on checking version numbers for aws-sdk
|
|
127
244
|
|
|
128
|
-
|
|
245
|
+
3.4.1:
|
|
129
246
|
|
|
130
247
|
* Improvement: Various documentation fixes and improvements
|
|
131
248
|
* Bug Fix: Clearing an attachment with `preserve_files` on should still clear the attachment
|
|
@@ -138,7 +255,7 @@ New in 3.4.1:
|
|
|
138
255
|
* Improvement: Update to latest cocaine
|
|
139
256
|
* Improvement: Update copyrights, various typos
|
|
140
257
|
|
|
141
|
-
|
|
258
|
+
3.4.0:
|
|
142
259
|
|
|
143
260
|
* Bug Fix: Allow UploadedFileAdapter to force the use of `file`
|
|
144
261
|
* Bug Fix: Close the file handle when dealing with URIs
|
|
@@ -168,11 +285,11 @@ New In 3.3.1:
|
|
|
168
285
|
|
|
169
286
|
* Bug Fix: Moved Filesystem's copy_to_local_file to the right place.
|
|
170
287
|
|
|
171
|
-
|
|
288
|
+
3.3.0:
|
|
172
289
|
|
|
173
290
|
* Improvement: Upgrade cocaine to 0.4
|
|
174
291
|
|
|
175
|
-
|
|
292
|
+
3.2.0:
|
|
176
293
|
|
|
177
294
|
* Bug Fix: Use the new correct Amazon S3 encryption header.
|
|
178
295
|
* Bug Fix: The rake task respects the updated_at column.
|
|
@@ -181,14 +298,14 @@ New in 3.2.0:
|
|
|
181
298
|
* Feature: Automatically rotate images.
|
|
182
299
|
* Feature: Reduce class-oriented programming of the attachment definitions.
|
|
183
300
|
|
|
184
|
-
|
|
301
|
+
3.1.4:
|
|
185
302
|
|
|
186
303
|
* Bug Fix: Allow user to be able to set path without `:style` attribute and not raising an error.
|
|
187
304
|
This is a regression introduced in 3.1.3, and that feature will be postponed to another minor
|
|
188
305
|
release instead.
|
|
189
306
|
* Feature: Allow for URI Adapter as an optional paperclip io adapter.
|
|
190
307
|
|
|
191
|
-
|
|
308
|
+
3.1.3:
|
|
192
309
|
|
|
193
310
|
* Bug Fix: Copy empty attachment between instances is now working.
|
|
194
311
|
* Bug Fix: Correctly rescue Fog error.
|
|
@@ -200,17 +317,17 @@ New in 3.1.3:
|
|
|
200
317
|
* Bug Fix: Paperclip now gracefully handles msising file command.
|
|
201
318
|
* Bug Fix: `StringIOAdapter` now accepts content type.
|
|
202
319
|
|
|
203
|
-
|
|
320
|
+
3.1.2:
|
|
204
321
|
|
|
205
322
|
* Bug Fix: #remove_attachment on 3.1.0 and 3.1.1 mistakenly trying to remove the column that has
|
|
206
323
|
the same name as data type (such as :string, :datetime, :interger.) You're advised to update to
|
|
207
324
|
Paperclip 3.1.2 as soon as possible.
|
|
208
325
|
|
|
209
|
-
|
|
326
|
+
3.1.1:
|
|
210
327
|
|
|
211
328
|
* Bug Fix: Paperclip will only load Paperclip::Schema only when Active Record is available.
|
|
212
329
|
|
|
213
|
-
|
|
330
|
+
3.1.0:
|
|
214
331
|
|
|
215
332
|
* Feature: Paperclip now support new migration syntax (sexy migration) that reads better:
|
|
216
333
|
|
|
@@ -249,11 +366,11 @@ New in 3.1.0:
|
|
|
249
366
|
the best_content_type to throw an error on trying nil.content_type.
|
|
250
367
|
* Bug Fix: Fix problem when the gem cannot be installed on the system that has Asepsis installed.
|
|
251
368
|
|
|
252
|
-
|
|
369
|
+
3.0.4:
|
|
253
370
|
|
|
254
371
|
* Feature: Adds support for S3 scheme-less URL generation.
|
|
255
372
|
|
|
256
|
-
|
|
373
|
+
3.0.3:
|
|
257
374
|
|
|
258
375
|
* Bug Fix: ThumbnailProcessor now correctly detects and preserve animated GIF.
|
|
259
376
|
* Bug Fix: File extension is now preserved in generated Tempfile from adapter.
|
|
@@ -276,7 +393,7 @@ New in 3.0.3:
|
|
|
276
393
|
* Bug Fix: Fix attachment.reprocess! when using storage providers fog and s3.
|
|
277
394
|
* Bug Fix: Fix a problem with incorrect content_type detected with 'file' command for an empty file on Mac.
|
|
278
395
|
|
|
279
|
-
|
|
396
|
+
3.0.2:
|
|
280
397
|
|
|
281
398
|
* API CHANGE: Generated migration class name is now plural (AddAttachmentToUsers instead of AddAttachmentToUser)
|
|
282
399
|
* API CHANGE: Remove Rails plugin initialization code.
|
|
@@ -285,13 +402,13 @@ New in 3.0.2:
|
|
|
285
402
|
* Bug Fix: Fix a problem when there's no logger specified.
|
|
286
403
|
* Bug Fix: Fix a problem when attaching Rack::Test::UploadedFile instance.
|
|
287
404
|
|
|
288
|
-
|
|
405
|
+
3.0.1:
|
|
289
406
|
|
|
290
407
|
* Feature: Introduce Paperlip IO adapter.
|
|
291
408
|
* Bug Fix: Regression in AttachmentContentTypeValidator has been fixed.
|
|
292
409
|
* API CHANGE: #to_file has been removed. Use the #copy_to_local_file method instead.
|
|
293
410
|
|
|
294
|
-
|
|
411
|
+
3.0.0:
|
|
295
412
|
|
|
296
413
|
* API CHANGE: Paperclip now requires at least Ruby on Rails version 3.0.0
|
|
297
414
|
* API CHANGE: The default :url and :path have changed. The new scheme avoids
|
|
@@ -310,7 +427,7 @@ New in 3.0.0:
|
|
|
310
427
|
* Bug Fix: File given to S3 and Fog storage will now be rewinded after flush_write.
|
|
311
428
|
* Feature: You can now pass addional parameter to S3 expiring URL, such as :content_type.
|
|
312
429
|
|
|
313
|
-
|
|
430
|
+
2.7.0:
|
|
314
431
|
|
|
315
432
|
* Bug Fix: Checking the existence of a file on S3 handles all AWS errors.
|
|
316
433
|
* Bug Fix: Clear the fingerprint when removing an attachment.
|
|
@@ -319,25 +436,25 @@ New in 2.7.0:
|
|
|
319
436
|
* Compatibility: Support for ActiveSupport < 2.3.12.
|
|
320
437
|
* Compatibility: Support for Rails 3.2.
|
|
321
438
|
|
|
322
|
-
|
|
439
|
+
2.6.0:
|
|
323
440
|
|
|
324
441
|
* Bug Fix: Files are re-wound after reading.
|
|
325
442
|
* Feature: Remove Rails dependency from specs that need Paperclip.
|
|
326
443
|
* Feature: Validation matchers support conditionals.
|
|
327
444
|
|
|
328
|
-
|
|
445
|
+
2.5.2:
|
|
329
446
|
|
|
330
447
|
* Bug Fix: Can be installed on Windows.
|
|
331
448
|
* Feature: The Fog bucket name, authentication, and host can be determined at runtime via Proc.
|
|
332
449
|
* Feature: Special characters are replaced with underscores in #url and #path.
|
|
333
450
|
|
|
334
|
-
|
|
451
|
+
2.5.1:
|
|
335
452
|
|
|
336
453
|
* Feature: After we've computed the content type, pass it to Fog.
|
|
337
454
|
* Feature: S3 encryption with the new :s3_server_side_encryption option.
|
|
338
455
|
* Feature: Works without ActiveRecord, allowing for e.g. mongo backends.
|
|
339
456
|
|
|
340
|
-
|
|
457
|
+
2.5.0:
|
|
341
458
|
|
|
342
459
|
* Performance: Only connect to S3 when absolutely needed.
|
|
343
460
|
* Bug Fix: STI with cached classes respect new options.
|