mini_magick 4.2.4 → 4.2.5

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: 8aceebe51bb1048d1c278bc2e62cc380d69478a1
4
- data.tar.gz: 680cf6fbd416b7e6ad4eb6be6ac4c4511043c12d
3
+ metadata.gz: 5d12d070a6cade08e59789a2eea4aa5a34b7974e
4
+ data.tar.gz: f0fdaaa0272473a90c2dc69a3d4bbd856e252c43
5
5
  SHA512:
6
- metadata.gz: 94248ff16bec98b38585bd742623e777d2b2019f5af568939d74829d104642f2cb2932a2eedf707e050360baf75b81ea77dc9729a5bd0c173237e84e025fd5c6
7
- data.tar.gz: dcc5e762bafebbc6b44f6e1db27375ba139f09475f06a3ecc97b874b46c2927f123698e20a9aa2444e126125d9565220d5b580930217a99623251a3669045cda
6
+ metadata.gz: e9fa5b044807be690f968325ed52a755e1cd8fd3361242b9f36cb3e89945dafeb513e6ebcd4ce509f5ecdf914ba48d73233286581d7268a2f093529611f8865a
7
+ data.tar.gz: 79220b3f2fe46676b1c6ab8411bac0099eb377520ecd86af873555c133e644dad97acc6f6916d7c89a15bc95573a9a505d7ddcadc0d6e7dd5033f562e3f9bb92
@@ -100,10 +100,10 @@ module MiniMagick
100
100
  def details
101
101
  @info["details"] ||= (
102
102
  details_string = identify(&:verbose)
103
- details_string.each_line.with_object([]).inject({}) do |details_hash, (line, key_stack)|
103
+ key_stack = []
104
+ details_string.lines[1..-1].each_with_object({}) do |line, details_hash|
104
105
  level = line[/^\s*/].length / 2 - 1
105
- next details_hash if level == -1 # we ignore the root level
106
- key_stack.pop if level < key_stack.size
106
+ key_stack.pop until key_stack.size <= level
107
107
 
108
108
  key, _, value = line.partition(/:[\s\n]/).map(&:strip)
109
109
  hash = key_stack.inject(details_hash) { |hash, key| hash.fetch(key) }
@@ -113,8 +113,6 @@ module MiniMagick
113
113
  else
114
114
  hash[key] = value
115
115
  end
116
-
117
- details_hash
118
116
  end
119
117
  )
120
118
  end
@@ -229,7 +229,7 @@ module MiniMagick
229
229
  #
230
230
  def option(*options)
231
231
  options.each do |option|
232
- define_method(option[1..-1].gsub('-', '_')) do |*values|
232
+ define_method(option[1..-1].tr('-', '_')) do |*values|
233
233
  self << option
234
234
  self.merge!(values)
235
235
  self
@@ -9,7 +9,7 @@ module MiniMagick
9
9
  module VERSION
10
10
  MAJOR = 4
11
11
  MINOR = 2
12
- TINY = 4
12
+ TINY = 5
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.4
4
+ version: 4.2.5
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-05-11 00:00:00.000000000 Z
16
+ date: 2015-05-28 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rake