image_processing 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of image_processing might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e15f100c14c6b60a0107e1d3b2f6ff41e2890f9ecd1fb3f73ae4838249650746
4
- data.tar.gz: 2a8c07a6891465aebb7d172354780a5cba8d75933c4c7354d7b68acf8c6b321f
3
+ metadata.gz: b5141a7684e311666d6a8a91bf74cd791757df4bafe8b989f42c4785aa7bd2bf
4
+ data.tar.gz: 2639145e388bf411cbf03559151c12a5eec8757e96b6bd52ae993533e7559781
5
5
  SHA512:
6
- metadata.gz: 21f23471ac04698370c6b3a77a82d8a4be70a754ff4f5440ae91ee03a9d1e52c03b5b0bf0a54e7bd523fdb174ecc805158dd0a013ad88bfa1c3945cc2b973c81
7
- data.tar.gz: f90f0ae07f460358571b929ef2f831fdb640bbbcfda7c7ba9f6416e0d24ea303c8431e0cd193137d4228a626c0f74a7f09839f732db0289c092459e7c4c28ade
6
+ metadata.gz: aa03273ffdb5d53a8cd944921db4e6359fb198e308373a15618c4c824cbe981e41c40544f7b64f1008175de30d2ea60f92cfb346564f1d4166e164d27759c4af
7
+ data.tar.gz: febc2324ceccb4b0fca18c708ad3c2423239fa458065cb74790a574e8149acc6285709d356eb99ec2896611803cc536707b47c1b3b3c68b3067377fb881dffb0
@@ -1,3 +1,7 @@
1
+ ## 1.10.1 (2020-01-07)
2
+
3
+ * [vips] Fix compatibility with ruby-vips 2.0.17+ (@janko)
4
+
1
5
  ## 1.10.0 (2019-12-18)
2
6
 
3
7
  * [minimagick] Add `:loader` option for explicitly setting input file type (@janko)
data/README.md CHANGED
@@ -42,9 +42,9 @@ how to resize and process images.
42
42
 
43
43
  ## Usage
44
44
 
45
- Processing is performed through [`ImageProcessing::Vips`] or
46
- [`ImageProcessing::MiniMagick`] modules. Both modules share the same chainable
47
- API for defining the processing pipeline:
45
+ Processing is performed through **[`ImageProcessing::Vips`]** or
46
+ **[`ImageProcessing::MiniMagick`]** modules. Both modules share the same
47
+ chainable API for defining the processing pipeline:
48
48
 
49
49
  ```rb
50
50
  require "image_processing/mini_magick"
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ["lib"]
18
18
 
19
19
  spec.add_dependency "mini_magick", ">= 4.9.5", "< 5"
20
- spec.add_dependency "ruby-vips", ">= 2.0.13", "< 3"
20
+ spec.add_dependency "ruby-vips", ">= 2.0.17", "< 3"
21
21
 
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "minitest", "~> 5.8"
@@ -1,3 +1,3 @@
1
1
  module ImageProcessing
2
- VERSION = "1.10.0"
2
+ VERSION = "1.10.1"
3
3
  end
@@ -54,7 +54,7 @@ module ImageProcessing
54
54
  # pipeline defined in the Vips::Image object. Accepts additional
55
55
  # saver-specific options (e.g. quality).
56
56
  def self.save_image(image, path, saver: nil, quality: nil, **options)
57
- options = options.merge(Q: quality) if quality
57
+ options[:Q] = quality if quality
58
58
 
59
59
  if saver
60
60
  image.public_send(:"#{saver}save", path, **options)
@@ -187,15 +187,11 @@ module ImageProcessing
187
187
  # output image format. Each of these loaders and savers accept slightly
188
188
  # different options, so to allow the user to be able to specify options
189
189
  # for a specific loader/saver and have it ignored for other
190
- # loaders/savers, we do a little bit of introspection and filter out
191
- # options that don't exist for a particular loader or saver.
190
+ # loaders/savers, we do some introspection and filter out options that
191
+ # don't exist for a particular loader or saver.
192
192
  def select_valid_options(operation_name, options)
193
- operation = ::Vips::Operation.new(operation_name)
194
-
195
- operation_options = operation.get_construct_args
196
- .select { |name, flags| (flags & ::Vips::ARGUMENT_INPUT) != 0 }
197
- .select { |name, flags| (flags & ::Vips::ARGUMENT_REQUIRED) == 0 }
198
- .map(&:first).map(&:to_sym)
193
+ introspect = ::Vips::Introspect.get(operation_name)
194
+ operation_options = introspect.optional_input.keys.map(&:to_sym)
199
195
 
200
196
  options.select { |name, value| operation_options.include?(name) }
201
197
  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.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2020-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 2.0.13
39
+ version: 2.0.17
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '3'
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 2.0.13
49
+ version: 2.0.17
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '3'
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.1.1
161
+ rubygems_version: 3.1.2
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Set of higher-level helper methods for image processing.