paperclip 6.0.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +5 -5
  2. data/.github/issue_template.md +3 -0
  3. data/MIGRATING-ES.md +317 -0
  4. data/MIGRATING.md +375 -0
  5. data/NEWS +17 -0
  6. data/README.md +26 -4
  7. data/UPGRADING +3 -3
  8. data/features/step_definitions/attachment_steps.rb +10 -10
  9. data/lib/paperclip.rb +1 -0
  10. data/lib/paperclip/attachment.rb +19 -6
  11. data/lib/paperclip/filename_cleaner.rb +0 -1
  12. data/lib/paperclip/geometry_detector_factory.rb +1 -1
  13. data/lib/paperclip/interpolations.rb +6 -1
  14. data/lib/paperclip/io_adapters/abstract_adapter.rb +11 -10
  15. data/lib/paperclip/io_adapters/attachment_adapter.rb +7 -1
  16. data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +2 -1
  17. data/lib/paperclip/io_adapters/uri_adapter.rb +8 -6
  18. data/lib/paperclip/logger.rb +1 -1
  19. data/lib/paperclip/media_type_spoof_detector.rb +8 -5
  20. data/lib/paperclip/processor.rb +10 -2
  21. data/lib/paperclip/schema.rb +1 -1
  22. data/lib/paperclip/storage/fog.rb +1 -1
  23. data/lib/paperclip/style.rb +0 -1
  24. data/lib/paperclip/thumbnail.rb +4 -1
  25. data/lib/paperclip/validators/media_type_spoof_detection_validator.rb +4 -0
  26. data/lib/paperclip/version.rb +1 -1
  27. data/spec/paperclip/attachment_processing_spec.rb +0 -1
  28. data/spec/paperclip/attachment_spec.rb +17 -2
  29. data/spec/paperclip/filename_cleaner_spec.rb +0 -1
  30. data/spec/paperclip/integration_spec.rb +41 -5
  31. data/spec/paperclip/interpolations_spec.rb +9 -0
  32. data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +28 -0
  33. data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +33 -16
  34. data/spec/paperclip/io_adapters/uri_adapter_spec.rb +56 -8
  35. data/spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb +1 -1
  36. data/spec/paperclip/media_type_spoof_detector_spec.rb +26 -0
  37. data/spec/paperclip/schema_spec.rb +46 -46
  38. data/spec/paperclip/style_spec.rb +0 -1
  39. data/spec/paperclip/thumbnail_spec.rb +5 -3
  40. data/spec/paperclip/url_generator_spec.rb +0 -1
  41. data/spec/support/model_reconstruction.rb +2 -2
  42. metadata +9 -6
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  require 'spec_helper'
3
2
 
4
3
  describe Paperclip::Style do
@@ -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
- assert_raises(Paperclip::Error) do
183
- silence_stream(STDERR) do
182
+ silence_stream(STDERR) do
183
+ expect {
184
184
  @thumb.make
185
- end
185
+ }.to raise_error(
186
+ Paperclip::Error, /unrecognized option `-this-aint-no-option'/
187
+ )
186
188
  end
187
189
  end
188
190
 
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  require 'spec_helper'
3
2
 
4
3
  describe Paperclip::UrlGenerator do
@@ -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 table_name, &block
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, :integer
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.0.0
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-03-09 00:00:00.000000000 Z
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 >= 2.0.0.
581
+ Paperclip is now compatible with aws-sdk-s3.
579
582
 
580
- If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
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.6.11
610
+ rubygems_version: 2.7.4
608
611
  signing_key:
609
612
  specification_version: 4
610
613
  summary: File attachments as attributes for ActiveRecord