carrierwave-optimize_image 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 6e3cc95b0412f0cbe6b6f47dbd7837ee625cd484
4
- data.tar.gz: b81a6e963eec254af21acdeb732a88152065f1e2
3
+ metadata.gz: 918922e6753e497571e8c3ecdac174d5589ddb1b
4
+ data.tar.gz: 2efb0c5e48e0a739927acb8bafc91cca1125d234
5
5
  SHA512:
6
- metadata.gz: 8fb59213ea4fd79a9b38d71d866af1cced81975a162e065c5a23677a6f193ac7fb8411d5331b02afea61414bf3fb3b00e33408f744468d1b0de5f45a08cb6465
7
- data.tar.gz: 6303e1f19462f126475615a36614bd74fc36894e683b93082e4ab3117685e06de61f012ce2c954cef94cf1bb5dee59777f97ffdb5a049b0656562f2671e45ba1
6
+ metadata.gz: e796a6a4fc175c3d40f4648342612137a4125f4c5b8f3a99cb905d8805c7e06e0692bab33b684f209b95e84de072d1eb97b5ebc86b69a2819bd7d1678b10860b
7
+ data.tar.gz: 865512a6ef3d0f6b1f3e0922e0532e15ffd1866b0b37c4401f5b15aaaa6384d48ce0c3bd6cf8fcb4f8f33eaf0029c1c36b73e126e4cfaeb4bda9629dc93eb68e
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /spec/reports/
8
8
  /coverage/
9
9
  /doc/
10
+ /uploads/
@@ -5,21 +5,13 @@ module CarrierWave
5
5
  module ImageOptimizer
6
6
  class << self
7
7
  def optimize(path, opts = {})
8
- raise NotFoundPngquant unless which_pngquant?
9
- raise NotFoundJpegoptim unless which_jpegoptim?
8
+ raise NotFoundPngquant if `which pngquant` == ""
9
+ raise NotFoundJpegoptim if `which jpegoptim` == ""
10
10
  optimize_for(path, opts)
11
11
  end
12
12
 
13
13
  private
14
14
 
15
- def which_pngquant?
16
- system! "which pngquant"
17
- end
18
-
19
- def which_jpegoptim?
20
- system! "which jpegoptim"
21
- end
22
-
23
15
  def optimize_for(path, opts)
24
16
  case mimetype(path)
25
17
  when "jpeg" then optimize_jpg(path, opts)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CarrierWave
4
4
  module OptimizeImage
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-optimize_image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazuki YAMAGUCHI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake