carrierwave-imageoptimizer 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +1 -0
- data/README.md +14 -1
- data/lib/carrierwave-imageoptimizer/version.rb +1 -1
- data/spec/carrierwave_imageoptimizer_spec.rb +8 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDJmYjA4ZDM1MTAzM2QzOThkYzUzN2YwZTc2YzUyOTgyMWZiMTA5OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzU4MGYxMWUxYjY0OTJmNWRlMjVlNTkxYmM3M2ZlZDMyYjg5YWFjZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWFhMGM3OTkwMGYwNjA2ZWViMDY0YzRmYWIzMTM2Yzg5NDZhMTNiYmMzYzVh
|
10
|
+
ZDQzN2ZhNzc4YzM5MDNhZDQ0NzNlMmYyMGQyNTIzZGM1M2MwOGUwMDA2Zjcx
|
11
|
+
NzZjN2FlZDM5NmRkMGRjMjZlNTZhYzQ0MmNlNzQ4MWJiZmJhYWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWE2Y2JlMGU5MTgyNGE4YTM5OGNlNDFmZjk2NTI0NjE0ODMwYTNhZjdmZTA5
|
14
|
+
MmNjYzkyNTVkODc3Njk3ZTYzMzg3YjFlYTY4ZGNmMGQ5YjY0NTMzNDU1MzIw
|
15
|
+
ZWEzYTY0YzcxNjVjMWEzMTJiMzRhNzIzYTMwMzUzY2YyNGRiMzg=
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This gem allows you to simply optimize CarrierWave images via jpegoptim or optipng using the image_optimizer gem.
|
4
4
|
|
5
|
-
Tested against 1.9.3, 2.0.0, ruby-head, jruby-19mode, jruby-head, rbx-2.1.1, rbx-2.2.0, and rbx-2.2.1
|
5
|
+
Tested against 1.9.3, 2.0.0, 2.1.0, ruby-head, jruby-19mode, jruby-head, rbx-2.1.1, rbx-2.2.0, and rbx-2.2.1
|
6
6
|
|
7
7
|
[![Build Status](https://secure.travis-ci.org/jtescher/carrierwave-imageoptimizer.png)]
|
8
8
|
(http://travis-ci.org/jtescher/carrierwave-imageoptimizer)
|
@@ -85,6 +85,19 @@ class MyUploader < CarrierWave::Uploader::Base
|
|
85
85
|
end
|
86
86
|
```
|
87
87
|
|
88
|
+
##### Quiet Mode
|
89
|
+
|
90
|
+
Pass an optional `quiet` parameter to compress images without logging progress.
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
class MyUploader < CarrierWave::Uploader::Base
|
94
|
+
...
|
95
|
+
version :thumbnail do
|
96
|
+
process :optimize, quiet: true
|
97
|
+
end
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
88
101
|
## Contributing
|
89
102
|
|
90
103
|
1. Fork it
|
@@ -16,11 +16,18 @@ describe CarrierWave::ImageOptimizer do
|
|
16
16
|
@uploader.new.optimize
|
17
17
|
end
|
18
18
|
|
19
|
-
it 'accepts an optional quality param to target a specific lossy JPG quality level
|
19
|
+
it 'accepts an optional quality param to target a specific lossy JPG quality level' do
|
20
20
|
image_optimizer = double(::ImageOptimizer)
|
21
21
|
expect(::ImageOptimizer).to receive(:new).with('/tmp/path/to/image.jpg', quality: 99).and_return(image_optimizer)
|
22
22
|
expect(image_optimizer).to receive(:optimize)
|
23
23
|
@uploader.new.optimize(quality: 99)
|
24
24
|
end
|
25
|
+
|
26
|
+
it 'accepts an optional quiet param to run in quiet mode' do
|
27
|
+
image_optimizer = double(::ImageOptimizer)
|
28
|
+
expect(::ImageOptimizer).to receive(:new).with('/tmp/path/to/image.jpg', quiet: true).and_return(image_optimizer)
|
29
|
+
expect(image_optimizer).to receive(:optimize)
|
30
|
+
@uploader.new.optimize(quiet: true)
|
31
|
+
end
|
25
32
|
end
|
26
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-imageoptimizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Tescher
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
V3NaK2F3dzJpU05DNVhGaEEvOHhzSzBCbHRZUkY5blAKSEE0MVV0RHhySmtI
|
36
36
|
TDNOMXo4Z1BNWFNyRlQ0MUZSMndnazgrbDE0UCs3ZzFVVFBpZDJFSXdmdDJ4
|
37
37
|
T2JGZUE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
38
|
-
date: 2013-12-
|
38
|
+
date: 2013-12-30 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: carrierwave
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.1.
|
164
|
+
rubygems_version: 2.1.11
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Simply optimize CarrierWave images via jpegoptim or optipng
|
metadata.gz.sig
CHANGED
Binary file
|