paperclip 6.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/issue_template.md +3 -0
- data/MIGRATING-ES.md +317 -0
- data/MIGRATING.md +375 -0
- data/NEWS +17 -0
- data/README.md +26 -4
- data/UPGRADING +3 -3
- data/features/step_definitions/attachment_steps.rb +10 -10
- data/lib/paperclip.rb +1 -0
- data/lib/paperclip/attachment.rb +19 -6
- data/lib/paperclip/filename_cleaner.rb +0 -1
- data/lib/paperclip/geometry_detector_factory.rb +1 -1
- data/lib/paperclip/interpolations.rb +6 -1
- data/lib/paperclip/io_adapters/abstract_adapter.rb +11 -10
- data/lib/paperclip/io_adapters/attachment_adapter.rb +7 -1
- data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +2 -1
- data/lib/paperclip/io_adapters/uri_adapter.rb +8 -6
- data/lib/paperclip/logger.rb +1 -1
- data/lib/paperclip/media_type_spoof_detector.rb +8 -5
- data/lib/paperclip/processor.rb +10 -2
- data/lib/paperclip/schema.rb +1 -1
- data/lib/paperclip/storage/fog.rb +1 -1
- data/lib/paperclip/style.rb +0 -1
- data/lib/paperclip/thumbnail.rb +4 -1
- data/lib/paperclip/validators/media_type_spoof_detection_validator.rb +4 -0
- data/lib/paperclip/version.rb +1 -1
- data/spec/paperclip/attachment_processing_spec.rb +0 -1
- data/spec/paperclip/attachment_spec.rb +17 -2
- data/spec/paperclip/filename_cleaner_spec.rb +0 -1
- data/spec/paperclip/integration_spec.rb +41 -5
- data/spec/paperclip/interpolations_spec.rb +9 -0
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +28 -0
- data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +33 -16
- data/spec/paperclip/io_adapters/uri_adapter_spec.rb +56 -8
- data/spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb +1 -1
- data/spec/paperclip/media_type_spoof_detector_spec.rb +26 -0
- data/spec/paperclip/schema_spec.rb +46 -46
- data/spec/paperclip/style_spec.rb +0 -1
- data/spec/paperclip/thumbnail_spec.rb +5 -3
- data/spec/paperclip/url_generator_spec.rb +0 -1
- data/spec/support/model_reconstruction.rb +2 -2
- metadata +9 -6
@@ -179,10 +179,12 @@ describe Paperclip::Thumbnail do
|
|
179
179
|
end
|
180
180
|
|
181
181
|
it "errors when trying to create the thumbnail" do
|
182
|
-
|
183
|
-
|
182
|
+
silence_stream(STDERR) do
|
183
|
+
expect {
|
184
184
|
@thumb.make
|
185
|
-
|
185
|
+
}.to raise_error(
|
186
|
+
Paperclip::Error, /unrecognized option `-this-aint-no-option'/
|
187
|
+
)
|
186
188
|
end
|
187
189
|
end
|
188
190
|
|
@@ -27,7 +27,7 @@ module ModelReconstruction
|
|
27
27
|
ActiveRecord::Base.connection.create_table :dummies, {force: true}, &block
|
28
28
|
end
|
29
29
|
|
30
|
-
def modify_table
|
30
|
+
def modify_table &block
|
31
31
|
ActiveRecord::Base.connection.change_table :dummies, &block
|
32
32
|
end
|
33
33
|
|
@@ -37,7 +37,7 @@ module ModelReconstruction
|
|
37
37
|
table.column :other, :string
|
38
38
|
table.column :avatar_file_name, :string
|
39
39
|
table.column :avatar_content_type, :string
|
40
|
-
table.column :avatar_file_size, :
|
40
|
+
table.column :avatar_file_size, :bigint
|
41
41
|
table.column :avatar_updated_at, :datetime
|
42
42
|
table.column :avatar_fingerprint, :string
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Yurek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -382,6 +382,7 @@ extensions: []
|
|
382
382
|
extra_rdoc_files: []
|
383
383
|
files:
|
384
384
|
- ".codeclimate.yml"
|
385
|
+
- ".github/issue_template.md"
|
385
386
|
- ".gitignore"
|
386
387
|
- ".hound.yml"
|
387
388
|
- ".rubocop.yml"
|
@@ -390,6 +391,8 @@ files:
|
|
390
391
|
- CONTRIBUTING.md
|
391
392
|
- Gemfile
|
392
393
|
- LICENSE
|
394
|
+
- MIGRATING-ES.md
|
395
|
+
- MIGRATING.md
|
393
396
|
- NEWS
|
394
397
|
- README.md
|
395
398
|
- RELEASING.md
|
@@ -575,9 +578,9 @@ post_install_message: |
|
|
575
578
|
# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
|
576
579
|
##################################################
|
577
580
|
|
578
|
-
Paperclip is now compatible with aws-sdk
|
581
|
+
Paperclip is now compatible with aws-sdk-s3.
|
579
582
|
|
580
|
-
If you are using S3 storage, aws-sdk
|
583
|
+
If you are using S3 storage, aws-sdk-s3 requires you to make a few small
|
581
584
|
changes:
|
582
585
|
|
583
586
|
* You must set the `s3_region`
|
@@ -586,7 +589,7 @@ post_install_message: |
|
|
586
589
|
using a hyphen. For example, `:public_read` needs to be changed to
|
587
590
|
`public-read`.
|
588
591
|
|
589
|
-
For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
|
592
|
+
For a walkthrough of upgrading from 4 to *5* (not 6) and aws-sdk >= 2.0 you can watch
|
590
593
|
http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
|
591
594
|
rdoc_options: []
|
592
595
|
require_paths:
|
@@ -604,7 +607,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
604
607
|
requirements:
|
605
608
|
- ImageMagick
|
606
609
|
rubyforge_project:
|
607
|
-
rubygems_version: 2.
|
610
|
+
rubygems_version: 2.7.4
|
608
611
|
signing_key:
|
609
612
|
specification_version: 4
|
610
613
|
summary: File attachments as attributes for ActiveRecord
|