jr-paperclip 8.0.6 → 8.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2020e672706019bc2f09c85e93f350cb076e1734e3b86d6083d57f41d6f0a62e
4
- data.tar.gz: c18c81c981656da9ee280b5394123e5bb965ce2ca50b9cacf0e6fbacc7dddeaf
3
+ metadata.gz: c6f82555ee3f8910d061b36b9aadf5191e6a25e0bfd3d76f6022405a43020784
4
+ data.tar.gz: 82816bd5d6e23b6104a4b518e1b24e3945503878deac4761ec5312fe252548dd
5
5
  SHA512:
6
- metadata.gz: 20acbf5988e931bbf2825b4d9515dce71bbf9f854ae307b235ec280b9e71d023cd17bd63a3c9cc7dd217f8311c3d882a7311ed42d275c5d5f65da2d73dff9a9c
7
- data.tar.gz: 31e48aaa2f00722b445bcc1fc7af6bc1f1440cbc6ee6632442c5c9e234fb15fb8e485bf8e41af84ced410949a129231f6c18e154f387f7401d5a6819548631eb
6
+ metadata.gz: 7b42267a2e65083835fcf28041042c6dff92e953ffac30e25ebd55ae74c1d341a88b9f9176bda59ab2751c464230e60f87f4ed2a3c9d874ebee3c42b4a43ba87
7
+ data.tar.gz: 0444c975aa115cf08eb3ead118bfd5bfc4a1119a05f29dc87b3a49bfd7d1cfeb33820ea7c778b75fd3d1aa54c91cbe222fa8bdd18c965556428fb704cc501b2f
@@ -1,3 +1,9 @@
1
+ 8.0.7 (2026-06-11)
2
+
3
+ * Performance: Fix repeated animation probing in Thumbnail.
4
+ * Bugfix: The global backend (Paperclip.options[:backend]) is now read at processing time instead of
5
+ being captured into Attachment.default_options when that hash is first built.
6
+
1
7
  8.0.6 (2026-05-22)
2
8
 
3
9
  * Chore: Update image_processing runtime dependency to ~> 2.0
@@ -36,8 +36,7 @@ module Paperclip
36
36
  validate_media_type: true,
37
37
  adapter_options: { hash_digest: Digest::MD5 },
38
38
  check_validity_before_processing: true,
39
- return_file_attributes_on_destroy: false,
40
- backend: Paperclip.options[:backend]
39
+ return_file_attributes_on_destroy: false
41
40
  }
42
41
  end
43
42
 
@@ -641,12 +641,16 @@ module Paperclip
641
641
  end
642
642
 
643
643
  def animated_source?
644
- @animated_source ||= begin
644
+ return @animated_source if defined?(@animated_source)
645
+
646
+ @animated_source = begin
645
647
  case backend
646
648
  when :vips
647
- vips_image(File.expand_path(@file.path)).get("n-pages").to_i > 1
649
+ vips_image(File.expand_path(@file.path), access: :sequential).get("n-pages").to_i > 1
648
650
  when :image_magick
649
- identify("-format %n :file", file: File.expand_path(@file.path)).to_i > 1
651
+ # Limit identify to the first two frames: counting all frames with
652
+ # %n decodes the entire file, which is expensive for large animations.
653
+ identify("-format %n :file", file: "#{File.expand_path(@file.path)}[0-1]").to_i > 1
650
654
  else
651
655
  extension_indicates_animation?
652
656
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paperclip
4
- VERSION = "8.0.6"
4
+ VERSION = "8.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jr-paperclip
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.6
4
+ version: 8.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jukka Rautanen
@@ -427,9 +427,9 @@ extensions: []
427
427
  extra_rdoc_files: []
428
428
  files:
429
429
  - ".rubocop.yml"
430
+ - CHANGELOG.md
430
431
  - CONTRIBUTING.md
431
432
  - LICENSE
432
- - NEWS
433
433
  - README.md
434
434
  - RELEASING.md
435
435
  - Rakefile