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 +4 -4
- data/NEWS +5 -0
- data/lib/paperclip/callbacks.rb +5 -4
- data/lib/paperclip/io_adapters/uri_adapter.rb +3 -13
- data/lib/paperclip/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b63c264ed4ec7e8a00ebe22cb4eac94ea8f6b5530a4913264e164ad29dd685ab
|
|
4
|
+
data.tar.gz: fc375ca5e00cd92a7adaa411c4af7cfa37d2c2ac38e15ef86d86abe9352308ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
data/lib/paperclip/callbacks.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
18
|
+
|
|
19
|
+
def self.after_#{callback}(*args, &blk)
|
|
19
20
|
set_callback(:#{callback}, :after, *args, &blk)
|
|
20
21
|
end
|
|
21
|
-
|
|
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
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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)
|
data/lib/paperclip/version.rb
CHANGED
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
|
+
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.
|
|
490
|
+
rubygems_version: 4.0.10
|
|
491
491
|
specification_version: 4
|
|
492
492
|
summary: File attachments as attributes for ActiveRecord
|
|
493
493
|
test_files: []
|