gallerize-cli 0.4.1 → 0.5.0

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: 50a9c63da9fef25d0a4fbebc16d10c49b6c8a03e
4
- data.tar.gz: fc49251737594df00baaeb40a133f427ccaf5994
3
+ metadata.gz: b0c783dce91bee6d6735cc6740638bed96a1fc91
4
+ data.tar.gz: 223812afb6015693b654b7f878c74a2e5efa86b2
5
5
  SHA512:
6
- metadata.gz: b5c26ca9c02295420c9d8d589849d65bc95dcd8502207c313a80f4fb716e84a9beb761b37f5bbd7739420d8f9fe2d59a39f268314e5a1318ee03a0c34d7ecd0b
7
- data.tar.gz: 123e89a48f1c4a0037569fce9e338c3043889da40fba43d14d4fa24a9fc84652306e3ad17e0c0424d7cd2a332d0d0b0a64d7af98ab835eade05d16d08a17da3d
6
+ metadata.gz: 64c37780aa290a34a99e752cca6940ed3071d30fde53db32ce3125f5f241f1cd8666d77722761c8dd9e9d45d149ac46befdd75f71e3253f206bc62e5ad154ca2
7
+ data.tar.gz: 4a38760e1ee2cb87c2170561f1a584974ea1a6d0ddcfee13bd9e67a2d9be2047bfb189405fb35e31460b7e98e6d42ba3d0a17ee04822af5be833609c3feb0fbe
@@ -14,10 +14,12 @@ versions:
14
14
  thumb:
15
15
  width: 400
16
16
  height: 300
17
+ crop: true
17
18
 
18
19
  large:
19
20
  width: 1600
20
21
  height: 1200
22
+ crop: false
21
23
 
22
24
  parallel:
23
25
  in_processes: 8
@@ -6,7 +6,7 @@ require 'logger'
6
6
 
7
7
  module GallerizeCli
8
8
 
9
- VERSION='0.4.1'
9
+ VERSION='0.5.0'
10
10
 
11
11
  class << self
12
12
  def perform
@@ -37,6 +37,10 @@ module GallerizeCli
37
37
  options.height.to_i
38
38
  end
39
39
 
40
+ def method
41
+ options.method
42
+ end
43
+
40
44
  def valid?
41
45
  !!@valid
42
46
  end
@@ -66,8 +70,8 @@ module GallerizeCli
66
70
  GallerizeCli.logger.debug "#{err} image.file_name: #{image.file_name} name: #{name} options: #{options}"
67
71
  end
68
72
 
69
- def resize_with_crop(img, w, h, options = {})
70
- gravity = options[:gravity] || :center
73
+ def resize_with_crop(img, w, h, opts = {})
74
+ gravity = opts[:gravity] || :center
71
75
 
72
76
  w_original, h_original = [img[:width].to_f, img[:height].to_f]
73
77
 
@@ -89,7 +93,7 @@ module GallerizeCli
89
93
  img.combine_options do |i|
90
94
  i.resize(op_resize)
91
95
  i.gravity(gravity)
92
- i.crop "#{w.to_i}x#{h.to_i}+#{w_offset}+#{h_offset}!"
96
+ i.crop "#{w.to_i}x#{h.to_i}+#{w_offset}+#{h_offset}!" if options.crop
93
97
  end
94
98
 
95
99
  img
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gallerize-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick