image_quality_check 0.2.2 → 0.2.4

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
  SHA256:
3
- metadata.gz: 072a442643498f99201a80d2a59a89e9ead7463be6eda2155b2aa6f75ae58ba1
4
- data.tar.gz: abc1a41f55e99a72ce454b7208b03260910491acb65dcc79fb2710c086549622
3
+ metadata.gz: a5e8a3bce1a00b6023e31a34dc3e1acabc1dc9d80450f059a7934d7ef2925d4e
4
+ data.tar.gz: 515cebc68693cbc6d213846c428dd9111665fd6588e189349f2ec32a4c5677a6
5
5
  SHA512:
6
- metadata.gz: c59a8d561a40a222c141e8c81f2f0d92d801656116b458d58724c2066a45cbe11721503b038a23ae1cacb32898df9349d1b28da6c4ee0731d9611f1a210171f1
7
- data.tar.gz: afb99bb8b3231c245ef11c3efa8c6e421020033b6df32c5ed0c9acc0a9201659a5c7e4ed57eefc89a78c558d089df32da71d442df9f8b0ef3d8ab8d01cb32db9
6
+ metadata.gz: dab40cad5a0269f737635b721ae62b86d875aa69e88e23189924236370afa3256df316e5517d4c9106ec7df832707eb4e1973cd19923505bfccb8e0c84291350
7
+ data.tar.gz: 0d6bbac089bc474a671d125eed15f3dc0222c738d5ff8a2b26fda0a6692bd924372371324bc9ff1b21a28369ad6f33aba5aee52bf8bbf20e31c7520ee8a7ab18
@@ -20,7 +20,7 @@ module ImageQualityCheck::DSL
20
20
  @current_rule << { name: name, block: block, weight: weight }
21
21
  end
22
22
 
23
- def preferred_formats_rule(formats, weight: 1)
23
+ def preferred_formats_rule(weight: 1, **formats)
24
24
  rule I18n.t("image_quality_check.dsl.format"), weight: weight do |result, on_error|
25
25
  final_score = nil
26
26
  formats.each do |f, score|
@@ -1,3 +1,3 @@
1
1
  module ImageQualityCheck
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -17,6 +17,8 @@ module ImageQualityCheck
17
17
  # image magick gif delay bug invalid json
18
18
  # https://github.com/ImageMagick/ImageMagick/issues/1624
19
19
  out.gsub!(/("delay": "[^"]+")\n/m, "\\1,\n")
20
+ return {} if out.empty?
21
+
20
22
  raw_json = JSON.parse(out)
21
23
  json = raw_json.is_a?(Array) ? raw_json.first['image'] : raw_json['image']
22
24
  background_is_transparent =
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_quality_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Wienert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-19 00:00:00.000000000 Z
11
+ date: 2023-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.2.0.rc.1
76
+ rubygems_version: 3.2.15
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Thin gem wrapper that uses imagemagick and python-opencv to help determine