mmozjpeg 0.2.0 → 0.3.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
  SHA256:
3
- metadata.gz: 98a64c3718ed021e374723d0e539c6527db4b8195a22e93f0a661cc455088069
4
- data.tar.gz: b20ecb33aa884b188365acd934dc43cc46aa09e314e5932a2d9f1f931f5370a5
3
+ metadata.gz: bd74c934370540ff1c270a3c0a1053f2ded092376c04b9a8dd1b713ace13739d
4
+ data.tar.gz: 13288b13f4720b4318d37f15ebb175f242915d271943d9035e90a38d2674889b
5
5
  SHA512:
6
- metadata.gz: 94ac9aba37c7736c462ccbdd7e3402e5944d161482ad129f5be71f4adc364eb1ed674ce99ba1f3219cf079754d68ad1ee07acca24069c1af6fb8a2c1401e43ba
7
- data.tar.gz: '0841f4904895983d3c0ee9c55beffc466ae9a85a5276f4e2240d6f6d71d841c778cb5ea4539ce6f6c4b31e1dbbb5210aae0a6d1f92f1da485befe21c3d7a1dfb'
6
+ metadata.gz: 787fdfcb73fa1f9b3c1873b1f1bfbd97633353049967542f74b838a994c8b1fac8d35e82b81ca9431e9548bfd9420058742dc9762191fc1c73e8c64f6fb5f9bb
7
+ data.tar.gz: 4e7eeebb4c02a3579726b134eb0f9fabb211ac59f7cdc82504b23dabcc4159162ae200a4ddff4e518b9fd1cd725984046609f968214e990705adf55a88543c21
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mmozjpeg (0.2.0)
4
+ mmozjpeg (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -28,7 +28,7 @@ GEM
28
28
  diff-lcs (>= 1.2.0, < 2.0)
29
29
  rspec-support (~> 3.10.0)
30
30
  rspec-support (3.10.2)
31
- rubocop (1.11.0)
31
+ rubocop (1.12.1)
32
32
  parallel (~> 1.10)
33
33
  parser (>= 3.0.0.0)
34
34
  rainbow (>= 2.2.2, < 4.0)
@@ -43,8 +43,8 @@ GEM
43
43
  rubocop (>= 0.90.0, < 2.0)
44
44
  rubocop-ast (>= 0.4.0)
45
45
  ruby-progressbar (1.11.0)
46
- standard (1.0.4)
47
- rubocop (= 1.11.0)
46
+ standard (1.0.5)
47
+ rubocop (= 1.12.1)
48
48
  rubocop-performance (= 1.10.1)
49
49
  standardrb (1.0.0)
50
50
  standard
@@ -52,6 +52,7 @@ GEM
52
52
 
53
53
  PLATFORMS
54
54
  ruby
55
+ x86_64-linux
55
56
 
56
57
  DEPENDENCIES
57
58
  mmozjpeg!
@@ -60,4 +61,4 @@ DEPENDENCIES
60
61
  standardrb
61
62
 
62
63
  BUNDLED WITH
63
- 2.1.4
64
+ 2.2.16
data/lib/mmozjpeg.rb CHANGED
@@ -12,7 +12,7 @@ module Mmozjpeg
12
12
  # [False] "cjpeg" NOT exists
13
13
  def supported?
14
14
  args = ["cjpeg", "-version"]
15
- _, s = Open3.capture2(*args)
15
+ _, _, s = Open3.capture3(*args)
16
16
  s
17
17
  rescue Errno::ENOENT
18
18
  false
@@ -28,6 +28,13 @@ module Mmozjpeg
28
28
  parsed_quality = ["-quality", quality.split(",").map { |v| Integer(v) }.join(",")]
29
29
  end
30
30
  parsed_infile = Pathname(infile).cleanpath.to_s unless infile.nil?
31
+
32
+ if !outfile.nil? || !grayscale.nil? || !rgb.nil? || !optimize.nil? || !progressive.nil? ||
33
+ !targa.nil? || !arithmetic.nil? || !dct.nil? || !icc.nil? || !restart.nil? || !maxmemory.nil? ||
34
+ !memdst.nil? || !report.nil? || !verbose.nil? || !debug.nil? || !version.nil? ||
35
+ !baseline.nil? || !qtables.nil? || !qslots.nil? || !sample.nil? || !scans.nil?
36
+ raise Mmozjpeg::Error, "Oop, This option is'nt yet supported."
37
+ end
31
38
  args = [cjpeg, parsed_quality, parsed_infile].select { |v| !v.nil? }.flatten!
32
39
  Open3.capture2(*args)
33
40
  end
@@ -1,3 +1,3 @@
1
1
  module Mmozjpeg
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mmozjpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FUNABARA Masao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-07 00:00:00.000000000 Z
11
+ date: 2021-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standardrb