paperclip 3.5.4 → 4.3.7
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.
- checksums.yaml +4 -4
- data/.gitignore +0 -6
- data/.hound.yml +1066 -0
- data/.rubocop.yml +1 -0
- data/.travis.yml +11 -17
- data/Appraisals +6 -14
- data/CONTRIBUTING.md +13 -8
- data/Gemfile +16 -3
- data/LICENSE +1 -3
- data/NEWS +167 -49
- data/README.md +294 -75
- data/RELEASING.md +17 -0
- data/Rakefile +6 -8
- data/features/basic_integration.feature +24 -6
- data/features/step_definitions/attachment_steps.rb +30 -22
- data/features/step_definitions/html_steps.rb +2 -2
- data/features/step_definitions/rails_steps.rb +44 -14
- data/features/step_definitions/web_steps.rb +1 -103
- data/features/support/env.rb +2 -2
- data/features/support/file_helpers.rb +2 -2
- data/features/support/fixtures/gemfile.txt +1 -1
- data/features/support/rails.rb +2 -1
- data/gemfiles/3.2.gemfile +14 -6
- data/gemfiles/4.1.gemfile +19 -0
- data/gemfiles/4.2.gemfile +19 -0
- data/lib/generators/paperclip/paperclip_generator.rb +0 -2
- data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +1 -1
- data/lib/paperclip/attachment.rb +132 -38
- data/lib/paperclip/attachment_registry.rb +1 -1
- data/lib/paperclip/callbacks.rb +11 -1
- data/lib/paperclip/content_type_detector.rb +25 -22
- data/lib/paperclip/deprecations.rb +42 -0
- data/lib/paperclip/errors.rb +5 -0
- data/lib/paperclip/file_command_content_type_detector.rb +6 -8
- data/lib/paperclip/geometry_detector_factory.rb +3 -1
- data/lib/paperclip/geometry_parser_factory.rb +1 -1
- data/lib/paperclip/has_attached_file.rb +10 -0
- data/lib/paperclip/interpolations/plural_cache.rb +6 -5
- data/lib/paperclip/interpolations.rb +25 -12
- data/lib/paperclip/io_adapters/abstract_adapter.rb +3 -1
- data/lib/paperclip/io_adapters/attachment_adapter.rb +4 -4
- data/lib/paperclip/io_adapters/data_uri_adapter.rb +5 -10
- data/lib/paperclip/io_adapters/stringio_adapter.rb +6 -10
- data/lib/paperclip/io_adapters/uri_adapter.rb +30 -11
- data/lib/paperclip/locales/de.yml +18 -0
- data/lib/paperclip/locales/en.yml +1 -0
- data/lib/paperclip/locales/es.yml +18 -0
- data/lib/paperclip/locales/ja.yml +18 -0
- data/lib/paperclip/locales/pt-BR.yml +18 -0
- data/lib/paperclip/locales/zh-CN.yml +18 -0
- data/lib/paperclip/locales/zh-HK.yml +18 -0
- data/lib/paperclip/locales/zh-TW.yml +18 -0
- data/lib/paperclip/matchers/have_attached_file_matcher.rb +2 -1
- data/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +2 -1
- data/lib/paperclip/matchers/validate_attachment_size_matcher.rb +2 -1
- data/lib/paperclip/media_type_spoof_detector.rb +89 -0
- data/lib/paperclip/processor.rb +0 -37
- data/lib/paperclip/processor_helpers.rb +50 -0
- data/lib/paperclip/rails_environment.rb +25 -0
- data/lib/paperclip/schema.rb +10 -2
- data/lib/paperclip/storage/filesystem.rb +1 -1
- data/lib/paperclip/storage/fog.rb +18 -7
- data/lib/paperclip/storage/s3.rb +53 -22
- data/lib/paperclip/style.rb +8 -2
- data/lib/paperclip/tempfile_factory.rb +5 -1
- data/lib/paperclip/thumbnail.rb +12 -10
- data/lib/paperclip/url_generator.rb +11 -3
- data/lib/paperclip/validators/attachment_content_type_validator.rb +4 -0
- data/lib/paperclip/validators/attachment_file_name_validator.rb +80 -0
- data/lib/paperclip/validators/attachment_file_type_ignorance_validator.rb +29 -0
- data/lib/paperclip/validators/attachment_presence_validator.rb +4 -0
- data/lib/paperclip/validators/attachment_size_validator.rb +11 -3
- data/lib/paperclip/validators/media_type_spoof_detection_validator.rb +27 -0
- data/lib/paperclip/validators.rb +10 -3
- data/lib/paperclip/version.rb +1 -1
- data/lib/paperclip.rb +26 -8
- data/lib/tasks/paperclip.rake +17 -2
- data/paperclip.gemspec +16 -14
- data/shoulda_macros/paperclip.rb +0 -1
- data/spec/paperclip/attachment_definitions_spec.rb +13 -0
- data/{test/attachment_processing_test.rb → spec/paperclip/attachment_processing_spec.rb} +20 -21
- data/spec/paperclip/attachment_registry_spec.rb +130 -0
- data/{test/attachment_test.rb → spec/paperclip/attachment_spec.rb} +438 -397
- data/{test/content_type_detector_test.rb → spec/paperclip/content_type_detector_spec.rb} +16 -19
- data/spec/paperclip/deprecations_spec.rb +65 -0
- data/{test/file_command_content_type_detector_test.rb → spec/paperclip/file_command_content_type_detector_spec.rb} +5 -6
- data/spec/paperclip/filename_cleaner_spec.rb +14 -0
- data/spec/paperclip/geometry_detector_spec.rb +39 -0
- data/{test/geometry_parser_test.rb → spec/paperclip/geometry_parser_spec.rb} +27 -27
- data/{test/geometry_test.rb → spec/paperclip/geometry_spec.rb} +50 -52
- data/spec/paperclip/glue_spec.rb +44 -0
- data/{test/has_attached_file_test.rb → spec/paperclip/has_attached_file_spec.rb} +45 -28
- data/{test/integration_test.rb → spec/paperclip/integration_spec.rb} +134 -126
- data/{test/interpolations_test.rb → spec/paperclip/interpolations_spec.rb} +70 -46
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +78 -0
- data/{test/io_adapters/attachment_adapter_test.rb → spec/paperclip/io_adapters/attachment_adapter_spec.rb} +27 -29
- data/{test/io_adapters/data_uri_adapter_test.rb → spec/paperclip/io_adapters/data_uri_adapter_spec.rb} +26 -17
- data/spec/paperclip/io_adapters/empty_string_adapter_spec.rb +17 -0
- data/{test/io_adapters/file_adapter_test.rb → spec/paperclip/io_adapters/file_adapter_spec.rb} +36 -40
- data/{test/io_adapters/http_url_proxy_adapter_test.rb → spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb} +31 -29
- data/spec/paperclip/io_adapters/identity_adapter_spec.rb +8 -0
- data/{test/io_adapters/nil_adapter_test.rb → spec/paperclip/io_adapters/nil_adapter_spec.rb} +7 -7
- data/{test/io_adapters/registry_test.rb → spec/paperclip/io_adapters/registry_spec.rb} +10 -7
- data/{test/io_adapters/stringio_adapter_test.rb → spec/paperclip/io_adapters/stringio_adapter_spec.rb} +20 -17
- data/{test/io_adapters/uploaded_file_adapter_test.rb → spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb} +41 -41
- data/{test/io_adapters/uri_adapter_test.rb → spec/paperclip/io_adapters/uri_adapter_spec.rb} +53 -28
- data/spec/paperclip/matchers/have_attached_file_matcher_spec.rb +19 -0
- data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +99 -0
- data/spec/paperclip/matchers/validate_attachment_presence_matcher_spec.rb +69 -0
- data/spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb +88 -0
- data/spec/paperclip/media_type_spoof_detector_spec.rb +79 -0
- data/spec/paperclip/meta_class_spec.rb +30 -0
- data/spec/paperclip/paperclip_missing_attachment_styles_spec.rb +84 -0
- data/{test/paperclip_test.rb → spec/paperclip/paperclip_spec.rb} +53 -48
- data/spec/paperclip/plural_cache_spec.rb +37 -0
- data/spec/paperclip/processor_helpers_spec.rb +57 -0
- data/{test/processor_test.rb → spec/paperclip/processor_spec.rb} +5 -5
- data/spec/paperclip/rails_environment_spec.rb +33 -0
- data/{test/rake_test.rb → spec/paperclip/rake_spec.rb} +15 -15
- data/spec/paperclip/schema_spec.rb +248 -0
- data/{test/storage/filesystem_test.rb → spec/paperclip/storage/filesystem_spec.rb} +18 -18
- data/spec/paperclip/storage/fog_spec.rb +535 -0
- data/spec/paperclip/storage/s3_live_spec.rb +182 -0
- data/spec/paperclip/storage/s3_spec.rb +1526 -0
- data/spec/paperclip/style_spec.rb +255 -0
- data/spec/paperclip/tempfile_factory_spec.rb +33 -0
- data/{test/thumbnail_test.rb → spec/paperclip/thumbnail_spec.rb} +123 -107
- data/spec/paperclip/url_generator_spec.rb +211 -0
- data/spec/paperclip/validators/attachment_content_type_validator_spec.rb +322 -0
- data/spec/paperclip/validators/attachment_file_name_validator_spec.rb +160 -0
- data/{test/validators/attachment_presence_validator_test.rb → spec/paperclip/validators/attachment_presence_validator_spec.rb} +20 -20
- data/{test/validators/attachment_size_validator_test.rb → spec/paperclip/validators/attachment_size_validator_spec.rb} +65 -58
- data/spec/paperclip/validators/media_type_spoof_detection_validator_spec.rb +52 -0
- data/spec/paperclip/validators_spec.rb +164 -0
- data/spec/spec_helper.rb +43 -0
- data/spec/support/assertions.rb +71 -0
- data/spec/support/deprecations.rb +9 -0
- data/spec/support/fake_model.rb +25 -0
- data/spec/support/fake_rails.rb +12 -0
- data/spec/support/fixtures/empty.html +1 -0
- data/spec/support/fixtures/empty.xlsx +0 -0
- data/spec/support/fixtures/spaced file.jpg +0 -0
- data/spec/support/matchers/accept.rb +5 -0
- data/spec/support/matchers/exist.rb +5 -0
- data/spec/support/matchers/have_column.rb +23 -0
- data/spec/support/model_reconstruction.rb +60 -0
- data/spec/support/rails_helpers.rb +7 -0
- data/spec/support/test_data.rb +13 -0
- data/spec/support/version_helper.rb +9 -0
- metadata +334 -219
- data/RUNNING_TESTS.md +0 -4
- data/gemfiles/3.0.gemfile +0 -11
- data/gemfiles/3.1.gemfile +0 -11
- data/gemfiles/4.0.gemfile +0 -11
- data/test/attachment_definitions_test.rb +0 -12
- data/test/attachment_registry_test.rb +0 -88
- data/test/filename_cleaner_test.rb +0 -14
- data/test/generator_test.rb +0 -84
- data/test/geometry_detector_test.rb +0 -24
- data/test/helper.rb +0 -232
- data/test/io_adapters/abstract_adapter_test.rb +0 -58
- data/test/io_adapters/empty_string_adapter_test.rb +0 -18
- data/test/io_adapters/identity_adapter_test.rb +0 -8
- data/test/matchers/have_attached_file_matcher_test.rb +0 -24
- data/test/matchers/validate_attachment_content_type_matcher_test.rb +0 -110
- data/test/matchers/validate_attachment_presence_matcher_test.rb +0 -69
- data/test/matchers/validate_attachment_size_matcher_test.rb +0 -86
- data/test/meta_class_test.rb +0 -32
- data/test/paperclip_missing_attachment_styles_test.rb +0 -90
- data/test/plural_cache_test.rb +0 -36
- data/test/schema_test.rb +0 -200
- data/test/storage/fog_test.rb +0 -473
- data/test/storage/s3_live_test.rb +0 -179
- data/test/storage/s3_test.rb +0 -1356
- data/test/style_test.rb +0 -213
- data/test/support/mock_model.rb +0 -2
- data/test/tempfile_factory_test.rb +0 -17
- data/test/url_generator_test.rb +0 -187
- data/test/validators/attachment_content_type_validator_test.rb +0 -324
- data/test/validators_test.rb +0 -61
- /data/{test → spec}/database.yml +0 -0
- /data/{test → spec/support}/fixtures/12k.png +0 -0
- /data/{test → spec/support}/fixtures/50x50.png +0 -0
- /data/{test → spec/support}/fixtures/5k.png +0 -0
- /data/{test → spec/support}/fixtures/animated +0 -0
- /data/{test → spec/support}/fixtures/animated.gif +0 -0
- /data/{test → spec/support}/fixtures/animated.unknown +0 -0
- /data/{test → spec/support}/fixtures/bad.png +0 -0
- /data/{test → spec/support}/fixtures/fog.yml +0 -0
- /data/{test → spec/support}/fixtures/rotated.jpg +0 -0
- /data/{test → spec/support}/fixtures/s3.yml +0 -0
- /data/{test → spec/support}/fixtures/spaced file.png +0 -0
- /data/{test → spec/support}/fixtures/text.txt +0 -0
- /data/{test → spec/support}/fixtures/twopage.pdf +0 -0
- /data/{test → spec/support}/fixtures/uppercase.PNG +0 -0
- /data/{test → spec}/support/mock_attachment.rb +0 -0
- /data/{test → spec}/support/mock_interpolator.rb +0 -0
- /data/{test → spec}/support/mock_url_generator_builder.rb +0 -0
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: .hound.yml
|
data/.travis.yml
CHANGED
@@ -1,28 +1,22 @@
|
|
1
1
|
rvm:
|
2
|
-
-
|
3
|
-
- 1
|
2
|
+
- 2.0
|
3
|
+
- 2.1
|
4
|
+
- 2.2.2
|
4
5
|
- jruby-19mode
|
5
|
-
- rbx-
|
6
|
-
- 2.0.0
|
7
|
-
- 2.1.0
|
6
|
+
- rbx-2
|
8
7
|
|
9
|
-
|
10
|
-
- "bundle install"
|
11
|
-
|
12
|
-
before_script: "sudo ntpdate -ub ntp.ubuntu.com pool.ntp.org; true"
|
13
|
-
script: "bundle exec rake clean test cucumber"
|
8
|
+
script: "bundle exec rake clean spec cucumber"
|
14
9
|
|
15
10
|
gemfile:
|
16
|
-
- gemfiles/3.0.gemfile
|
17
|
-
- gemfiles/3.1.gemfile
|
18
11
|
- gemfiles/3.2.gemfile
|
19
|
-
- gemfiles/4.
|
12
|
+
- gemfiles/4.1.gemfile
|
13
|
+
- gemfiles/4.2.gemfile
|
20
14
|
|
21
15
|
matrix:
|
16
|
+
fast_finish: true
|
22
17
|
allow_failures:
|
23
18
|
- rvm: jruby-19mode
|
24
|
-
- rvm: rbx-
|
19
|
+
- rvm: rbx-2
|
25
20
|
|
26
|
-
|
27
|
-
|
28
|
-
gemfile: gemfiles/4.0.gemfile
|
21
|
+
sudo: false
|
22
|
+
cache: bundler
|
data/Appraisals
CHANGED
@@ -1,19 +1,11 @@
|
|
1
|
-
appraise "3.
|
2
|
-
gem "rails", "~> 3.0
|
3
|
-
gem "paperclip", :path => "../"
|
4
|
-
end
|
5
|
-
|
6
|
-
appraise "3.1" do
|
7
|
-
gem "rails", "~> 3.1.12"
|
8
|
-
gem "paperclip", :path => "../"
|
1
|
+
appraise "3.2" do
|
2
|
+
gem "rails", "~> 3.2.0"
|
9
3
|
end
|
10
4
|
|
11
|
-
appraise "
|
12
|
-
gem "rails", "~>
|
13
|
-
gem "paperclip", :path => "../"
|
5
|
+
appraise "4.1" do
|
6
|
+
gem "rails", "~> 4.1.0"
|
14
7
|
end
|
15
8
|
|
16
|
-
appraise "4.
|
17
|
-
gem "rails", "~> 4.
|
18
|
-
gem "paperclip", :path => "../"
|
9
|
+
appraise "4.2" do
|
10
|
+
gem "rails", "~> 4.2.0"
|
19
11
|
end
|
data/CONTRIBUTING.md
CHANGED
@@ -6,7 +6,7 @@ We love pull requests. Here's a quick guide:
|
|
6
6
|
1. Fork the repo.
|
7
7
|
|
8
8
|
2. Run the tests. We only take pull requests with passing tests, and it's great
|
9
|
-
to know that you have a clean slate: `bundle && rake`
|
9
|
+
to know that you have a clean slate: `bundle && bundle exec rake`
|
10
10
|
|
11
11
|
3. Add a test for your change. Only refactoring and documentation changes
|
12
12
|
require no new tests. If you are adding functionality or fixing a bug, we need
|
@@ -17,8 +17,9 @@ a test!
|
|
17
17
|
5. Push to your fork and submit a pull request.
|
18
18
|
|
19
19
|
At this point you're waiting on us. We like to at least comment on, if not
|
20
|
-
accept, pull requests within
|
21
|
-
|
20
|
+
accept, pull requests within seven business days (most of the work on Paperclip
|
21
|
+
gets done on Fridays). We may suggest some changes or improvements or
|
22
|
+
alternatives.
|
22
23
|
|
23
24
|
Some things that will increase the chance that your pull request is accepted,
|
24
25
|
taken straight from the Ruby on Rails guide:
|
@@ -35,27 +36,31 @@ Paperclip uses [Appraisal](https://github.com/thoughtbot/appraisal) to aid
|
|
35
36
|
testing against multiple version of Ruby on Rails. This helps us to make sure
|
36
37
|
that Paperclip performs correctly with them.
|
37
38
|
|
39
|
+
Paperclip also uses [RSpec](http://rspec.info) for its unit tests. If you submit
|
40
|
+
tests that are not written for Cucumber or RSpec without a very good reason, you
|
41
|
+
will be asked to rewrite them before we'll accept.
|
42
|
+
|
38
43
|
### Bootstrapping your test suite:
|
39
44
|
|
40
45
|
bundle install
|
41
|
-
bundle exec
|
46
|
+
bundle exec appraisal install
|
42
47
|
|
43
48
|
This will install all the required gems that requires to test against each
|
44
49
|
version of Rails, which defined in `gemfiles/*.gemfile`.
|
45
50
|
|
46
51
|
### To run a full test suite:
|
47
52
|
|
48
|
-
bundle exec rake
|
53
|
+
bundle exec appraisal rake
|
49
54
|
|
50
|
-
This will run
|
55
|
+
This will run RSpec and Cucumber against all version of Rails
|
51
56
|
|
52
57
|
### To run single Test::Unit or Cucumber test
|
53
58
|
|
54
59
|
You need to specify a `BUNDLE_GEMFILE` pointing to the gemfile before running
|
55
60
|
the normal test command:
|
56
61
|
|
57
|
-
BUNDLE_GEMFILE=gemfiles/
|
58
|
-
BUNDLE_GEMFILE=gemfiles/
|
62
|
+
BUNDLE_GEMFILE=gemfiles/4.1.gemfile rspec spec/paperclip/attachment_spec.rb
|
63
|
+
BUNDLE_GEMFILE=gemfiles/4.1.gemfile cucumber features/basic_integration.feature
|
59
64
|
|
60
65
|
Syntax
|
61
66
|
------
|
data/Gemfile
CHANGED
@@ -2,7 +2,20 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem '
|
6
|
-
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
5
|
+
gem 'sqlite3', '~> 1.3.8', :platforms => :ruby
|
7
6
|
|
8
|
-
gem '
|
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
|
+
|
13
|
+
gem 'pry'
|
14
|
+
|
15
|
+
# Hinting at development dependencies
|
16
|
+
# Prevents bundler from taking a long-time to resolve
|
17
|
+
group :development, :test do
|
18
|
+
gem 'mime-types', '~> 1.16'
|
19
|
+
gem 'builder'
|
20
|
+
gem 'rubocop', require: false
|
21
|
+
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-2015 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
|
@@ -22,5 +22,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
22
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
23
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
24
|
THE SOFTWARE.
|
25
|
-
|
26
|
-
|
data/NEWS
CHANGED
@@ -1,37 +1,155 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
Bug Fix:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Improvement:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
1
|
+
4.3.7 (7/1/2016):
|
2
|
+
|
3
|
+
* Add deprecation warnings
|
4
|
+
* Improvement: Add `fog_options` configuration to send options to fog when storing files.
|
5
|
+
* Improvement: the `URI adapter` now uses the content-disposition header to name the downloaded file.
|
6
|
+
|
7
|
+
4.3.6 (3/13/2016):
|
8
|
+
|
9
|
+
* Bug Fix: When a spoofed media type is detected, megabytes of mime-types info are added to logs. See https://cwe.mitre.org/data/definitions/779.html.
|
10
|
+
|
11
|
+
4.3.5 (2/8/2016):
|
12
|
+
|
13
|
+
* Bug Fix: Remove deprecation warnings for v5.0 for now. Will re-add once the version has landed.
|
14
|
+
|
15
|
+
4.3.4 (2/2/2016):
|
16
|
+
|
17
|
+
* Bug Fix: Fix incompatible change from v4.3.3.
|
18
|
+
|
19
|
+
4.3.3 (1/29/2016):
|
20
|
+
|
21
|
+
* Improvement: Add deprecation warnings in preparation for release of v5.0
|
22
|
+
|
23
|
+
4.3.2 (11/18/2015):
|
24
|
+
|
25
|
+
* Performance: Reduce memory allocations (#2056)
|
26
|
+
|
27
|
+
4.3.1 (9/9/2015):
|
28
|
+
|
29
|
+
* Backport of bugfix to `remove_column`, so it works in Rails 3 and 4
|
30
|
+
c740fb171fe2f88c60b999d2a1c2122f2b8f43e9
|
31
|
+
* Fix GeometryParser regex for usage of '@>' flag
|
32
|
+
* `url` on a unpersisted record returns default_url
|
33
|
+
* spec deprecation warnings and failures
|
34
|
+
* README adjustments
|
35
|
+
|
36
|
+
4.3.0 (6/18/2015):
|
37
|
+
|
38
|
+
* Improvement: Update aws-sdk and cucumber gem versions.
|
39
|
+
* Improvement: Add `length` alias for `size` method in AbstractAdapter.
|
40
|
+
* Improvement: Removed some cruft
|
41
|
+
* Improvement: deep_merge! Attachment definitions
|
42
|
+
* Improvement: Switch to mimemagic gem for content-type detection
|
43
|
+
* Improvement: Allows multiple content types for spoof detector
|
44
|
+
* Bug Fix: Don't assume we have Rails.env if we have Rails
|
45
|
+
* Performance: Decrease Memory footprint
|
46
|
+
* Ruby Versioning: Drop support for 1.9.3 (EOL'ed)
|
47
|
+
* Rails Versioning: Drop support for 4.0.0 (EOL'ed)
|
48
|
+
|
49
|
+
4.2.4:
|
50
|
+
|
51
|
+
* Rollback backwards incompatible change, allowing paperclip to run on
|
52
|
+
Ruby >= 1.9.2.
|
53
|
+
|
54
|
+
4.2.3:
|
55
|
+
|
56
|
+
* Fix dependency specifications (didn't work with Rails 4.1)
|
57
|
+
* Fix paperclip tests in CI
|
58
|
+
|
59
|
+
4.2.2:
|
60
|
+
|
61
|
+
* Security fix: Fix a potential security issue with spoofing
|
62
|
+
|
63
|
+
4.2.1:
|
64
|
+
|
65
|
+
* Improvement: Added `validate_media_type` options to allow/bypass spoof check
|
66
|
+
* Improvement: Added incremental backoff when AWS gives us a SlowDown error.
|
67
|
+
* Improvement: Stream downloads when usign aws-sdk.
|
68
|
+
* Improvement: Documentation fixes, includes Windows instructions.
|
69
|
+
* Improvement: Added pt-BR, zh-HK, zh-CN, zh-TW, and ja-JP locales.
|
70
|
+
* Improvement: Better escaping for characters in URLs
|
71
|
+
* Improvement: Honor `fog_credentials[:scheme]`
|
72
|
+
* Improvement: Also look for custom processors in lib/paperclip
|
73
|
+
* Improvement: id partitioning for string IDs works like integer id
|
74
|
+
* Improvement: Can pass options to DB adapters in migrations
|
75
|
+
* Improvement: Update expiring_url creation for later versions of fog
|
76
|
+
* Improvement: `path` can be a Proc in S3 attachments
|
77
|
+
* Test Fix: Improves speed and reliability of the specs
|
78
|
+
* Bug Fix: #original_filename= does not error when passed `nil`
|
79
|
+
|
80
|
+
4.2.0:
|
81
|
+
|
82
|
+
* Improvement: Converted test suite from test/unit to RSpec
|
83
|
+
* Improvement: Refactored Paperclip::Attachment#assign
|
84
|
+
* Improvement: Added Spanish and German locales
|
85
|
+
* Improvement: Required Validators accept validator subclasses
|
86
|
+
* Improvement: EXIF orientation checking can be turned off for performance
|
87
|
+
* Improvement: Documentation updates
|
88
|
+
* Improvement: Better #human_size method for AttachmentSizeValidators
|
89
|
+
* Bug Fix: Allow MIME-types with dots in them
|
90
|
+
* Improvement: Travis CI updates
|
91
|
+
* Improvement: Validators can take multiple messages
|
92
|
+
* Improvement: Per-style options for S3 storage
|
93
|
+
* Improvement: Allow `nil` geometry strings
|
94
|
+
* Improvement: Use `eager_load!`
|
95
|
+
|
96
|
+
4.1.1:
|
97
|
+
|
98
|
+
* Improvement: Add default translations for spoof validation
|
99
|
+
* Bug Fix: Don't check for spoofs if the file hasn't changed
|
100
|
+
* Bug Fix: Callback chain terminator is different in Rails 4.1, remove warnings
|
101
|
+
* Improvement: Fixed various Ruby warnings
|
102
|
+
* Bug Fix: Give bundler a hint, so it doesn't run forever on a fresh bundle
|
103
|
+
* Improvement: Documentation fixes
|
104
|
+
* Improvement: Allow travis-ci to finish-fast
|
105
|
+
|
106
|
+
|
107
|
+
4.1.0:
|
108
|
+
|
109
|
+
* Improvement: Add :content_type_mappings to correct for missing spoof types
|
110
|
+
* Improvement: Credit Egor Homakov with discovering the content_type spoof bug
|
111
|
+
* Improvement: Memoize calls to identify in the thumbnail processor
|
112
|
+
* Improvement: Make MIME type optional for Data URIs.
|
113
|
+
* Improvement: Add default format for styles
|
114
|
+
|
115
|
+
4.0.0:
|
116
|
+
|
117
|
+
* Security: Attachments are checked to make sure they're not pulling a fast one.
|
118
|
+
* Security: It is now *enforced* that every attachment has a file/mime validation.
|
119
|
+
* Bug Fix: Removed a call to IOAdapter#close that was causing issues.
|
120
|
+
* Improvement: Added bullets to the 3.5.3 list of changes. Very important.
|
121
|
+
* Improvement: Updated the copyright to 2014
|
122
|
+
|
123
|
+
3.5.3:
|
124
|
+
|
125
|
+
* Improvement: After three long, hard years... we know how to upgrade
|
126
|
+
* Bug Fix: #expiring_url returns 'missing' urls if nothing is attached
|
127
|
+
* Improvement: Lots of documentation fixes
|
128
|
+
* Improvement: Lots of fixes for Ruby warnings
|
129
|
+
* Improvement: Test the most appropriate Ruby/Rails comobinations on Travis
|
130
|
+
* Improvement: Delegate more IO methods through IOAdapters
|
131
|
+
* Improvement: Remove Rails 4 deprecations
|
132
|
+
* Improvement: Both S3's and Fog's #expiring_url can take a Time or Int
|
133
|
+
* Bug Fix: Both S3's and Fog's expiring_url respect style when missing the file
|
134
|
+
* Bug Fix: Timefiles will have a reasonable-length name. They're all MD5 hashes now
|
135
|
+
* Bug Fix: Don't delete files off S3 when reprocessing due to AWS inconsistencies
|
136
|
+
* Bug Fix: "swallow_stream" isn't thread dafe. Use :swallow_stderr
|
137
|
+
* Improvement: Regexps use \A and \Z instead of ^ and $
|
138
|
+
* Improvement: :s3_credentials can take a lambda as an argument
|
139
|
+
* Improvement: Search up the class heirarchy for attachments
|
140
|
+
* Improvement: deep_merge options instead of regular merge
|
141
|
+
* Bug Fix: Prevent file deletion on transaction rollback
|
142
|
+
* Test Improvement: Ensure more files are properly closed during tests
|
143
|
+
* Test Bug Fix: Return the gemfile's syntax to normal
|
144
|
+
|
145
|
+
3.5.2:
|
28
146
|
|
29
147
|
* Security: Force cocaine to at least 0.5.3 to include a security fix
|
30
148
|
* Improvement: Fixed some README exmaples
|
31
149
|
* Feature: Added HTTP URL Proxy Adapter, can assign string URLs as attachments
|
32
150
|
* Improvement: Put validation errors on the base attribute and the sub-attribute
|
33
151
|
|
34
|
-
|
152
|
+
3.5.1:
|
35
153
|
|
36
154
|
* Bug Fix: Returned the class-level `attachment_definitions` method for compatability.
|
37
155
|
* Improvement: Ensured compatability with Rails 4
|
@@ -39,7 +157,7 @@ New in 3.5.1:
|
|
39
157
|
* Bug Fix: #1296, where validations were generating errors
|
40
158
|
* Improvement: Specify MIT license in the gemspec
|
41
159
|
|
42
|
-
|
160
|
+
3.5.0:
|
43
161
|
|
44
162
|
* Feature: Handle Base64-encoded data URIs as uploads
|
45
163
|
* Feature: Add a FilenameCleaner class to allow custom filename sanitation
|
@@ -55,7 +173,7 @@ New in 3.5.0:
|
|
55
173
|
* Improvement: Added Ruby 2.0.0 as a supported platform and removed 1.8.7
|
56
174
|
* Improvement: Fixed some incompatabilities in the test suite
|
57
175
|
|
58
|
-
|
176
|
+
3.4.2:
|
59
177
|
|
60
178
|
* Improvement: Use https for Gemfile urls
|
61
179
|
* Improvement: Updated and more correct documentation
|
@@ -65,7 +183,7 @@ New in 3.4.2:
|
|
65
183
|
* Improvement: Remove path clash checking, as it's unnecessary
|
66
184
|
* Bug Fix: Do not rely on checking version numbers for aws-sdk
|
67
185
|
|
68
|
-
|
186
|
+
3.4.1:
|
69
187
|
|
70
188
|
* Improvement: Various documentation fixes and improvements
|
71
189
|
* Bug Fix: Clearing an attachment with `preserve_files` on should still clear the attachment
|
@@ -78,7 +196,7 @@ New in 3.4.1:
|
|
78
196
|
* Improvement: Update to latest cocaine
|
79
197
|
* Improvement: Update copyrights, various typos
|
80
198
|
|
81
|
-
|
199
|
+
3.4.0:
|
82
200
|
|
83
201
|
* Bug Fix: Allow UploadedFileAdapter to force the use of `file`
|
84
202
|
* Bug Fix: Close the file handle when dealing with URIs
|
@@ -108,11 +226,11 @@ New In 3.3.1:
|
|
108
226
|
|
109
227
|
* Bug Fix: Moved Filesystem's copy_to_local_file to the right place.
|
110
228
|
|
111
|
-
|
229
|
+
3.3.0:
|
112
230
|
|
113
231
|
* Improvement: Upgrade cocaine to 0.4
|
114
232
|
|
115
|
-
|
233
|
+
3.2.0:
|
116
234
|
|
117
235
|
* Bug Fix: Use the new correct Amazon S3 encryption header.
|
118
236
|
* Bug Fix: The rake task respects the updated_at column.
|
@@ -121,14 +239,14 @@ New in 3.2.0:
|
|
121
239
|
* Feature: Automatically rotate images.
|
122
240
|
* Feature: Reduce class-oriented programming of the attachment definitions.
|
123
241
|
|
124
|
-
|
242
|
+
3.1.4:
|
125
243
|
|
126
244
|
* Bug Fix: Allow user to be able to set path without `:style` attribute and not raising an error.
|
127
245
|
This is a regression introduced in 3.1.3, and that feature will be postponed to another minor
|
128
246
|
release instead.
|
129
247
|
* Feature: Allow for URI Adapter as an optional paperclip io adapter.
|
130
248
|
|
131
|
-
|
249
|
+
3.1.3:
|
132
250
|
|
133
251
|
* Bug Fix: Copy empty attachment between instances is now working.
|
134
252
|
* Bug Fix: Correctly rescue Fog error.
|
@@ -140,17 +258,17 @@ New in 3.1.3:
|
|
140
258
|
* Bug Fix: Paperclip now gracefully handles msising file command.
|
141
259
|
* Bug Fix: `StringIOAdapter` now accepts content type.
|
142
260
|
|
143
|
-
|
261
|
+
3.1.2:
|
144
262
|
|
145
263
|
* Bug Fix: #remove_attachment on 3.1.0 and 3.1.1 mistakenly trying to remove the column that has
|
146
264
|
the same name as data type (such as :string, :datetime, :interger.) You're advised to update to
|
147
265
|
Paperclip 3.1.2 as soon as possible.
|
148
266
|
|
149
|
-
|
267
|
+
3.1.1:
|
150
268
|
|
151
269
|
* Bug Fix: Paperclip will only load Paperclip::Schema only when Active Record is available.
|
152
270
|
|
153
|
-
|
271
|
+
3.1.0:
|
154
272
|
|
155
273
|
* Feature: Paperclip now support new migration syntax (sexy migration) that reads better:
|
156
274
|
|
@@ -189,11 +307,11 @@ New in 3.1.0:
|
|
189
307
|
the best_content_type to throw an error on trying nil.content_type.
|
190
308
|
* Bug Fix: Fix problem when the gem cannot be installed on the system that has Asepsis installed.
|
191
309
|
|
192
|
-
|
310
|
+
3.0.4:
|
193
311
|
|
194
312
|
* Feature: Adds support for S3 scheme-less URL generation.
|
195
313
|
|
196
|
-
|
314
|
+
3.0.3:
|
197
315
|
|
198
316
|
* Bug Fix: ThumbnailProcessor now correctly detects and preserve animated GIF.
|
199
317
|
* Bug Fix: File extension is now preserved in generated Tempfile from adapter.
|
@@ -216,7 +334,7 @@ New in 3.0.3:
|
|
216
334
|
* Bug Fix: Fix attachment.reprocess! when using storage providers fog and s3.
|
217
335
|
* Bug Fix: Fix a problem with incorrect content_type detected with 'file' command for an empty file on Mac.
|
218
336
|
|
219
|
-
|
337
|
+
3.0.2:
|
220
338
|
|
221
339
|
* API CHANGE: Generated migration class name is now plural (AddAttachmentToUsers instead of AddAttachmentToUser)
|
222
340
|
* API CHANGE: Remove Rails plugin initialization code.
|
@@ -225,13 +343,13 @@ New in 3.0.2:
|
|
225
343
|
* Bug Fix: Fix a problem when there's no logger specified.
|
226
344
|
* Bug Fix: Fix a problem when attaching Rack::Test::UploadedFile instance.
|
227
345
|
|
228
|
-
|
346
|
+
3.0.1:
|
229
347
|
|
230
348
|
* Feature: Introduce Paperlip IO adapter.
|
231
349
|
* Bug Fix: Regression in AttachmentContentTypeValidator has been fixed.
|
232
350
|
* API CHANGE: #to_file has been removed. Use the #copy_to_local_file method instead.
|
233
351
|
|
234
|
-
|
352
|
+
3.0.0:
|
235
353
|
|
236
354
|
* API CHANGE: Paperclip now requires at least Ruby on Rails version 3.0.0
|
237
355
|
* API CHANGE: The default :url and :path have changed. The new scheme avoids
|
@@ -250,7 +368,7 @@ New in 3.0.0:
|
|
250
368
|
* Bug Fix: File given to S3 and Fog storage will now be rewinded after flush_write.
|
251
369
|
* Feature: You can now pass addional parameter to S3 expiring URL, such as :content_type.
|
252
370
|
|
253
|
-
|
371
|
+
2.7.0:
|
254
372
|
|
255
373
|
* Bug Fix: Checking the existence of a file on S3 handles all AWS errors.
|
256
374
|
* Bug Fix: Clear the fingerprint when removing an attachment.
|
@@ -259,25 +377,25 @@ New in 2.7.0:
|
|
259
377
|
* Compatibility: Support for ActiveSupport < 2.3.12.
|
260
378
|
* Compatibility: Support for Rails 3.2.
|
261
379
|
|
262
|
-
|
380
|
+
2.6.0:
|
263
381
|
|
264
382
|
* Bug Fix: Files are re-wound after reading.
|
265
383
|
* Feature: Remove Rails dependency from specs that need Paperclip.
|
266
384
|
* Feature: Validation matchers support conditionals.
|
267
385
|
|
268
|
-
|
386
|
+
2.5.2:
|
269
387
|
|
270
388
|
* Bug Fix: Can be installed on Windows.
|
271
389
|
* Feature: The Fog bucket name, authentication, and host can be determined at runtime via Proc.
|
272
390
|
* Feature: Special characters are replaced with underscores in #url and #path.
|
273
391
|
|
274
|
-
|
392
|
+
2.5.1:
|
275
393
|
|
276
394
|
* Feature: After we've computed the content type, pass it to Fog.
|
277
395
|
* Feature: S3 encryption with the new :s3_server_side_encryption option.
|
278
396
|
* Feature: Works without ActiveRecord, allowing for e.g. mongo backends.
|
279
397
|
|
280
|
-
|
398
|
+
2.5.0:
|
281
399
|
|
282
400
|
* Performance: Only connect to S3 when absolutely needed.
|
283
401
|
* Bug Fix: STI with cached classes respect new options.
|