mpngquant 0.1.0 → 0.2.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: 9025663b2b0f0e2387bc9b152997549f6eb2aeb51fa529286b1530049d0d9269
4
- data.tar.gz: 555177551a2e8febbb77b0eb1976b9768c1e3293c830ae68b15cac020fddaca3
3
+ metadata.gz: 3c99d5838e35276dfc56e7c5b7cfd94c5445bf245e31ea83d61b2fbf0b7edb01
4
+ data.tar.gz: 8f97956148df4fbba498f966fdf2c9df85cb5eae36251359026de0b45c42dbec
5
5
  SHA512:
6
- metadata.gz: b16f1c7a815e06721108fca222d7e15b5db37f04ceb4cc908abc97fb5a5a4e3b9ad56e2542243e53577b9f3a6e8704a41bdda0f24effe9150eca9481d3025425
7
- data.tar.gz: 10757eab555f593388be329a74a59f0cc85e9aa780cd6ca3fffa754b80dd8a6748da6777ab81e7db7e54ac958de1f6549f13e2de2e382aa551ca6baa2db725b6
6
+ metadata.gz: d0392d35a2a3200e05d89885b88dfa4c7baf1688e2ee1ed0b2b7f1a05692495563ac835b66807070913aab458ea1d392077ad73ecea5950c974b20b1deb1d7c9
7
+ data.tar.gz: d422da678b8d0594a6b3ddfb4e5e8b39fbcf34adb8c4be26fa59f88229736076a9bc00342ab5c98c2371e669456318a68e47c8431c23e992183b41a1539056ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mpngquant (0.1.0)
4
+ mpngquant (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,12 +9,12 @@ GEM
9
9
  ast (2.4.2)
10
10
  diff-lcs (1.4.4)
11
11
  parallel (1.20.1)
12
- parser (3.0.0.0)
12
+ parser (3.0.1.0)
13
13
  ast (~> 2.4.1)
14
14
  rainbow (3.0.0)
15
15
  rake (12.3.3)
16
16
  regexp_parser (2.1.1)
17
- rexml (3.2.4)
17
+ rexml (3.2.5)
18
18
  rspec (3.10.0)
19
19
  rspec-core (~> 3.10.0)
20
20
  rspec-expectations (~> 3.10.0)
data/lib/mpngquant.rb CHANGED
@@ -7,6 +7,17 @@ module Mpngquant
7
7
 
8
8
  class Pngquant
9
9
  class << self
10
+ # Whether pngquant exists or not?
11
+ # @return [True] "pngquant" exists,
12
+ # [False] "pngquant" NOT exists
13
+ def supported?
14
+ args = ["pngquant", "--version"]
15
+ _, s = Open3.capture2(*args)
16
+ s
17
+ rescue Errno::ENOENT
18
+ false
19
+ end
20
+
10
21
  def optimize(infile:, force: nil, skip_if_larger: nil,
11
22
  ext: nil, quality: nil, speed: nil, nofs: nil,
12
23
  posterize: nil, strip: nil, verbose: nil)
@@ -1,3 +1,3 @@
1
1
  module Mpngquant
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mpngquant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standardrb