mini_magick 4.2.1 → 4.2.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of mini_magick might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/mini_magick/image.rb +3 -3
- data/lib/mini_magick/image/info.rb +10 -11
- data/lib/mini_magick/tool.rb +0 -2
- data/lib/mini_magick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b11755872c6d7075df247147d9e999ef3bca850
|
4
|
+
data.tar.gz: 622b385dab7bc2d5b87a821ececef02cb43fe8ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a471047183fcc4543156d4d5bd262574335446eeb17de78083779dccc03a375f8c3b48597ffc4939cbca07934c70c510778acbe349a1e2ef7e1e9650b646086d
|
7
|
+
data.tar.gz: cf48a927e44d8c4978d4a2f8bc4d2e981d4ef79bc2fc9c2be484ab1a243dcd9a6c90eae98a2bd8419d93ff0c50434d562c9d926de12470ec7b41d8b1af2a0edb
|
data/lib/mini_magick/image.rb
CHANGED
@@ -489,14 +489,12 @@ module MiniMagick
|
|
489
489
|
end
|
490
490
|
end
|
491
491
|
|
492
|
-
private
|
493
|
-
|
494
492
|
def mogrify(page = nil)
|
495
493
|
@info.clear
|
496
494
|
|
497
495
|
MiniMagick::Tool::Mogrify.new do |builder|
|
498
496
|
builder.instance_eval do
|
499
|
-
def format(*)
|
497
|
+
def format(*args)
|
500
498
|
fail NoMethodError,
|
501
499
|
"you must call #format on a MiniMagick::Image directly"
|
502
500
|
end
|
@@ -508,6 +506,8 @@ module MiniMagick
|
|
508
506
|
self
|
509
507
|
end
|
510
508
|
|
509
|
+
private
|
510
|
+
|
511
511
|
def layer?
|
512
512
|
path =~ /\[\d+\]$/
|
513
513
|
end
|
@@ -52,6 +52,8 @@ module MiniMagick
|
|
52
52
|
|
53
53
|
@info.fetch(value)
|
54
54
|
end
|
55
|
+
rescue ArgumentError, TypeError
|
56
|
+
raise MiniMagick::Invalid, "image data can't be read"
|
55
57
|
end
|
56
58
|
|
57
59
|
def colorspace
|
@@ -103,18 +105,15 @@ module MiniMagick
|
|
103
105
|
details_string.each_line.with_object([]).inject({}) do |details_hash, (line, key_stack)|
|
104
106
|
level = line[/^\s*/].length / 2 - 1
|
105
107
|
next details_hash if level == -1 # we ignore the root level
|
108
|
+
key_stack.pop if level < key_stack.size
|
109
|
+
|
110
|
+
key, _, value = line.partition(/:[\s\n]/).map(&:strip)
|
106
111
|
hash = key_stack.inject(details_hash) { |hash, key| hash.fetch(key) }
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
key_stack.push key
|
113
|
-
else
|
114
|
-
hash[key] = value
|
115
|
-
end
|
116
|
-
elsif level < key_stack.size
|
117
|
-
key_stack.pop
|
112
|
+
if value.empty?
|
113
|
+
hash[key] = {}
|
114
|
+
key_stack.push key
|
115
|
+
else
|
116
|
+
hash[key] = value
|
118
117
|
end
|
119
118
|
|
120
119
|
details_hash
|
data/lib/mini_magick/tool.rb
CHANGED
data/lib/mini_magick/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Johnson
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-04-
|
16
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: rake
|