openstreetmap-image_optim 0.21.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rubocop.yml +65 -0
- data/.travis.yml +42 -0
- data/CHANGELOG.markdown +272 -0
- data/CONTRIBUTING.markdown +10 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +344 -0
- data/Vagrantfile +33 -0
- data/bin/image_optim +28 -0
- data/image_optim.gemspec +29 -0
- data/lib/image_optim.rb +228 -0
- data/lib/image_optim/bin_resolver.rb +144 -0
- data/lib/image_optim/bin_resolver/bin.rb +105 -0
- data/lib/image_optim/bin_resolver/comparable_condition.rb +60 -0
- data/lib/image_optim/bin_resolver/error.rb +6 -0
- data/lib/image_optim/bin_resolver/simple_version.rb +31 -0
- data/lib/image_optim/cmd.rb +49 -0
- data/lib/image_optim/config.rb +205 -0
- data/lib/image_optim/configuration_error.rb +3 -0
- data/lib/image_optim/handler.rb +57 -0
- data/lib/image_optim/hash_helpers.rb +45 -0
- data/lib/image_optim/image_meta.rb +25 -0
- data/lib/image_optim/image_path.rb +68 -0
- data/lib/image_optim/non_negative_integer_range.rb +11 -0
- data/lib/image_optim/option_definition.rb +32 -0
- data/lib/image_optim/option_helpers.rb +17 -0
- data/lib/image_optim/railtie.rb +38 -0
- data/lib/image_optim/runner.rb +139 -0
- data/lib/image_optim/runner/glob_helpers.rb +45 -0
- data/lib/image_optim/runner/option_parser.rb +227 -0
- data/lib/image_optim/space.rb +29 -0
- data/lib/image_optim/true_false_nil.rb +16 -0
- data/lib/image_optim/worker.rb +159 -0
- data/lib/image_optim/worker/advpng.rb +35 -0
- data/lib/image_optim/worker/class_methods.rb +91 -0
- data/lib/image_optim/worker/gifsicle.rb +63 -0
- data/lib/image_optim/worker/jhead.rb +43 -0
- data/lib/image_optim/worker/jpegoptim.rb +58 -0
- data/lib/image_optim/worker/jpegrecompress.rb +44 -0
- data/lib/image_optim/worker/jpegtran.rb +46 -0
- data/lib/image_optim/worker/optipng.rb +45 -0
- data/lib/image_optim/worker/pngcrush.rb +54 -0
- data/lib/image_optim/worker/pngout.rb +38 -0
- data/lib/image_optim/worker/pngquant.rb +51 -0
- data/lib/image_optim/worker/svgo.rb +32 -0
- data/script/template/jquery-2.1.3.min.js +4 -0
- data/script/template/sortable-0.6.0.min.js +2 -0
- data/script/template/worker_analysis.erb +254 -0
- data/script/update_worker_options_in_readme +60 -0
- data/script/worker_analysis +599 -0
- data/spec/image_optim/bin_resolver/comparable_condition_spec.rb +37 -0
- data/spec/image_optim/bin_resolver/simple_version_spec.rb +57 -0
- data/spec/image_optim/bin_resolver_spec.rb +272 -0
- data/spec/image_optim/cmd_spec.rb +66 -0
- data/spec/image_optim/config_spec.rb +217 -0
- data/spec/image_optim/handler_spec.rb +95 -0
- data/spec/image_optim/hash_helpers_spec.rb +76 -0
- data/spec/image_optim/image_path_spec.rb +54 -0
- data/spec/image_optim/railtie_spec.rb +121 -0
- data/spec/image_optim/runner/glob_helpers_spec.rb +25 -0
- data/spec/image_optim/runner/option_parser_spec.rb +99 -0
- data/spec/image_optim/space_spec.rb +25 -0
- data/spec/image_optim/worker_spec.rb +192 -0
- data/spec/image_optim_spec.rb +242 -0
- data/spec/images/comparison.png +0 -0
- data/spec/images/decompressed.jpeg +0 -0
- data/spec/images/icecream.gif +0 -0
- data/spec/images/image.jpg +0 -0
- data/spec/images/invisiblepixels/generate +24 -0
- data/spec/images/invisiblepixels/image.png +0 -0
- data/spec/images/lena.jpg +0 -0
- data/spec/images/orient/0.jpg +0 -0
- data/spec/images/orient/1.jpg +0 -0
- data/spec/images/orient/2.jpg +0 -0
- data/spec/images/orient/3.jpg +0 -0
- data/spec/images/orient/4.jpg +0 -0
- data/spec/images/orient/5.jpg +0 -0
- data/spec/images/orient/6.jpg +0 -0
- data/spec/images/orient/7.jpg +0 -0
- data/spec/images/orient/8.jpg +0 -0
- data/spec/images/orient/generate +23 -0
- data/spec/images/orient/original.jpg +0 -0
- data/spec/images/quant/64.png +0 -0
- data/spec/images/quant/generate +25 -0
- data/spec/images/rails.png +0 -0
- data/spec/images/test.svg +3 -0
- data/spec/images/transparency1.png +0 -0
- data/spec/images/transparency2.png +0 -0
- data/spec/images/vergroessert.jpg +0 -0
- data/spec/spec_helper.rb +64 -0
- data/vendor/jpegrescan +143 -0
- metadata +308 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 66d75ddc1cec5a7cf4b38cfaf7b31517f6a3d9e6
|
4
|
+
data.tar.gz: 53e21e8b38c5dbc0326644e653bc79106f4f69ea
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 18e0e5f2a6c839f580c6493304c5ee95706321b030fd6203943f07b4b00de870669eb2583c9f4c33715b4d54d34b906dbdb5ea99cc1132a15b5f1144a4083a4e
|
7
|
+
data.tar.gz: 5fa8ffccb01a91cb5353ead5e3d2fe7f515be04ddc977f4a5c6623d8e1b81414d357bad0cb18f60ce22c54fa6860109009a1d51459cf2131679da89594f76b36
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- '*.gemspec'
|
4
|
+
|
5
|
+
Lint/EndAlignment:
|
6
|
+
AlignWith: variable
|
7
|
+
|
8
|
+
Metrics/AbcSize:
|
9
|
+
Max: 30
|
10
|
+
|
11
|
+
Metrics/ClassLength:
|
12
|
+
Max: 150
|
13
|
+
|
14
|
+
Metrics/CyclomaticComplexity:
|
15
|
+
Max: 10
|
16
|
+
|
17
|
+
Metrics/MethodLength:
|
18
|
+
Max: 25
|
19
|
+
|
20
|
+
Metrics/PerceivedComplexity:
|
21
|
+
Max: 8
|
22
|
+
|
23
|
+
Performance/ParallelAssignment:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/AccessModifierIndentation:
|
27
|
+
EnforcedStyle: outdent
|
28
|
+
|
29
|
+
Style/CaseIndentation:
|
30
|
+
IndentWhenRelativeTo: end
|
31
|
+
|
32
|
+
Style/DotPosition:
|
33
|
+
EnforcedStyle: trailing
|
34
|
+
|
35
|
+
Style/DoubleNegation:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Style/Encoding:
|
39
|
+
EnforcedStyle: when_needed
|
40
|
+
|
41
|
+
Style/HashSyntax:
|
42
|
+
EnforcedStyle: hash_rockets
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
MaxLineLength: 40
|
46
|
+
|
47
|
+
Style/IndentHash:
|
48
|
+
EnforcedStyle: consistent
|
49
|
+
|
50
|
+
Style/PercentLiteralDelimiters:
|
51
|
+
PreferredDelimiters:
|
52
|
+
'%w': '[]'
|
53
|
+
'%W': '[]'
|
54
|
+
|
55
|
+
Style/Semicolon:
|
56
|
+
AllowAsExpressionSeparator: true
|
57
|
+
|
58
|
+
Style/SpaceBeforeBlockBraces:
|
59
|
+
EnforcedStyle: no_space
|
60
|
+
|
61
|
+
Style/SpaceInsideHashLiteralBraces:
|
62
|
+
EnforcedStyle: no_space
|
63
|
+
|
64
|
+
Style/TrailingComma:
|
65
|
+
EnforcedStyleForMultiline: comma
|
data/.travis.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.8.7
|
4
|
+
- 1.9.2
|
5
|
+
- 1.9.3
|
6
|
+
- '2.0'
|
7
|
+
- '2.1'
|
8
|
+
- '2.2'
|
9
|
+
- jruby-18mode
|
10
|
+
- jruby-19mode
|
11
|
+
- ree
|
12
|
+
script:
|
13
|
+
if [ -n "$RUBOCOP" ]; then
|
14
|
+
bundle exec rubocop
|
15
|
+
; elif [ -n "$RAILS_VERSION" ]; then
|
16
|
+
bundle exec image_optim --info
|
17
|
+
&& bundle exec rspec spec/image_optim/railtie_spec.rb
|
18
|
+
; else
|
19
|
+
bundle exec image_optim --info
|
20
|
+
&& bundle exec rspec
|
21
|
+
; fi
|
22
|
+
before_install:
|
23
|
+
if [ -z "$RUBOCOP" ]; then
|
24
|
+
mkdir ~/bin
|
25
|
+
&& npm install -g svgo
|
26
|
+
&& curl -L "http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz" | tar -xz -C ~/bin --strip-components 2 --wildcards '*/x86_64/pngout'
|
27
|
+
; fi
|
28
|
+
env:
|
29
|
+
- PATH=~/bin:$PATH
|
30
|
+
matrix:
|
31
|
+
fast_finish: true
|
32
|
+
include:
|
33
|
+
- env: RAILS_VERSION='~> 3.2'
|
34
|
+
rvm: default
|
35
|
+
- env: RAILS_VERSION='~> 4.0'
|
36
|
+
rvm: default
|
37
|
+
- env: RUBOCOP=true
|
38
|
+
rvm: default
|
39
|
+
addons:
|
40
|
+
code_climate:
|
41
|
+
repo_token:
|
42
|
+
secure: FDikT3JnOJHOAFSaKwVPB1VOphU0sSzAnzQ+YjSt9XFE+9uFQHth/j4rFoVoqALhCj+47trv6spwkbcSjGCVzm+87OI80GkLCCzNjDOz2W4sP9JWItVgS1VoWW+ioPxpLgpguTb3wutwKOUMEAf+40EX657ZiHumM7nNHrF+RCU=
|
data/CHANGELOG.markdown
ADDED
@@ -0,0 +1,272 @@
|
|
1
|
+
# ChangeLog
|
2
|
+
|
3
|
+
## v0.21.0.1 (2015-11-19)
|
4
|
+
|
5
|
+
* Add `:disable_plugins` and `:enable_plugins` options `svgo` worker
|
6
|
+
|
7
|
+
## v0.21.0 (2015-05-30)
|
8
|
+
|
9
|
+
* Use exifr 1.2.2 with fix for a bug [#85](https://github.com/toy/image_optim/issues/85) [@toy](https://github.com/toy)
|
10
|
+
* Change order of png workers according to analysis to pngcrush, optipng, pngquant, pngout, advpng (was pngquant, pngcrush, pngout, advpng, optipng) [@toy](https://github.com/toy)
|
11
|
+
* Run worker command without invoking shell (except ruby < 1.9 and jruby) [@toy](https://github.com/toy)
|
12
|
+
* Add disabling worker by passing `:disable => true` (previously only by passing `false` instead of options hash) [@toy](https://github.com/toy)
|
13
|
+
* Add tests for railtie, also to prevent [issues like #72](https://github.com/toy/image_optim/issues/72) [#73](https://github.com/toy/image_optim/issues/73) [@toy](https://github.com/toy)
|
14
|
+
* Remove haml development dependency [@toy](https://github.com/toy)
|
15
|
+
* Add `-strip` option to optipng worker to remove all metadata chunks, on by default [#75](https://github.com/toy/image_optim/issues/75) [@jwidderich](https://github.com/jwidderich)
|
16
|
+
* Fixing minor spelling mistakes from `--help` output [#79](https://github.com/toy/image_optim/issues/79) [@kaspergrubbe](https://github.com/kaspergrubbe)
|
17
|
+
|
18
|
+
## v0.20.2 (2014-12-26)
|
19
|
+
|
20
|
+
* Fix `ImagePath#temp_path` for ruby 2.2 caused by `Tmpname#make_tmpname` accepting only objects directly convertible to String for prefix and suffix starting with 2.2 [#74](https://github.com/toy/image_optim/issues/74) [@toy](https://github.com/toy)
|
21
|
+
|
22
|
+
## v0.20.1 (2014-12-19)
|
23
|
+
|
24
|
+
* Fix [paperclip-optimizer issue #13](https://github.com/janfoeh/paperclip-optimizer/issues/13): railtie broken with `undefined local variable or method 'app'` [#72](https://github.com/toy/image_optim/issues/72) [@janfoeh](https://github.com/janfoeh)
|
25
|
+
|
26
|
+
## v0.20.0 (2014-12-15)
|
27
|
+
|
28
|
+
* Ignore and show warning for lossy options `jpegoptim#max_quality` and `pngquant#quality` in default/lossless mode [#71](https://github.com/toy/image_optim/issues/71) [@toy](https://github.com/toy)
|
29
|
+
* Add `:blacken` option to `pngcrush` worker, to blacken fully transparent pixels, on by default [@toy](https://github.com/toy)
|
30
|
+
* Command line option `--no-progress` to disable showing progress of optimizing images [@toy](https://github.com/toy)
|
31
|
+
|
32
|
+
## v0.19.1 (2014-11-22)
|
33
|
+
|
34
|
+
* Blacklist pngcrush 1.7.80 as it loses one color in indexed images [@toy](https://github.com/toy)
|
35
|
+
|
36
|
+
## v0.19.0 (2014-11-08)
|
37
|
+
|
38
|
+
* Added lossy worker `jpegrecompress` (uses [`jpeg-recompress`](https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress)), disabled unless `:allow_lossy` is true [#65](https://github.com/toy/image_optim/issues/65) [@wjordan](https://github.com/wjordan) [@toy](https://github.com/toy)
|
39
|
+
* `:allow_lossy` option to allow lossy workers and optimizations [@toy](https://github.com/toy)
|
40
|
+
* Don't warn multiple times about problematic binary [#69](https://github.com/toy/image_optim/issues/69) [@toy](https://github.com/toy)
|
41
|
+
* Run gisicle two times (with interlace off then with on) if interlace is not set explicitly [#70](https://github.com/toy/image_optim/issues/70) [@toy](https://github.com/toy)
|
42
|
+
* Remove app and other extensions from gif images [@toy](https://github.com/toy)
|
43
|
+
* Change behaviour of gifsicle interlace option to deinterlace for `false`, pass `nil` to leave as is [@toy](https://github.com/toy)
|
44
|
+
* Worker can change its initialization by overriding `init` and can initialize multiple instances [#70](https://github.com/toy/image_optim/issues/70) [@toy](https://github.com/toy)
|
45
|
+
|
46
|
+
## v0.18.0 (2014-11-01)
|
47
|
+
|
48
|
+
* Add interface to `image_optim_pack` [@toy](https://github.com/toy)
|
49
|
+
* Use `in_threads ~> 1.3` [@toy](https://github.com/toy)
|
50
|
+
* Added options to Gifsicle, specifically --careful (for compatibility) and --optimize for granularity [#51](https://github.com/toy/image_optim/issues/51) [@kaspergrubbe](https://github.com/kaspergrubbe)
|
51
|
+
* `:skip_missing_workers` option to skip workers with missing or problematic binaries [#66](https://github.com/toy/image_optim/issues/66) [@toy](https://github.com/toy)
|
52
|
+
* Speedup specs (~8x) [#60](https://github.com/toy/image_optim/issues/60) [@toy](https://github.com/toy)
|
53
|
+
* `script/worker_analysis` to compare worker chains by optimization, time and losslessness [@toy](https://github.com/toy)
|
54
|
+
* `Cmd` module to ensure interrupted commands can't go unnoticed [@toy](https://github.com/toy)
|
55
|
+
|
56
|
+
## v0.17.1 (2014-10-06)
|
57
|
+
|
58
|
+
* Fix bin path resolving method missing vendor directory [@toy](https://github.com/toy)
|
59
|
+
|
60
|
+
## v0.17.0 (2014-10-04)
|
61
|
+
|
62
|
+
* Use pure ruby detection of bin path [@toy](https://github.com/toy)
|
63
|
+
* Fail if version of bin can't be detected [#39](https://github.com/toy/image_optim/issues/39) [@toy](https://github.com/toy)
|
64
|
+
* Check path in `XXX_BIN` to exist, be a file and be executable [@toy](https://github.com/toy)
|
65
|
+
* `image_optim --info` to perform initialization with verbose output without running optimizations [@toy](https://github.com/toy)
|
66
|
+
* Changeable config paths [@toy](https://github.com/toy)
|
67
|
+
|
68
|
+
## v0.16.0 (2014-09-12)
|
69
|
+
|
70
|
+
* Wrote this ChangeLog [#62](https://github.com/toy/image_optim/issues/62) [@toy](https://github.com/toy)
|
71
|
+
* Use rubocop ~> 0.26.0 [@toy](https://github.com/toy)
|
72
|
+
* Install advancecomp from source in travis script [#61](https://github.com/toy/image_optim/issues/61) [@toy](https://github.com/toy)
|
73
|
+
* Move expansion of config path to read method and rescue with warning [#58](https://github.com/toy/image_optim/issues/58) [@toy](https://github.com/toy)
|
74
|
+
* Show workers options in verbose mode [#56](https://github.com/toy/image_optim/issues/56) [@toy](https://github.com/toy)
|
75
|
+
* Resolve all bins during initialization [#22](https://github.com/toy/image_optim/issues/22) [@toy](https://github.com/toy)
|
76
|
+
* Add exclusion glob patterns, `.*` by default [#35](https://github.com/toy/image_optim/issues/35) [#48](https://github.com/toy/image_optim/issues/48) [@toy](https://github.com/toy)
|
77
|
+
* Show better warning when running image_optim for a directory without recursive option [@toy](https://github.com/toy)
|
78
|
+
* Use stable sort for workers [@toy](https://github.com/toy)
|
79
|
+
* Check binary version instead of using which to check if binary is present [#59](https://github.com/toy/image_optim/issues/59) [@toy](https://github.com/toy)
|
80
|
+
|
81
|
+
## v0.15.0 (2014-08-19)
|
82
|
+
|
83
|
+
* Use advpng worker before optipng [@toy](https://github.com/toy)
|
84
|
+
* Fix order of results (use progress ~> 3.0.1) [@toy](https://github.com/toy)
|
85
|
+
* Change array returned from `optimize_images`, `optimize_images!` and `optimize_images_data` to contain pairs of item and result instead of just result [@toy](https://github.com/toy)
|
86
|
+
* Fixed `Space` causing exception with negative numbers [@toy](https://github.com/toy)
|
87
|
+
* Added pngquant worker [#14](https://github.com/toy/image_optim/issues/14) [#32](https://github.com/toy/image_optim/issues/32) [#40](https://github.com/toy/image_optim/issues/40) [#52](https://github.com/toy/image_optim/issues/52) [@adammathys](https://github.com/adammathys) [@smasry](https://github.com/smasry) [@toy](https://github.com/toy)
|
88
|
+
* Add instructions to errors from bin resolver [@toy](https://github.com/toy)
|
89
|
+
* Use in_threads ~> 1.2.2 with fix for silent exceptions [@toy](https://github.com/toy)
|
90
|
+
* Fix `LocalJumpError` in railtie initializer block (ruby 2.1.2, rails 4.1.4) [#50](https://github.com/toy/image_optim/issues/50) [@schnittchen](https://github.com/schnittchen)
|
91
|
+
|
92
|
+
## v0.14.0 (2014-07-17)
|
93
|
+
|
94
|
+
* Added Inch CI and Gittip badges to README [@toy](https://github.com/toy)
|
95
|
+
* Assign worker options to constants for documentation [@toy](https://github.com/toy)
|
96
|
+
* Code style, reorganized, comments, added rubocop [@toy](https://github.com/toy)
|
97
|
+
* Switch to rspec 3.0 [@toy](https://github.com/toy)
|
98
|
+
* Don't mention versions in instructions for installing jpegoptim and pngcrush [@toy](https://github.com/toy)
|
99
|
+
|
100
|
+
## v0.13.3 (2014-05-22)
|
101
|
+
|
102
|
+
* Added instruction about libjpeg-turbo-utils [#49](https://github.com/toy/image_optim/issues/49) [@toy](https://github.com/toy)
|
103
|
+
|
104
|
+
## v0.13.2 (2014-04-24)
|
105
|
+
|
106
|
+
* Updated versions of `pngcrush` and `jpegoptim` in installation instructions [#46](https://github.com/toy/image_optim/issues/46) [@toy](https://github.com/toy)
|
107
|
+
* Script for updating instructions in README [@toy](https://github.com/toy)
|
108
|
+
* Typo in README [#45](https://github.com/toy/image_optim/issues/45) [@rawsyntax](https://github.com/rawsyntax)
|
109
|
+
|
110
|
+
## v0.13.1 (2014-04-08)
|
111
|
+
|
112
|
+
* Use image_size ~> 1.3.0 so only `FormatError` exceptions are caught and show warning [#44](https://github.com/toy/image_optim/issues/44) [@lencioni](https://github.com/lencioni)
|
113
|
+
|
114
|
+
## v0.13.0 (2014-04-06)
|
115
|
+
|
116
|
+
* Detect and warn about broken images [#43](https://github.com/toy/image_optim/issues/43) [@toy](https://github.com/toy)
|
117
|
+
* Output image_optim version when running in verbose mode [@toy](https://github.com/toy)
|
118
|
+
* Show resolved version in version exceptions and warnings [@toy](https://github.com/toy)
|
119
|
+
* Warn if advpng version is less than 1.17 as it does not use zopfli [#17](https://github.com/toy/image_optim/issues/17) [#18](https://github.com/toy/image_optim/issues/18) [@toy](https://github.com/toy)
|
120
|
+
|
121
|
+
## v0.12.1 (2014-03-10)
|
122
|
+
|
123
|
+
* Don't try to register preprocessors when sprockets library is not initialized (app.assets is nil) [#41](https://github.com/toy/image_optim/issues/41) [@toy](https://github.com/toy)
|
124
|
+
* Output resolved binaries when verbose [@toy](https://github.com/toy)
|
125
|
+
* Output nice level and number of threads when verbose [@toy](https://github.com/toy)
|
126
|
+
* Output config to stderr when verbose [@toy](https://github.com/toy)
|
127
|
+
* Don't limit number of threads [@toy](https://github.com/toy)
|
128
|
+
|
129
|
+
## v0.12.0 (2014-03-02)
|
130
|
+
|
131
|
+
* Checking bin versions [#33](https://github.com/toy/image_optim/issues/33) [@toy](https://github.com/toy)
|
132
|
+
|
133
|
+
## v0.11.2 (2014-03-01)
|
134
|
+
|
135
|
+
* Fixed building PATH environment variable [@toy](https://github.com/toy)
|
136
|
+
|
137
|
+
## v0.11.1 (2014-02-20)
|
138
|
+
|
139
|
+
* Allow `-v` for version if it is the only argument [@toy](https://github.com/toy)
|
140
|
+
* Fixed initializing railtie [#37](https://github.com/toy/image_optim/issues/37) [@toy](https://github.com/toy)
|
141
|
+
|
142
|
+
## v0.11.0 (2014-02-16)
|
143
|
+
|
144
|
+
* Use image_size ~> 1.2.0 [@toy](https://github.com/toy)
|
145
|
+
* Added `svgo` worker and support for svg files [#27](https://github.com/toy/image_optim/issues/27) [#30](https://github.com/toy/image_optim/issues/30) [@nybblr](https://github.com/nybblr)
|
146
|
+
* Properly unlink temporary files [#29](https://github.com/toy/image_optim/issues/29) [@toy](https://github.com/toy)
|
147
|
+
* Read options from rails app configuration `app.config.assets.image_optim` in railtie [#31](https://github.com/toy/image_optim/issues/31) [@bencrouse](https://github.com/bencrouse)
|
148
|
+
* Updated versions of `pngcrush` and `jpegoptim` in installation instructions [#26](https://github.com/toy/image_optim/issues/26) [@jc00ke](https://github.com/jc00ke)
|
149
|
+
|
150
|
+
## v0.10.2 (2014-01-25)
|
151
|
+
|
152
|
+
* Fixed regression with progress introduced in v0.10.0 [@toy](https://github.com/toy)
|
153
|
+
|
154
|
+
## v0.10.1 (2014-01-23)
|
155
|
+
|
156
|
+
* Ensure binary data (ruby 1.9+) from `optimize_image_data` and `optimize_images_data` [#25](https://github.com/toy/image_optim/issues/25) [@toy](https://github.com/toy)
|
157
|
+
* Mention `optimize_image_data` and `optimize_images_data` in README [#25](https://github.com/toy/image_optim/issues/25) [@toy](https://github.com/toy)
|
158
|
+
|
159
|
+
## v0.10.0 (2013-12-25)
|
160
|
+
|
161
|
+
* Fixed bug with inheritance of `DelegateClass` in jruby 1.9 and 2.0 [@toy](https://github.com/toy)
|
162
|
+
* Return `ImagePath::Optimized` containing also original path and size from `optimize_image` and `optimize_image!` [#12](https://github.com/toy/image_optim/issues/12) [@toy](https://github.com/toy)
|
163
|
+
* Show exception backtrace when verbose [@toy](https://github.com/toy)
|
164
|
+
* Fail if there were warnings with paths to optimize [@toy](https://github.com/toy)
|
165
|
+
* Rails (sprockets) preprocessor [#2](https://github.com/toy/image_optim/issues/2) [@toy](https://github.com/toy)
|
166
|
+
* Use fspath ~> 2.1.0 with fixes for jruby 1.7.8 [@toy](https://github.com/toy)
|
167
|
+
* Add `optimize_image_data` and `optimize_images_data` [@toy](https://github.com/toy)
|
168
|
+
* Read config from `image_optim.yml` at `XDG_CONFIG_HOME` (`~/.config` by default) and from `.image_optim.yml` in current working directory [#13](https://github.com/toy/image_optim/issues/13) [@toy](https://github.com/toy)
|
169
|
+
* Added badges to README [@toy](https://github.com/toy)
|
170
|
+
* Big refactoring [@toy](https://github.com/toy)
|
171
|
+
|
172
|
+
## v0.9.1 (2013-08-20)
|
173
|
+
|
174
|
+
* Use progress ~> 3.0.0 and in_threads ~> 1.2.0 [@toy](https://github.com/toy)
|
175
|
+
|
176
|
+
## v0.9.0 (2013-07-30)
|
177
|
+
|
178
|
+
* Use fspath ~> 2.0.5 with bug fix for jruby in 1.8 mode [@toy](https://github.com/toy)
|
179
|
+
* Overcome wrong implementation of `Process::Status` in jruby [@toy](https://github.com/toy)
|
180
|
+
* Fix for jruby not `File.rename` not accepting non String [@toy](https://github.com/toy)
|
181
|
+
* Fix for jruby `File.rename` not accepting non String [@toy](https://github.com/toy)
|
182
|
+
* Added `.travis.yml` [@toy](https://github.com/toy)
|
183
|
+
* Added `jhead` worker [@toy](https://github.com/toy)
|
184
|
+
|
185
|
+
## v0.8.1 (2013-05-27)
|
186
|
+
|
187
|
+
* Fixed variable name in `jpegoptim` worker [@toy](https://github.com/toy)
|
188
|
+
* Added example of using `PATH` with ImageOptim.app bins [#11](https://github.com/toy/image_optim/issues/11) [@toy](https://github.com/toy)
|
189
|
+
|
190
|
+
## v0.8.0 (2013-03-27)
|
191
|
+
|
192
|
+
* Print options if verbose [@toy](https://github.com/toy)
|
193
|
+
* Added worker options to README using script [#5](https://github.com/toy/image_optim/issues/5) [@toy](https://github.com/toy)
|
194
|
+
* Setting worker options using arguments to image_optim bin [@toy](https://github.com/toy)
|
195
|
+
* Option definitions with description, default value and validation instead of attribute reader in options [@toy](https://github.com/toy)
|
196
|
+
* Don't change PATH for ruby process [@toy](https://github.com/toy)
|
197
|
+
* Vendor `jpegrescan` [@toy](https://github.com/toy)
|
198
|
+
* Option to use `jpegrescan` in `jpegtran` worker, off by default [#6](https://github.com/toy/image_optim/issues/6) [@toy](https://github.com/toy)
|
199
|
+
|
200
|
+
## v0.7.3 (2013-02-24)
|
201
|
+
|
202
|
+
* Use image_size ~> 1.1.2 [@toy](https://github.com/toy)
|
203
|
+
|
204
|
+
## v0.7.2 (2013-01-18)
|
205
|
+
|
206
|
+
* Make `apply_threading` accept enum instead of array [@toy](https://github.com/toy)
|
207
|
+
|
208
|
+
## v0.7.1 (2013-01-17)
|
209
|
+
|
210
|
+
* Use more compatible redirect syntax `>&` [#9](https://github.com/toy/image_optim/issues/9) @"Chris Thompson"
|
211
|
+
|
212
|
+
## v0.7.0 (2013-01-17)
|
213
|
+
|
214
|
+
* Use `system` with `env` and `nice` instead of forking [#8](https://github.com/toy/image_optim/issues/8) [@toy](https://github.com/toy)
|
215
|
+
* Don't use `-s` of `which` as it is nonstandard [#7](https://github.com/toy/image_optim/issues/7) [@toy](https://github.com/toy)
|
216
|
+
* Added bin resolving with ability to specify binary paths using environment variables [@toy](https://github.com/toy)
|
217
|
+
* Reorganized workers [@toy](https://github.com/toy)
|
218
|
+
* Added links to tool projects [@toy](https://github.com/toy)
|
219
|
+
|
220
|
+
## v0.6.0 (2012-11-15)
|
221
|
+
|
222
|
+
* Warn if directly added files are not images or are not optimizable [@toy](https://github.com/toy)
|
223
|
+
* Recursively scan directories for images [#4](https://github.com/toy/image_optim/issues/4) [@toy](https://github.com/toy)
|
224
|
+
* Typo in bin/image_optim [#3](https://github.com/toy/image_optim/issues/3) [@fabiomcosta](https://github.com/fabiomcosta)
|
225
|
+
|
226
|
+
## v0.5.1 (2012-08-07)
|
227
|
+
|
228
|
+
* Nice output for configuration and binary resolving errors [@toy](https://github.com/toy)
|
229
|
+
|
230
|
+
## v0.5.0 (2012-08-05)
|
231
|
+
|
232
|
+
* Verbose output [@toy](https://github.com/toy)
|
233
|
+
|
234
|
+
## v0.4.2 (2012-02-26)
|
235
|
+
|
236
|
+
* Use image_size ~> 1.1 [@toy](https://github.com/toy)
|
237
|
+
|
238
|
+
## v0.4.1 (2012-02-14)
|
239
|
+
|
240
|
+
* Added binary installation instructions to README [#1](https://github.com/toy/image_optim/issues/1) [@jingoro](https://github.com/jingoro)
|
241
|
+
|
242
|
+
## v0.4.0 (2012-01-13)
|
243
|
+
|
244
|
+
* Added usage to README [@toy](https://github.com/toy)
|
245
|
+
* Allow setting nice level, 10 by default [@toy](https://github.com/toy)
|
246
|
+
* Use `fork` instead of `system` [@toy](https://github.com/toy)
|
247
|
+
|
248
|
+
## v0.3.2 (2012-01-12)
|
249
|
+
|
250
|
+
* Fixed setting max thread count [@toy](https://github.com/toy)
|
251
|
+
|
252
|
+
## v0.3.1 (2012-01-12)
|
253
|
+
|
254
|
+
* Fixed parsing thread option [@toy](https://github.com/toy)
|
255
|
+
|
256
|
+
## v0.3.0 (2012-01-12)
|
257
|
+
|
258
|
+
* Output size change per file and total [@toy](https://github.com/toy)
|
259
|
+
* Warn about non files [@toy](https://github.com/toy)
|
260
|
+
|
261
|
+
## v0.2.1 (2012-01-11)
|
262
|
+
|
263
|
+
* Simplified determining presence of bin [@toy](https://github.com/toy)
|
264
|
+
|
265
|
+
## v0.2.0 (2012-01-10)
|
266
|
+
|
267
|
+
* Reduce number of created temp files to minimum [@toy](https://github.com/toy)
|
268
|
+
* Use fspath ~> 2.0.3 [@toy](https://github.com/toy)
|
269
|
+
|
270
|
+
## v0.1.0 (2012-01-09)
|
271
|
+
|
272
|
+
* Initial release [@toy](https://github.com/toy)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
* Create topic/feature branch: `git checkout -b awesome-changes`
|
4
|
+
* Commit…
|
5
|
+
* Add entry to [ChangeLog](CHANGELOG.markdown)
|
6
|
+
* Run tests: `bundle exec rspec`
|
7
|
+
* Check code style: `bundle exec rubocop`
|
8
|
+
* Push your branch: `git push origin awesome-changes`
|
9
|
+
* Create pull request
|
10
|
+
* Check if [travis is happy](https://travis-ci.org/toy/image_optim/pull_requests)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012-2015 Ivan Kuchin
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|