imgry 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Imgry
3
3
  extend self
4
4
 
5
5
  def scale(orig_width, orig_height, geometry)
6
- return [orig_width, orig_height] if geometry.blank?
6
+ # TODO: basic verification of geometry syntax
7
7
 
8
8
  op = geometry[-1] # Expecting !, >, <, or nothing
9
9
  new_width, new_height = nil, nil
@@ -18,6 +18,7 @@ module Imgry
18
18
  end
19
19
 
20
20
  def resize!(geometry)
21
+ return if geometry.nil?
21
22
  new_width, new_height = Geometry.scale(width, height, geometry)
22
23
 
23
24
  @img = Scalr.resize(@img,
@@ -31,7 +31,8 @@ module Imgry
31
31
  end
32
32
 
33
33
  def resize!(geometry)
34
- @img.resize(geometry) if !geometry.nil?
34
+ return if geometry.nil?
35
+ @img.resize(geometry)
35
36
  nil
36
37
  end
37
38
 
@@ -1,3 +1,3 @@
1
1
  module Imgry
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imgry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: