mojo_magick 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eac3d5826a0b9a1ec1af5f3e2fc9426fa1ae5e6e
4
- data.tar.gz: 4df48720e9ebda2703298deb9fbb06ed7ce9baf7
3
+ metadata.gz: 50a45302825af74fc985fd903d6f493407c243f4
4
+ data.tar.gz: 7d535139b1d46cf04ffa4b003d290b3c806e7e2a
5
5
  SHA512:
6
- metadata.gz: a79fbec51705e82b87e0a88b1f230a35bc9b1dad95633f687658e9019223c249e935b74c39e9b489f55f6163b43b940008ff179c5d75489e28ba905fe499a473
7
- data.tar.gz: d36c224300d79d6308b02b426e175c9f136777b73e35b61cbb32f9b9619ca1b58274c779e9b74292ebd2b6fc5a5cc9e9b1a274a01b4a95a4511b1e730a9d88c6
6
+ metadata.gz: fd3cfe567c2f35d7a87a68843b7139f728ad388fdecbbac03ef0a1f97468dfe3c0b71fb4705372e5b36044c9a0f0cc2346efe8fa86119cf6493bcb462dfaedc3
7
+ data.tar.gz: 9b8db5160797881095e8551a4540cd4e10ef8f23efb4d8d2d22bcef9d2cc45f703c263442822caf04f169ff64192a511259eb1bbd44b2c5bdcbf523b79fa509c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mojo_magick (0.5.5)
4
+ mojo_magick (0.5.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -146,11 +146,15 @@ module MojoMagick
146
146
  Font.all
147
147
  end
148
148
 
149
+ def MojoMagick::get_format(source_file, format_string)
150
+ retval = raw_command("identify", "-format \"#{format_string}\" \"#{source_file}\"")
151
+ end
152
+
149
153
  # returns an empty hash or a hash with :width and :height set (e.g. {:width => INT, :height => INT})
150
154
  # raises MojoFailed when results are indeterminate (width and height could not be determined)
151
155
  def MojoMagick::get_image_size(source_file)
152
156
  # returns width, height of image if available, nil if not
153
- retval = raw_command("identify", "-format \"w:%w h:%h\" \"#{source_file}\"")
157
+ retval = self.get_format(source_file, %q|w:%w h:%h|)
154
158
  return {} if !retval
155
159
  width = retval.match(%r{w:([0-9]+) })
156
160
  width = width ? width[1].to_i : nil
@@ -1,3 +1,3 @@
1
1
  module MojoMagick
2
- VERSION = '0.5.5'
2
+ VERSION = '0.5.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mojo_magick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Midgley
@@ -124,7 +124,7 @@ rubyforge_project: mojo_magick
124
124
  rubygems_version: 2.2.2
125
125
  signing_key:
126
126
  specification_version: 4
127
- summary: mojo_magick-0.5.5
127
+ summary: mojo_magick-0.5.6
128
128
  test_files:
129
129
  - test/fixtures/5742.jpg
130
130
  - test/fixtures/not_an_image.jpg