paperclip-optimizer 2.0.0.beta.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +19 -42
- data/lib/paperclip-optimizer/version.rb +1 -1
- data/paperclip-optimizer.gemspec +12 -8
- metadata +15 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8c275764a5d18fb358309ad306c580ed75462e4
|
4
|
+
data.tar.gz: a96e2c8454ae65a7ae2b7f6a4983fd53c0f397bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 497a47f7b819e1a7e80f808b60ce12907bf1442e0a65f1d6fdedf51a654a40b584e99f3489ef8fa40462e7dc8a07d33d1e9468a371edc35a4cc232ff9f47ff40
|
7
|
+
data.tar.gz: 1a94186f3e415a121679a7eb0354b3348537a34c1acac9b5eda2d8f68a41f6779173f2f7ce253ad3b934fbc7a26755731951a5e364e16199a23ebffa7f47ad52
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.0.0
|
4
|
+
|
5
|
+
* same as Beta 3
|
6
|
+
|
7
|
+
## 2.0.0.beta.3
|
8
|
+
|
9
|
+
* allow minor releases of image_optim above 0.19
|
10
|
+
|
11
|
+
image_optim 0.20 apparently [fixes an issue](https://github.com/toy/image_optim/issues/74) with Ruby 2.2.0 — thanks [leifcr](https://github.com/leifcr)
|
12
|
+
|
3
13
|
## 2.0.0.beta.2
|
4
14
|
|
5
15
|
* re-enable compatibility with Paperclip 3.4.2
|
data/README.md
CHANGED
@@ -8,53 +8,25 @@ PaperclipOptimizer is a [Paperclip](https://github.com/thoughtbot/paperclip) pro
|
|
8
8
|
optimizing and minifying uploaded images.
|
9
9
|
|
10
10
|
It is just a thin wrapper around [ImageOptim](https://github.com/toy/image_optim),
|
11
|
-
which supports many external optimization libraries
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
* [gifsicle](http://www.lcdf.org/gifsicle/)
|
16
|
-
* [jhead](http://www.sentex.net/~mwandel/jhead/)
|
17
|
-
* [jpegoptim](http://www.kokkonen.net/tjko/projects.html)
|
18
|
-
* [jpeg-recompress](https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress)
|
19
|
-
* jpegtran from [Independent JPEG Group's JPEG library](http://www.ijg.org/)
|
20
|
-
* [optipng](http://optipng.sourceforge.net/)
|
21
|
-
* [pngcrush](http://pmt.sourceforge.net/pngcrush/)
|
22
|
-
* [pngout](http://www.advsys.net/ken/util/pngout.htm)
|
23
|
-
* [pngquant](http://pngquant.org/)
|
24
|
-
* [svgo](https://github.com/svg/svgo)
|
11
|
+
which supports many external optimization libraries such as [advpng](http://advancemame.sourceforge.net/doc-advpng.html), [gifsicle](http://www.lcdf.org/gifsicle/),
|
12
|
+
[jhead](http://www.sentex.net/~mwandel/jhead/), [jpegoptim](http://www.kokkonen.net/tjko/projects.html), [jpeg-recompress](https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress),
|
13
|
+
[jpegtran](http://www.ijg.org/), [optipng](http://optipng.sourceforge.net/), [pngcrush](http://pmt.sourceforge.net/pngcrush/), [pngout](http://www.advsys.net/ken/util/pngout.htm),
|
14
|
+
[pngquant](http://pngquant.org/) and [svgo](https://github.com/svg/svgo).
|
25
15
|
|
26
16
|
### What's new
|
27
17
|
|
28
|
-
**2015-01-16 2.0.0
|
18
|
+
**2015-01-16 2.0.0**
|
29
19
|
|
30
|
-
*
|
31
|
-
|
32
|
-
image_optim 0.20 apparently [fixes an issue](https://github.com/toy/image_optim/issues/74) with Ruby 2.2.0 — thanks [leifcr](https://github.com/leifcr)
|
33
|
-
|
34
|
-
**2014-10-13 2.0.0.beta.2 released**
|
35
|
-
|
36
|
-
* re-enable compatibility with Paperclip 3.4.2 and above
|
37
|
-
|
38
|
-
**2014-10-13 2.0.0.beta released**
|
39
|
-
|
40
|
-
* configure PaperclipOptimizer globally, per-attachment and per-style
|
20
|
+
* better configuration: set options [globally, per attachment and per style](#settings)
|
41
21
|
|
42
22
|
Thanks to [danschultzer](https://github.com/danschultzer), [braindeaf](https://github.com/braindeaf) and
|
43
23
|
[tirdadc](https://github.com/tirdadc) for pull requests, input and reports
|
44
|
-
*
|
24
|
+
* all available optimization libraries are disabled by default
|
45
25
|
|
46
26
|
Previous versions enabled jpegtran and optipng by default. You will have to
|
47
27
|
re-enable them manually if you wish to retain that behaviour
|
48
28
|
* optimizers which are enabled but missing or broken are ignored by default
|
49
29
|
|
50
|
-
**2014-05-02 1.0.3 released**
|
51
|
-
|
52
|
-
* updated tests, compatibility with Paperclip 4 - thanks [Sija](https://github.com/Sija)
|
53
|
-
|
54
|
-
**2014-04-02 1.0.2 released**
|
55
|
-
|
56
|
-
* relax Paperclip dependency, allow 3.4.x again since it works fine
|
57
|
-
|
58
30
|
Read the [CHANGELOG](CHANGELOG.md) for previous changes.
|
59
31
|
|
60
32
|
### Dependencies
|
@@ -77,13 +49,13 @@ If you wish to set global configuration settings, run
|
|
77
49
|
|
78
50
|
to generate an initializer in config/initializers.
|
79
51
|
|
80
|
-
###
|
52
|
+
### CAUTION
|
81
53
|
|
82
|
-
image_optim inserts itself into the asset pipeline and tries to compress your
|
54
|
+
**image_optim automatically inserts itself into the asset pipeline and tries to compress your `/app/assets/images` as well.
|
83
55
|
Since it enables all libraries it supports by default, you might suddenly run into errors if you do not have all
|
84
|
-
of them installed
|
56
|
+
of them installed.**
|
85
57
|
|
86
|
-
Please note:
|
58
|
+
Please note: settings you made through PaperclipOptimizer only apply to Paperclip attachments, not to image_optims asset compressor.
|
87
59
|
|
88
60
|
To disable image_optim in your asset pipeline, add
|
89
61
|
|
@@ -128,16 +100,21 @@ Settings are merged, so more specific settings replace less specific ones.
|
|
128
100
|
|
129
101
|
**Global settings**
|
130
102
|
|
103
|
+
Global settings apply everywhere. You can override them with per-attachment and per-style settings.
|
104
|
+
|
105
|
+
Run `rails generate paperclip_optimizer:install` to create an initializer for global settings.
|
106
|
+
|
131
107
|
```ruby
|
108
|
+
# config/initializers/paperclip_optimizer.rb
|
132
109
|
Paperclip::PaperclipOptimizer.default_options = {
|
133
110
|
skip_missing_workers: false
|
134
111
|
}
|
135
112
|
```
|
136
113
|
|
137
|
-
Run `rails generate paperclip_optimizer:install` to generate an initializer for global settings.
|
138
|
-
|
139
114
|
**Per-attachment settings**
|
140
115
|
|
116
|
+
Per-attachment settings apply to all styles of a particular attachment. Override them with per-style settings.
|
117
|
+
|
141
118
|
```ruby
|
142
119
|
class User < ActiveRecord::Base
|
143
120
|
attr_accessible :avatar
|
@@ -154,7 +131,7 @@ class User < ActiveRecord::Base
|
|
154
131
|
end
|
155
132
|
```
|
156
133
|
|
157
|
-
Just like Paperclips' `:styles` option, you can pass a lambda to `:paperclip_optimizer`
|
134
|
+
Just like Paperclips' `:styles` option, you can pass a lambda to `:paperclip_optimizer` to configure it at runtime:
|
158
135
|
|
159
136
|
```ruby
|
160
137
|
class User < ActiveRecord::Base
|
data/paperclip-optimizer.gemspec
CHANGED
@@ -40,21 +40,25 @@ to create an initializer for global configuration.
|
|
40
40
|
Breaking changes from 1.0.3
|
41
41
|
---------------------------
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
By default, all optimization libraries are now disabled. Re-enable jpegtran and optipng manually
|
44
|
+
if you wish to retain the behaviour of PaperclipOptimizer 1.0.3.
|
45
45
|
|
46
46
|
See https://github.com/janfoeh/paperclip-optimizer#settings for more information on the new
|
47
47
|
configuration system.
|
48
48
|
|
49
|
-
|
50
|
-
|
49
|
+
=============================================
|
50
|
+
IMPORTANT - READ THIS - IMPORTANT - READ THIS
|
51
|
+
=============================================
|
52
|
+
|
53
|
+
PaperclipOptimizer uses image_optim to do the heavy lifting. image_optim automatically inserts itself
|
54
|
+
into the asset pipeline and tries to compress your /app/assets/images as well. By default, it enables
|
55
|
+
all the optimization libraries it supports, and it will fail if you do not have all of them installed.
|
51
56
|
|
52
|
-
|
53
|
-
tries to compress your application assets. This might fail if you do not have all supported optimization
|
54
|
-
binaries installed. Add
|
57
|
+
Either add
|
55
58
|
|
56
59
|
config.assets.image_optim = false
|
57
60
|
|
58
|
-
to your config/application.rb to disable this.
|
61
|
+
to your config/application.rb to disable this, or check https://github.com/toy/image_optim#from-rails
|
62
|
+
for how to configure this properly.
|
59
63
|
}
|
60
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip-optimizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan-Christian Föh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01
|
11
|
+
date: 2015-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paperclip
|
@@ -165,15 +165,18 @@ licenses:
|
|
165
165
|
- MIT
|
166
166
|
metadata: {}
|
167
167
|
post_install_message: "\nInitializer\n-----------\n\nrun\n\n rails g paperclip_optimizer:install\n\nto
|
168
|
-
create an initializer for global configuration.\n\nBreaking changes from 1.0.3\n---------------------------\n\
|
169
|
-
|
170
|
-
|
168
|
+
create an initializer for global configuration.\n\nBreaking changes from 1.0.3\n---------------------------\n\nBy
|
169
|
+
default, all optimization libraries are now disabled. Re-enable jpegtran and optipng
|
170
|
+
manually \nif you wish to retain the behaviour of PaperclipOptimizer 1.0.3.\n\nSee
|
171
171
|
https://github.com/janfoeh/paperclip-optimizer#settings for more information on
|
172
|
-
the new \nconfiguration system.\n\
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
172
|
+
the new \nconfiguration system.\n\n=============================================\nIMPORTANT
|
173
|
+
- READ THIS - IMPORTANT - READ THIS\n=============================================\n\nPaperclipOptimizer
|
174
|
+
uses image_optim to do the heavy lifting. image_optim automatically inserts itself
|
175
|
+
\ninto the asset pipeline and tries to compress your /app/assets/images as well.
|
176
|
+
By default, it enables \nall the optimization libraries it supports, and it will
|
177
|
+
fail if you do not have all of them installed.\n\nEither add\n\n config.assets.image_optim
|
178
|
+
= false\n \nto your config/application.rb to disable this, or check https://github.com/toy/image_optim#from-rails
|
179
|
+
\nfor how to configure this properly.\n"
|
177
180
|
rdoc_options: []
|
178
181
|
require_paths:
|
179
182
|
- lib
|
@@ -184,9 +187,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
187
|
version: '0'
|
185
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
189
|
requirements:
|
187
|
-
- - "
|
190
|
+
- - ">="
|
188
191
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
192
|
+
version: '0'
|
190
193
|
requirements: []
|
191
194
|
rubyforge_project:
|
192
195
|
rubygems_version: 2.4.5
|