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 +4 -4
- data/.gitignore +1 -0
- data/lib/carrierwave/optimize_image/image_optimizer.rb +2 -10
- data/lib/carrierwave/optimize_image/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 918922e6753e497571e8c3ecdac174d5589ddb1b
|
4
|
+
data.tar.gz: 2efb0c5e48e0a739927acb8bafc91cca1125d234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e796a6a4fc175c3d40f4648342612137a4125f4c5b8f3a99cb905d8805c7e06e0692bab33b684f209b95e84de072d1eb97b5ebc86b69a2819bd7d1678b10860b
|
7
|
+
data.tar.gz: 865512a6ef3d0f6b1f3e0922e0532e15ffd1866b0b37c4401f5b15aaaa6384d48ce0c3bd6cf8fcb4f8f33eaf0029c1c36b73e126e4cfaeb4bda9629dc93eb68e
|
data/.gitignore
CHANGED
@@ -5,21 +5,13 @@ module CarrierWave
|
|
5
5
|
module ImageOptimizer
|
6
6
|
class << self
|
7
7
|
def optimize(path, opts = {})
|
8
|
-
raise NotFoundPngquant
|
9
|
-
raise NotFoundJpegoptim
|
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)
|
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.
|
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-
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|