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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35b0a12e0576a1287feab2f73cd55290323a9466
4
- data.tar.gz: 131183720138322417ae32cb375ed160da088144
3
+ metadata.gz: e8c275764a5d18fb358309ad306c580ed75462e4
4
+ data.tar.gz: a96e2c8454ae65a7ae2b7f6a4983fd53c0f397bf
5
5
  SHA512:
6
- metadata.gz: 6b69761b92ee1ad0591292be033b008bd8945984af4af2bdd63f7be4bc047609bb76191076a12941cd15ed0f8ba64b74f7e8ca689578ae9f9c186fcbb39b9388
7
- data.tar.gz: b3834fe864160039ff9be9843edf89e00097ef75c25a0f45bad66fcc128a3f02f0fa06896a5222d4d2c2a6512365026c4e3c10762abab994b6434324d3e18ded
6
+ metadata.gz: 497a47f7b819e1a7e80f808b60ce12907bf1442e0a65f1d6fdedf51a654a40b584e99f3489ef8fa40462e7dc8a07d33d1e9468a371edc35a4cc232ff9f47ff40
7
+ data.tar.gz: 1a94186f3e415a121679a7eb0354b3348537a34c1acac9b5eda2d8f68a41f6779173f2f7ce253ad3b934fbc7a26755731951a5e364e16199a23ebffa7f47ad52
@@ -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 like
12
-
13
- * [advpng](http://advancemame.sourceforge.net/doc-advpng.html) from
14
- [AdvanceCOMP](http://advancemame.sourceforge.net/comp-readme.html)
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.beta.3 released**
18
+ **2015-01-16 2.0.0**
29
19
 
30
- * allow minor releases of image_optim above 0.19
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
- * **all available optimization libraries are disabled by default**
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
- ### Caution
52
+ ### CAUTION
81
53
 
82
- image_optim inserts itself into the asset pipeline and tries to compress your applications image assets as well.
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: image_optim settings made through PaperclipOptimizer do not apply here.
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` which receives the `attachment` as an argument:
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
@@ -1,3 +1,3 @@
1
1
  module PaperclipOptimizer
2
- VERSION = '2.0.0.beta.3'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -40,21 +40,25 @@ to create an initializer for global configuration.
40
40
  Breaking changes from 1.0.3
41
41
  ---------------------------
42
42
 
43
- Please note that Paperclip 2 now disables all optimization libraries by default. Re-enable jpegtran
44
- and optipng manually if you wish to retain the previous behaviour.
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
- PLEASE NOTE
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
- PaperclipOptimizer depends on image_optim, which by default inserts itself into the asset pipeline and
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.beta.3
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-16 00:00:00.000000000 Z
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\nPlease
169
- note that Paperclip 2 now disables all optimization libraries by default. Re-enable
170
- jpegtran\nand optipng manually if you wish to retain the previous behaviour.\n\nSee
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\nPLEASE NOTE\n-----------\n\nPaperclipOptimizer
173
- depends on image_optim, which by default inserts itself into the asset pipeline
174
- and \ntries to compress your application assets. This might fail if you do not have
175
- all supported optimization \nbinaries installed. Add\n\n config.assets.image_optim
176
- = false\n \nto your config/application.rb to disable this.\n"
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: 1.3.1
192
+ version: '0'
190
193
  requirements: []
191
194
  rubyforge_project:
192
195
  rubygems_version: 2.4.5