jr-paperclip 8.0.4 → 8.0.5

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: 9b2623772668074ed1759914f0ae6f8fc2cbce60a4e9938d8b3f29c4c2bfa39b
4
- data.tar.gz: 87a30e5c39dbdf9287cdca2004b4b59f93c86b03ed33dedafdf82356e5efbcf8
3
+ metadata.gz: b63c264ed4ec7e8a00ebe22cb4eac94ea8f6b5530a4913264e164ad29dd685ab
4
+ data.tar.gz: fc375ca5e00cd92a7adaa411c4af7cfa37d2c2ac38e15ef86d86abe9352308ef
5
5
  SHA512:
6
- metadata.gz: 1ce9bd64c1e5e03ce3204e048d61dcd9f4bb64b5175c273dbbf65e93deedc8c81eee67183027b48af3e6a24076c1ecf63b070de5977c2ef664dca2d46e1e4419
7
- data.tar.gz: 1b58ae63ba200cdac3ac918cc7f37ae86724a0740013d6ea8b013abe29ff35bc77941f91da41bbc90c9fa5134ddd76e20b0e7077f878556f9d30c879c8996ac3
6
+ metadata.gz: f4edd845fcf7c7c9a77ca816c2472a95004d5808d629e0f35c246558225f60b8354b0f888ab4c37f60e0c8a994fe471d7cc8aa78ae2eb3977421264b47c365ee
7
+ data.tar.gz: 23794daef4c3ad192ad97c89e98d681873ff77dc1a48613f7c7b09109e5863fab3e19d0f0b21f63c1040f2eb32c1e94dd096b9621af297d9e0ffb1ccdbf4643f
data/NEWS CHANGED
@@ -1,3 +1,8 @@
1
+ 8.0.5 (2026-05-21)
2
+
3
+ * Improvement: Avoid anonymous evals
4
+ * Chore: Remove legacy Ruby and Rails compatibility branches
5
+
1
6
  8.0.4 (2026-05-08)
2
7
 
3
8
  * Improvement: Add frozen string literal comments and update mutable string builders for frozen string compatibility.
@@ -11,14 +11,15 @@ module Paperclip
11
11
  def define_paperclip_callbacks(*callbacks)
12
12
  define_callbacks(*[callbacks, { terminator: hasta_la_vista_baby }].flatten)
13
13
  callbacks.each do |callback|
14
- eval <<-end_callbacks
15
- def before_#{callback}(*args, &blk)
14
+ class_eval(<<~RUBY, __FILE__, __LINE__ + 1)
15
+ def self.before_#{callback}(*args, &blk)
16
16
  set_callback(:#{callback}, :before, *args, &blk)
17
17
  end
18
- def after_#{callback}(*args, &blk)
18
+
19
+ def self.after_#{callback}(*args, &blk)
19
20
  set_callback(:#{callback}, :after, *args, &blk)
20
21
  end
21
- end_callbacks
22
+ RUBY
22
23
  end
23
24
  end
24
25
 
@@ -52,20 +52,10 @@ module Paperclip
52
52
  "index.html"
53
53
  end
54
54
 
55
- if RUBY_VERSION < '2.5'
56
- def download_content
57
- options = { read_timeout: Paperclip.options[:read_timeout] }.compact
55
+ def download_content
56
+ options = { read_timeout: Paperclip.options[:read_timeout] }.compact
58
57
 
59
- # rubocop:disable Security/Open
60
- open(@target, options)
61
- # rubocop:enable Security/Open
62
- end
63
- else
64
- def download_content
65
- options = { read_timeout: Paperclip.options[:read_timeout] }.compact
66
-
67
- URI.open(@target, options)
68
- end
58
+ URI.open(@target, options)
69
59
  end
70
60
 
71
61
  def copy_to_tempfile(src)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paperclip
4
- VERSION = "8.0.4".freeze
4
+ VERSION = "8.0.5"
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.4
4
+ version: 8.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jukka Rautanen
@@ -487,7 +487,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
487
487
  version: '0'
488
488
  requirements:
489
489
  - ImageMagick or libvips
490
- rubygems_version: 4.0.6
490
+ rubygems_version: 4.0.10
491
491
  specification_version: 4
492
492
  summary: File attachments as attributes for ActiveRecord
493
493
  test_files: []