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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49b81b26769187774c378282a38bcdc9dfdacc8b
4
- data.tar.gz: cce11e45efbe18ab9a6a2d4d70d5d6ff4f2d02b4
3
+ metadata.gz: 5b11755872c6d7075df247147d9e999ef3bca850
4
+ data.tar.gz: 622b385dab7bc2d5b87a821ececef02cb43fe8ad
5
5
  SHA512:
6
- metadata.gz: 665e1299b109c62778a9d75569e1fd3db842af8d1bd6c19bdf6026a325f9c971a52d6f6700d90bf3e748278c42cb25f03e1a1339cbf61890cf67c3e1112bc170
7
- data.tar.gz: 846180eb935c1209a479dcb3bfbb3960855b9fe10164ea01f747ede2f6604df01e35aad2afa29e706d1c7fa5a3c5d78ebf3fe7444cf8b8cce285e511ed79c96a
6
+ metadata.gz: a471047183fcc4543156d4d5bd262574335446eeb17de78083779dccc03a375f8c3b48597ffc4939cbca07934c70c510778acbe349a1e2ef7e1e9650b646086d
7
+ data.tar.gz: cf48a927e44d8c4978d4a2f8bc4d2e981d4ef79bc2fc9c2be484ab1a243dcd9a6c90eae98a2bd8419d93ff0c50434d562c9d926de12470ec7b41d8b1af2a0edb
@@ -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
- key, value = line.split(":", 2).map(&:strip)
108
-
109
- if level == key_stack.size
110
- if value.empty?
111
- hash[key] = {}
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
@@ -184,8 +184,6 @@ module MiniMagick
184
184
  self << ")"
185
185
  end
186
186
 
187
- private
188
-
189
187
  ##
190
188
  # Dynamically generates modules with dynamically generated option methods
191
189
  # for each command-line tool. It uses the `-help` page of a command-line
@@ -9,7 +9,7 @@ module MiniMagick
9
9
  module VERSION
10
10
  MAJOR = 4
11
11
  MINOR = 2
12
- TINY = 1
12
+ TINY = 3
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
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.1
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-06 00:00:00.000000000 Z
16
+ date: 2015-04-15 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rake