image_optim 0.24.1 → 0.24.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.appveyor.yml +3 -56
- data/.rubocop.yml +6 -2
- data/CHANGELOG.markdown +5 -0
- data/Gemfile +1 -0
- data/LICENSE.txt +1 -1
- data/README.markdown +4 -4
- data/image_optim.gemspec +2 -2
- data/lib/image_optim/runner/option_parser.rb +3 -1
- metadata +36 -45
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTQ3MTQ0OTM1ODJjOWQ1MDUwZDVmZTc1NGFmMDY4ODMzYzRmMGY3Zg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDU1NzhlYTg5NWViNzhhNDcwYzY1NzJlMGM1NzkwZTAzY2Y1M2IwNQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTUzMjk0ZGY1YjBjNmNiMmRiZWFiMjMzZjkwZDIwZGI4OWUyNDg4NjdjYWY1
|
10
|
+
NGE4MjA1ZjFkMTFiMjdhOGE0NDIzZWI3OTRiNjk0YjA1NTRiYmVjZTBlNzFi
|
11
|
+
ZjIxOWE4MDEwMTEyZGQxMjc5ZGFjZmQ4ZDdmMzBjMmVmNDkyMWI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NGM5YjNjYzUzODVhYjY4ZjE5NjNhOGVmOTU3Y2Y4ZjU5NDI0MTg0Y2E3Mjk2
|
14
|
+
NzViOGU3YjAxNjQyZGM5NGMyZTU3MmZlOTk1ZDE3Y2E0MTIxNjgyMTdhZDEy
|
15
|
+
ZGZkMjcyMjExYWIxZjNiYzM3MzczOTllNTU0MjI3MGFmOTEwNzU=
|
data/.appveyor.yml
CHANGED
@@ -4,63 +4,10 @@ install:
|
|
4
4
|
- set PATH=%cd%\tmp\bin;%PATH%
|
5
5
|
- ruby --version
|
6
6
|
- bundle package --all
|
7
|
-
- echo curl.exe -fsSL --max-time 15 --retry 5 -o %%%%1 %%%%2 > tmp\bin\download.bat
|
8
7
|
|
9
|
-
- ps:
|
10
|
-
|
11
|
-
|
12
|
-
7z e tmp/advancecomp.zip -otmp/bin advpng.exe
|
13
|
-
}
|
14
|
-
|
15
|
-
- ps: | # gifsicle
|
16
|
-
if (-not (test-path tmp/bin/gifsicle.exe)) {
|
17
|
-
download.bat tmp/gifsicle.zip https://eternallybored.org/misc/gifsicle/releases/gifsicle-1.88-win64.zip
|
18
|
-
7z e tmp/gifsicle.zip -otmp/bin */gifsicle.exe
|
19
|
-
}
|
20
|
-
|
21
|
-
- ps: | # jhead
|
22
|
-
if (-not (test-path tmp/bin/jhead.exe)) {
|
23
|
-
download.bat tmp/bin/jhead.exe http://www.sentex.net/~mwandel/jhead/jhead.exe
|
24
|
-
}
|
25
|
-
|
26
|
-
- ps: | # jpeg-recompress
|
27
|
-
if (-not (test-path tmp/bin/jpeg-recompress.exe)) {
|
28
|
-
download.bat tmp/jpeg-archive.zip https://ci.appveyor.com/api/buildjobs/8t8vga27t8vn1js2/artifacts/jpeg-archive.zip
|
29
|
-
7z e tmp/jpeg-archive.zip -otmp/bin jpeg-recompress.exe
|
30
|
-
}
|
31
|
-
|
32
|
-
- ps: | # jpegoptim
|
33
|
-
if (-not (test-path tmp/bin/jpegoptim.exe)) {
|
34
|
-
download.bat tmp/jpegoptim.zip https://bitbucket.org/rorgoroth/jpegoptim-for-windows/downloads/jpegoptim-1.4.3-Win32.zip
|
35
|
-
7z e tmp/jpegoptim.zip -otmp/bin */jpegoptim.exe
|
36
|
-
}
|
37
|
-
|
38
|
-
- ps: | # jpegtran
|
39
|
-
if (-not (test-path tmp/bin/jpegtran.exe)) {
|
40
|
-
download.bat tmp/bin/jpegtran.exe http://jpegclub.org/jpegtran.exe
|
41
|
-
}
|
42
|
-
|
43
|
-
- ps: | # optipng
|
44
|
-
if (-not (test-path tmp/bin/optipng.exe)) {
|
45
|
-
download.bat tmp/optipng.zip https://sourceforge.net/projects/optipng/files/OptiPNG/optipng-0.7.6/optipng-0.7.6-win32.zip/download
|
46
|
-
7z e tmp/optipng.zip -otmp/bin */optipng.exe
|
47
|
-
}
|
48
|
-
|
49
|
-
- ps: | # pngcrush
|
50
|
-
if (-not (test-path tmp/bin/pngcrush.exe)) {
|
51
|
-
download.bat tmp/bin/pngcrush.exe https://sourceforge.net/projects/pmt/files/pngcrush-executables/1.8.1/pngcrush_1_8.1_w32.exe/download
|
52
|
-
}
|
53
|
-
|
54
|
-
- ps: | # pngout
|
55
|
-
if (-not (test-path tmp/bin/pngout.exe)) {
|
56
|
-
download.bat tmp/bin/pngout.exe http://advsys.net/ken/util/pngout.exe
|
57
|
-
}
|
58
|
-
|
59
|
-
- ps: | # pngquant
|
60
|
-
if (-not (test-path tmp/bin/pngquant.exe)) {
|
61
|
-
download.bat tmp/pngquant.zip https://pngquant.org/pngquant-windows.zip
|
62
|
-
7z e tmp/pngquant.zip -otmp/bin */pngquant.exe
|
63
|
-
}
|
8
|
+
- ps: git --work-tree=tmp\bin checkout origin/windows-binaries --
|
9
|
+
advpng.exe gifsicle.exe jhead.exe jpeg-recompress.exe jpegoptim.exe
|
10
|
+
jpegtran.exe optipng.exe pngcrush.exe pngout.exe pngquant.exe
|
64
11
|
|
65
12
|
- ps: | # svgo
|
66
13
|
npm install -g svgo
|
data/.rubocop.yml
CHANGED
@@ -4,7 +4,7 @@ AllCops:
|
|
4
4
|
- 'vendor/**/*'
|
5
5
|
|
6
6
|
Lint/EndAlignment:
|
7
|
-
|
7
|
+
EnforcedStyleAlignWith: variable
|
8
8
|
|
9
9
|
Lint/UnneededSplatExpansion:
|
10
10
|
Enabled: false
|
@@ -30,6 +30,10 @@ Metrics/MethodLength:
|
|
30
30
|
Metrics/PerceivedComplexity:
|
31
31
|
Max: 8
|
32
32
|
|
33
|
+
Security/MarshalLoad:
|
34
|
+
Exclude:
|
35
|
+
- 'script/worker_analysis'
|
36
|
+
|
33
37
|
Style/AccessModifierIndentation:
|
34
38
|
EnforcedStyle: outdent
|
35
39
|
|
@@ -37,7 +41,7 @@ Style/Alias:
|
|
37
41
|
EnforcedStyle: prefer_alias_method
|
38
42
|
|
39
43
|
Style/CaseIndentation:
|
40
|
-
|
44
|
+
EnforcedStyle: end
|
41
45
|
|
42
46
|
Style/DotPosition:
|
43
47
|
EnforcedStyle: trailing
|
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## unreleased
|
4
4
|
|
5
|
+
## v0.24.2 (2017-02-18)
|
6
|
+
|
7
|
+
* Describe `nice` level option [#140](https://github.com/toy/image_optim/issues/140) [@toy](https://github.com/toy)
|
8
|
+
* Add instruction for installing `pngout` using brew [#143](https://github.com/toy/image_optim/pull/143) [@lukaselmer](https://github.com/lukaselmer)
|
9
|
+
|
5
10
|
## v0.24.1 (2016-11-20)
|
6
11
|
|
7
12
|
* Use `image_size ~> 1.5` with `apng` detection, so apng images are not optimised to one frame version [#142](https://github.com/toy/image_optim/issues/142) [@toy](https://github.com/toy)
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.markdown
CHANGED
@@ -161,12 +161,12 @@ sudo port install advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush png
|
|
161
161
|
### OS X: Brew
|
162
162
|
|
163
163
|
```bash
|
164
|
-
brew install advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush pngquant
|
164
|
+
brew install advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush pngquant jonof/kenutils/pngout
|
165
165
|
```
|
166
166
|
|
167
167
|
### pngout installation (optional)
|
168
168
|
|
169
|
-
|
169
|
+
If you installed the dependencies via brew, pngout should be installed already. Otherwise, you can install `pngout` by downloading and installing the [binary versions](http://www.jonof.id.au/kenutils).
|
170
170
|
|
171
171
|
_Note: pngout is free to use even in commercial soft, but you can not redistribute, repackage or reuse it without consent and agreement of creator. [license](http://advsys.net/ken/utils.htm#pngoutkziplicense)_
|
172
172
|
|
@@ -263,7 +263,7 @@ optipng:
|
|
263
263
|
|
264
264
|
## Options
|
265
265
|
|
266
|
-
* `:nice` — Nice level *(defaults to `10`)*
|
266
|
+
* `:nice` — Nice level, priority of all used tools with higher value meaning lower priority, in range `-20..19`, negative values can be set only if run by root user *(defaults to `10`)*
|
267
267
|
* `:threads` — Number of threads or disable *(defaults to number of processors)*
|
268
268
|
* `:verbose` — Verbose output *(defaults to `false`)*
|
269
269
|
* `:pack` — Require image\_optim\_pack or disable it, by default image\_optim\_pack will be used if available, will turn on `:skip-missing-workers` unless explicitly disabled *(defaults to `nil`)*
|
@@ -344,4 +344,4 @@ In separate file [CHANGELOG.markdown](CHANGELOG.markdown).
|
|
344
344
|
|
345
345
|
## Copyright
|
346
346
|
|
347
|
-
Copyright (c) 2012-
|
347
|
+
Copyright (c) 2012-2017 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
|
data/image_optim.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'image_optim'
|
5
|
-
s.version = '0.24.
|
5
|
+
s.version = '0.24.2'
|
6
6
|
s.summary = %q{Optimize (lossless compress, optionally lossy) images (jpeg, png, gif, svg) using external utilities (advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegrescan, jpegtran, optipng, pngcrush, pngout, pngquant, svgo)}
|
7
7
|
s.homepage = "http://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
@@ -29,6 +29,6 @@ EOF
|
|
29
29
|
s.add_development_dependency 'image_optim_pack', '~> 0.2', '>= 0.2.2'
|
30
30
|
s.add_development_dependency 'rspec', '~> 3.0'
|
31
31
|
if RUBY_VERSION >= '2.0'
|
32
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
32
|
+
s.add_development_dependency 'rubocop', '~> 0.47'
|
33
33
|
end
|
34
34
|
end
|
@@ -133,7 +133,9 @@ ImageOptim::Runner::OptionParser::DEFINE = proc do |op, options|
|
|
133
133
|
options[:threads] = threads
|
134
134
|
end
|
135
135
|
|
136
|
-
op.on('--[no-]nice N', Integer, 'Nice level
|
136
|
+
op.on('--[no-]nice N', Integer, 'Nice level, priority of all used tools '\
|
137
|
+
'with higher value meaning lower priority, in range -20..19, negative '\
|
138
|
+
'values can be set only if run by root user (defaults to 10)') do |nice|
|
137
139
|
options[:nice] = nice
|
138
140
|
end
|
139
141
|
|
metadata
CHANGED
@@ -1,145 +1,131 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_optim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fspath
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: image_size
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: exifr
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.2'
|
48
|
-
- -
|
48
|
+
- - ! '>='
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: 1.2.2
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '1.2'
|
58
|
-
- -
|
58
|
+
- - ! '>='
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 1.2.2
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: progress
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ~>
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '3.0'
|
68
|
-
- -
|
68
|
+
- - ! '>='
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: 3.0.1
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '3.0'
|
78
|
-
- -
|
78
|
+
- - ! '>='
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 3.0.1
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: in_threads
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ~>
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '1.3'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - ~>
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '1.3'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: image_optim_pack
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ~>
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0.2'
|
102
|
-
- -
|
102
|
+
- - ! '>='
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: 0.2.2
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - ~>
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0.2'
|
112
|
-
- -
|
112
|
+
- - ! '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: 0.2.2
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: rspec
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- -
|
119
|
+
- - ~>
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '3.0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- -
|
126
|
+
- - ~>
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '3.0'
|
129
|
-
- !ruby/object:Gem::Dependency
|
130
|
-
name: rubocop
|
131
|
-
requirement: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - "~>"
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '0.37'
|
136
|
-
type: :development
|
137
|
-
prerelease: false
|
138
|
-
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
- - "~>"
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0.37'
|
143
129
|
description:
|
144
130
|
email:
|
145
131
|
executables:
|
@@ -147,10 +133,10 @@ executables:
|
|
147
133
|
extensions: []
|
148
134
|
extra_rdoc_files: []
|
149
135
|
files:
|
150
|
-
-
|
151
|
-
-
|
152
|
-
-
|
153
|
-
-
|
136
|
+
- .appveyor.yml
|
137
|
+
- .gitignore
|
138
|
+
- .rubocop.yml
|
139
|
+
- .travis.yml
|
154
140
|
- CHANGELOG.markdown
|
155
141
|
- CONTRIBUTING.markdown
|
156
142
|
- Gemfile
|
@@ -254,20 +240,24 @@ homepage: http://github.com/toy/image_optim
|
|
254
240
|
licenses:
|
255
241
|
- MIT
|
256
242
|
metadata: {}
|
257
|
-
post_install_message:
|
258
|
-
|
259
|
-
|
243
|
+
post_install_message: ! 'Rails image assets optimization is extracted into image_optim_rails
|
244
|
+
gem
|
245
|
+
|
246
|
+
You can safely remove `config.assets.image_optim = false` if you are not going to
|
247
|
+
use that gem
|
248
|
+
|
249
|
+
'
|
260
250
|
rdoc_options: []
|
261
251
|
require_paths:
|
262
252
|
- lib
|
263
253
|
required_ruby_version: !ruby/object:Gem::Requirement
|
264
254
|
requirements:
|
265
|
-
- -
|
255
|
+
- - ! '>='
|
266
256
|
- !ruby/object:Gem::Version
|
267
257
|
version: '0'
|
268
258
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
259
|
requirements:
|
270
|
-
- -
|
260
|
+
- - ! '>='
|
271
261
|
- !ruby/object:Gem::Version
|
272
262
|
version: '0'
|
273
263
|
requirements: []
|
@@ -327,3 +317,4 @@ test_files:
|
|
327
317
|
- spec/images/transparency2.png
|
328
318
|
- spec/images/vergroessert.jpg
|
329
319
|
- spec/spec_helper.rb
|
320
|
+
has_rdoc:
|