image_processing 1.12.1 → 1.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +16 -1
- data/image_processing.gemspec +1 -1
- data/lib/image_processing/chainable.rb +7 -5
- data/lib/image_processing/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31d06cb35ac94ec0787b21dd2118626f3a3a96685efab0d7eb58d9079b1fbf2c
|
4
|
+
data.tar.gz: 8f840074b8fe9511e59f4f005d144e39c9aba4d0699a48c29ffc6cb2513ec645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d0fb1d9363b9b85e1895d05849a5c29b2c50b8213bf9e9d6ff8c2e1391a9bf6448a4e319a4cfd747183ec741ac42d6b1b1b9629ee91d97cc4a287ec6615042c
|
7
|
+
data.tar.gz: dd31dd0ca012ceb35aa276c5e00efd3e9bd2c40246f9b063ea39280ea13c546373fa641518fb55ebcf0e9d00ad6020be995b8d8636c8a3939bda31c643485cef
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -29,10 +29,18 @@ how to resize and process images.
|
|
29
29
|
|
30
30
|
1. Install ImageMagick and/or libvips:
|
31
31
|
|
32
|
-
|
32
|
+
In a Mac terminal:
|
33
|
+
|
34
|
+
```sh
|
33
35
|
$ brew install imagemagick vips
|
34
36
|
```
|
35
37
|
|
38
|
+
In a debian/ubuntu terminal:
|
39
|
+
|
40
|
+
```sh
|
41
|
+
$ sudo apt install imagemagick libvips
|
42
|
+
```
|
43
|
+
|
36
44
|
2. Add the gem to your Gemfile:
|
37
45
|
|
38
46
|
```rb
|
@@ -181,10 +189,17 @@ pipeline
|
|
181
189
|
|
182
190
|
Our test suite requires both `imagemagick` and `libvips` libraries to be installed.
|
183
191
|
|
192
|
+
In a Mac terminal:
|
193
|
+
|
184
194
|
```
|
185
195
|
$ brew install imagemagick vips
|
186
196
|
```
|
187
197
|
|
198
|
+
In a debian/ubuntu terminal:
|
199
|
+
```shell
|
200
|
+
sudo apt install imagemagick libvips
|
201
|
+
```
|
202
|
+
|
188
203
|
Afterwards you can run tests with
|
189
204
|
|
190
205
|
```
|
data/image_processing.gemspec
CHANGED
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "minitest", "~> 5.8"
|
24
24
|
spec.add_development_dependency "minitest-hooks", ">= 1.4.2"
|
25
25
|
spec.add_development_dependency "minispec-metadata"
|
26
|
-
spec.add_development_dependency "
|
26
|
+
spec.add_development_dependency "dhash-vips"
|
27
27
|
end
|
@@ -34,13 +34,13 @@ module ImageProcessing
|
|
34
34
|
def apply(operations)
|
35
35
|
operations.inject(self) do |builder, (name, argument)|
|
36
36
|
if argument == true || argument == nil
|
37
|
-
builder.
|
37
|
+
builder.public_send(name)
|
38
38
|
elsif argument.is_a?(Array)
|
39
|
-
builder.
|
39
|
+
builder.public_send(name, *argument)
|
40
40
|
elsif argument.is_a?(Hash)
|
41
|
-
builder.
|
41
|
+
builder.public_send(name, **argument)
|
42
42
|
else
|
43
|
-
builder.
|
43
|
+
builder.public_send(name, argument)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -53,7 +53,9 @@ module ImageProcessing
|
|
53
53
|
# Call the defined processing and get the result. Allows specifying
|
54
54
|
# the source file and destination.
|
55
55
|
def call(file = nil, destination: nil, **call_options)
|
56
|
-
options = {
|
56
|
+
options = {}
|
57
|
+
options[:source] = file if file
|
58
|
+
options[:destination] = destination if destination
|
57
59
|
|
58
60
|
branch(**options).call!(**call_options)
|
59
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_processing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
110
|
+
name: dhash-vips
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
113
|
- - ">="
|
@@ -144,7 +144,7 @@ homepage: https://github.com/janko/image_processing
|
|
144
144
|
licenses:
|
145
145
|
- MIT
|
146
146
|
metadata: {}
|
147
|
-
post_install_message:
|
147
|
+
post_install_message:
|
148
148
|
rdoc_options: []
|
149
149
|
require_paths:
|
150
150
|
- lib
|
@@ -159,8 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.
|
163
|
-
signing_key:
|
162
|
+
rubygems_version: 3.3.3
|
163
|
+
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: High-level wrapper for processing images for the web with ImageMagick or
|
166
166
|
libvips.
|