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 +4 -4
- data/app/config/gallerize_cli.yml +2 -0
- data/lib/gallerize_cli.rb +1 -1
- data/lib/gallerize_cli/image/version.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0c783dce91bee6d6735cc6740638bed96a1fc91
|
4
|
+
data.tar.gz: 223812afb6015693b654b7f878c74a2e5efa86b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64c37780aa290a34a99e752cca6940ed3071d30fde53db32ce3125f5f241f1cd8666d77722761c8dd9e9d45d149ac46befdd75f71e3253f206bc62e5ad154ca2
|
7
|
+
data.tar.gz: 4a38760e1ee2cb87c2170561f1a584974ea1a6d0ddcfee13bd9e67a2d9be2047bfb189405fb35e31460b7e98e6d42ba3d0a17ee04822af5be833609c3feb0fbe
|
data/lib/gallerize_cli.rb
CHANGED
@@ -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,
|
70
|
-
gravity =
|
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
|
+
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-
|
11
|
+
date: 2015-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|