dragonfly 1.1.4 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +14 -6
  3. data/History.md +336 -309
  4. data/README.md +1 -1
  5. data/dev/rails_template.rb +35 -33
  6. data/dragonfly.gemspec +10 -16
  7. data/lib/dragonfly.rb +3 -1
  8. data/lib/dragonfly/content.rb +21 -22
  9. data/lib/dragonfly/image_magick/commands.rb +35 -0
  10. data/lib/dragonfly/image_magick/generators/plain.rb +13 -7
  11. data/lib/dragonfly/image_magick/generators/plasma.rb +10 -6
  12. data/lib/dragonfly/image_magick/generators/text.rb +67 -58
  13. data/lib/dragonfly/image_magick/plugin.rb +26 -25
  14. data/lib/dragonfly/image_magick/processors/encode.rb +16 -5
  15. data/lib/dragonfly/image_magick/processors/thumb.rb +37 -31
  16. data/lib/dragonfly/job/fetch_url.rb +1 -1
  17. data/lib/dragonfly/model/class_methods.rb +6 -1
  18. data/lib/dragonfly/param_validators.rb +37 -0
  19. data/lib/dragonfly/response.rb +2 -2
  20. data/lib/dragonfly/shell.rb +19 -13
  21. data/lib/dragonfly/utils.rb +1 -1
  22. data/lib/dragonfly/version.rb +1 -1
  23. data/samples/white pixel.png b/data/samples/mevs' white → pixel.png +0 -0
  24. data/spec/dragonfly/content_spec.rb +3 -3
  25. data/spec/dragonfly/cookie_monster_spec.rb +2 -2
  26. data/spec/dragonfly/image_magick/commands_spec.rb +98 -0
  27. data/spec/dragonfly/image_magick/generators/plain_spec.rb +39 -13
  28. data/spec/dragonfly/image_magick/generators/plasma_spec.rb +28 -9
  29. data/spec/dragonfly/image_magick/generators/text_spec.rb +51 -20
  30. data/spec/dragonfly/image_magick/plugin_spec.rb +45 -28
  31. data/spec/dragonfly/image_magick/processors/encode_spec.rb +30 -0
  32. data/spec/dragonfly/image_magick/processors/thumb_spec.rb +46 -45
  33. data/spec/dragonfly/model/active_record_spec.rb +62 -0
  34. data/spec/dragonfly/param_validators_spec.rb +89 -0
  35. data/spec/dragonfly/shell_spec.rb +12 -10
  36. data/spec/dragonfly_spec.rb +37 -13
  37. data/spec/functional/shell_commands_spec.rb +6 -9
  38. data/spec/spec_helper.rb +12 -14
  39. metadata +45 -14
  40. data/lib/dragonfly/image_magick/generators/convert.rb +0 -19
  41. data/lib/dragonfly/image_magick/processors/convert.rb +0 -33
  42. data/spec/dragonfly/image_magick/generators/convert_spec.rb +0 -19
  43. data/spec/dragonfly/image_magick/processors/convert_spec.rb +0 -88
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3173e1aab6116013a04d816d1d72f2fb8240c270
4
- data.tar.gz: e95788e8d9991755c3dade169c491aec280bb67b
2
+ SHA256:
3
+ metadata.gz: 16341445bb67f27ae4dc7492244b038df290440a5f4b64d71cca3c637fd8b4d0
4
+ data.tar.gz: '0285f83e005198572fb9a52dea16eef2acca80ded36e9fa905b88d66701221fe'
5
5
  SHA512:
6
- metadata.gz: 298a37955543216a2621700a1e7f80558a580073e99665ff4eac98632095db517e8140581c495eb22eaef3034b0edb7510d6b272d5baf42c06455ddceee9ec08
7
- data.tar.gz: 8825e3ae315540658faf2874e394ebc83f43be665f01eb0be741b71687e59f54445e22163352765abcfafbf2a2b7a8d0ba513b6d9c3cc47b8cfa9746cdaf4223
6
+ metadata.gz: ea5f8440e718e3521eaca6824b3dd600817994ed144b5c69a9e609fa24ff8e9583a415a9a2ee9a309e7f622d7d33e0712525ce18ed020942a1585b80ef889cef
7
+ data.tar.gz: 1c81c3c4ed0bfe6421d3ca6ca69432929a4e8233b468d582586fca5d308758bbc9c6042d830e42bd4421c198452df019e802fcf151c277e3ac7248942cf30af0
data/.travis.yml CHANGED
@@ -1,12 +1,20 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.9.3"
4
- - "2.0"
5
- - "2.1"
6
3
  - "2.2"
7
4
  - "2.3"
8
5
  - "2.4"
9
- - "jruby-9.1.9.0"
10
- script: bundle exec rspec spec
6
+ - "2.5"
7
+ - "2.6"
8
+ - "2.7"
9
+ - "3.0"
10
+ - "jruby"
11
+
12
+ env:
13
+ global:
14
+ - SKIP_FLAKY_TESTS: true
15
+
11
16
  before_install:
12
- - gem install bundler
17
+ - sudo apt-get update
18
+ - sudo apt-get install -y ghostscript
19
+
20
+ script: bundle exec rspec spec --backtrace
data/History.md CHANGED
@@ -1,153 +1,200 @@
1
- 1.1.4 (2017-12-31)
2
- ===================
3
- Fixes
4
- -----
1
+ # 1.4.0 (2021-05-19)
2
+
3
+ ## Changes
4
+
5
+ - Removed `convert` processor and generator (which were quite insecure), in favour of utility commands in `Dragonfly::ImageMagick::Commands`
6
+
7
+ ## Fixes
8
+
9
+ - Better security for all job steps with parameter validations
10
+
11
+ # 1.3.0 (2021-01-09)
12
+
13
+ ## Changes
14
+
15
+ - Dropped official support for ruby < 2.2 - too annoying to maintain
16
+
17
+ ## Fixes
18
+
19
+ - Fixed losing attachment when transaction rolled back on destroy (dlibanori)
20
+ - Fixed fetch_url edge case when redirect url includes special chars (thedanbob)
21
+
22
+ # 1.2.1 (2020-07-24)
23
+
24
+ ## Features
25
+
26
+ - Allow having no logger (setting to `nil`) (kaimou1357)
27
+
28
+ ## Fixes
29
+
30
+ - Fix URI.unescape deprecation warning (alberto-mota)
31
+
32
+ # 1.2.0 (2018-11-13)
33
+
34
+ ## Fixes
35
+
36
+ - Replaced `quote` with `escape` for escaping shell commands - works with paths with apostrophes
37
+
38
+ ## Changes
39
+
40
+ - Replaced Open3.popen3 with now recommended Open3.capture3 (tomasc)
41
+
42
+ # 1.1.5 (2018-03-23)
43
+
44
+ ## Fixes
45
+
46
+ - Moved `destroy_dragonfly_attachments` into an `after_destroy` - issue #477 (eldotz)
47
+
48
+ # 1.1.4 (2017-12-31)
49
+
50
+ ## Fixes
51
+
5
52
  - Fixed data uris not working for long strings (reported dlibanori)
6
53
  - Removed syntax warnings (swamp09)
7
54
  - Correct ActiveRecord hook with `ActiveSupport.on_load` (efatsi)
8
55
 
9
- 1.1.3 (2017-06-02)
10
- ===================
11
- Fixes
12
- -----
56
+ # 1.1.3 (2017-06-02)
57
+
58
+ ## Fixes
59
+
13
60
  - Make sure imagemagick convert processor updates mime_type correctly when format is changed
14
61
 
15
- 1.1.2 (2017-05-06)
16
- ===================
17
- Fixes
18
- -----
62
+ # 1.1.2 (2017-05-06)
63
+
64
+ ## Fixes
65
+
19
66
  - Allow relative redirect urls in `fetch_url` (zorec)
20
67
  - Fixed Forwardable deprecation warnings (neodude)
21
68
  - Fixed incorrect detection of empty directories in ruby 2.4 (yuszuv)
22
69
  - Store content type in meta if it's available so we don't lose information (Lukas Svoboda)
23
70
 
24
- 1.1.1 (2016-10-26)
25
- ===================
26
- Features
27
- --------
71
+ # 1.1.1 (2016-10-26)
72
+
73
+ ## Features
74
+
28
75
  - Added delegate option for imagemagick (Will Fisher)
29
76
 
30
- Fixes
31
- -----
77
+ ## Fixes
78
+
32
79
  - Use `Base64.urlsafe_encode64` (Jan Raasch)
33
80
  Note that this changes b64 encodings from '/' to `'_'` and '+' to '-' in URLs, which will change a very
34
81
  small number of generated URLs (but shouldn't be enough to cause big recaching problems)
35
82
  URLs are encoded now according to the URL safe base64 specification in RFC 4648.
36
83
  Old URLs are still recognized so won't break.
37
84
 
85
+ # 1.1.0 (2016-10-24)
86
+
87
+ ## Fixes
38
88
 
39
- 1.1.0 (2016-10-24)
40
- ===================
41
- Fixes
42
- -----
43
89
  - Fetch a URL with basic auth if it's present in the URI (Ben Pickles)
44
90
  - Fix rack version problem for older rubies (rack 2.0 only works for ruby &gt;= 2.2.2)
45
91
  - Updated deprecated syntax in tests for WebMock, RSpec
46
92
 
47
- Changes
48
- --------
93
+ ## Changes
94
+
49
95
  - Dropped official support for Ruby &lt;= 1.9.2 and Rubinius
50
96
 
51
- 1.0.12 (2015-09-16)
52
- ===================
53
- Features
54
- --------
97
+ # 1.0.12 (2015-09-16)
98
+
99
+ ## Features
100
+
55
101
  - Made thumb processor args for a specific geometry publicly accesible
56
102
 
57
- 1.0.11 (2015-09-04)
58
- ===================
59
- Fixes
60
- -----
103
+ # 1.0.11 (2015-09-04)
104
+
105
+ ## Fixes
106
+
61
107
  - Make sure tempfiles are created with paths matching the meta name
62
108
 
63
- 1.0.10 (2015-05-14)
64
- ===================
65
- Features
66
- --------
109
+ # 1.0.10 (2015-05-14)
110
+
111
+ ## Features
112
+
67
113
  - Allow method signified by symbol in storage_options to take an attachment object
68
114
  - Allow passing in "input_args" to convert processor
69
- Fixes
70
- -----
115
+
116
+ ## Fixes
117
+
71
118
  - correct Rack version
72
119
 
73
- 1.0.9 (2015-04-29)
74
- ===================
75
- Fixes
76
- --------
120
+ # 1.0.9 (2015-04-29)
121
+
122
+ ## Fixes
123
+
77
124
  - Remove sha parameter being echoed back on error for better security
78
125
 
79
- 1.0.8 (2015-04-23)
80
- ===================
81
- Fixes
82
- --------
126
+ # 1.0.8 (2015-04-23)
127
+
128
+ ## Fixes
129
+
83
130
  - Job#close re-added, so that tempfiles are immediately removed after each request
84
131
  - Specs passing for 1.8.7, 1.9.2 (i18n gem version specified)
85
132
 
86
- 1.0.7 (2014-08-26)
87
- ===================
88
- Changes
89
- --------
133
+ # 1.0.7 (2014-08-26)
134
+
135
+ ## Changes
136
+
90
137
  - Job#sha uses better algorithm
91
138
  - renamed `protect_from_dos_attacks` -> `verify_urls` and turn on by default
92
139
 
93
- 1.0.6 (2014-08-22)
94
- ===================
95
- Features
96
- --------
140
+ # 1.0.6 (2014-08-22)
141
+
142
+ ## Features
143
+
97
144
  - env can be accessed by routed endpoint blocks
98
145
 
99
- Fixes
100
- -----
146
+ ## Fixes
147
+
101
148
  - analyser cache doesn't get stored in meta for a given piece of meta - can mess with stringifying analyser return values
102
149
  - removed default secret, forcing user to specify one explicitly
103
150
  - deal with "[" character problems in urls https://github.com/markevans/dragonfly/pull/337
104
151
 
105
- 1.0.5 (2014-05-15)
106
- ===================
107
- Fixes
108
- -----
152
+ # 1.0.5 (2014-05-15)
153
+
154
+ ## Fixes
155
+
109
156
  - fetch_url wasn't correctly getting https endpoints on Ruby approx < 2
110
157
 
111
- 1.0.4 (2014-04-11)
112
- ===================
113
- Fixes
114
- -----
158
+ # 1.0.4 (2014-04-11)
159
+
160
+ ## Fixes
161
+
115
162
  - fetch_url is more forgiving - assume escaped, if not escape
116
163
 
117
- 1.0.3 (2014-01-28)
118
- ===================
119
- Fixes
120
- -----
164
+ # 1.0.3 (2014-01-28)
165
+
166
+ ## Fixes
167
+
121
168
  - changing meta on a job (e.g. `fetch('blah').encode('jpg')`) was interfering with meta on its parent job (e.g. `fetch('blah')`)
122
169
 
123
- 1.0.2 (2013-12-20)
124
- ===================
125
- Fixes
126
- -----
170
+ # 1.0.2 (2013-12-20)
171
+
172
+ ## Fixes
173
+
127
174
  - more secure generation of secret in rails generator
128
175
  - ensure popen3 doesn't hang
129
176
 
130
- 1.0.1 (2013-11-28)
131
- ===================
132
- Changes
133
- -------
177
+ # 1.0.1 (2013-11-28)
178
+
179
+ ## Changes
180
+
134
181
  - FileDataStore doesn't use hours_minutes_seconds in its path - it uses a random string instead (12_15_59_saf4fs_file.png -> sdf4c2G_file.png)
135
182
 
136
- Features
137
- --------
183
+ ## Features
184
+
138
185
  - model attribute `xxx_changed?` method (useful e.g. in validations)
139
186
 
140
- Fixes
141
- -----
187
+ ## Fixes
188
+
142
189
  - proper support for Ruby 1.8.7 and JRuby (version 1.7.8)
143
190
  - routed endpoints can deal with returned `Attachment` objects (rather than returned `Job` objects) and return 404 if the endpoint proc returns nil
144
191
  - default Content-Disposition header doesn't url-encode filename unless the request is from IE
145
192
  - `fetch_url` deals with urls that redirect to https (previously was blowing up)
146
193
 
147
- 1.0.0 (2013-11-24)
148
- ===================
149
- Changes
150
- -------
194
+ # 1.0.0 (2013-11-24)
195
+
196
+ ## Changes
197
+
151
198
  - configuration
152
199
  - `Dragonfly[:images]` -> `Dragonfly.app` and `Dragonfly.app(:named_app)`
153
200
  - configuration block DSL overhaul
@@ -172,8 +219,8 @@ Changes
172
219
  - proper requires throughout the code instead of autoloading
173
220
  - simple 500 response for unknown errors
174
221
 
175
- Features
176
- --------
222
+ ## Features
223
+
177
224
  - model attachment default (by specifying a path to a e.g. a default image)
178
225
  - `convert` and `thumb` processors take a `'frame'` option
179
226
  - `thumb` takes a `'format'` option
@@ -186,82 +233,82 @@ Features
186
233
  - for each response
187
234
  - for shell commands
188
235
 
189
- Fixes
190
- -----
236
+ ## Fixes
237
+
191
238
  - inserting CookieMonster doesn't depend on existence of `ActionDispatch::Cookies`
192
239
  - `image?` returns false for pdfs
193
240
  - `fetch_url` raises more useful `ErrorResponse` on error
194
241
  - shell commands don't print warnings to stderr
195
242
  - ability to assign attachment/job from other app
196
243
 
197
- 0.9.15 (2013-05-04)
198
- ===================
199
- Features
200
- --------
244
+ # 0.9.15 (2013-05-04)
245
+
246
+ ## Features
247
+
201
248
  - Allow turning off support of legacy urls
202
249
 
203
- Fixes
204
- -----
250
+ ## Fixes
251
+
205
252
  - More conservative URL escaping - back to Rack::Utils.escape_path
206
253
  - Don't check for malicious strings when deserializing from datastores (they're to be trusted)
207
254
 
208
- 0.9.14 (2013-02-13)
209
- ===================
210
- Features
211
- --------
255
+ # 0.9.14 (2013-02-13)
256
+
257
+ ## Features
258
+
212
259
  - Attachment#b64_data
213
260
 
214
- Fixes
215
- -----
261
+ ## Fixes
262
+
216
263
  - Fix '+' character being converted to ' ' (revert to URI.escape instead of Rack::Utils.escape)
217
264
  - Support old-style deprecated urls (with a check for malicious ones)
218
265
  - Handle case where uid is an empty string
219
266
 
220
- 0.9.13 (2013-01-30)
221
- ===================
222
- Changes
223
- -------
267
+ # 0.9.13 (2013-01-30)
268
+
269
+ ## Changes
270
+
224
271
  - URLS are encoded/decoded with JSON, not with Marshal
225
272
 
226
- 0.9.12 (2012-04-08)
227
- ===================
228
- Features
229
- -------
273
+ # 0.9.12 (2012-04-08)
274
+
275
+ ## Features
276
+
230
277
  - Allow using a mongo replica set with mongo datastore
231
278
 
232
- Fixes
233
- -----
279
+ ## Fixes
280
+
234
281
  - `define_macro_on_include` was giving a stack error with multiple accessors on same app
235
282
 
236
- 0.9.11 (2012-03-12)
237
- ===================
238
- Features
239
- -------
283
+ # 0.9.11 (2012-03-12)
284
+
285
+ ## Features
286
+
240
287
  - Allow the S3 base URL to be customised with `url_host` (or per-request)
241
288
  - Added App#name (name as per `Dragonfly[:app_name]`)
242
289
 
243
- Changes
244
- -------
290
+ ## Changes
291
+
245
292
  - Better inspect for App, Processor, Analyser, Encoder, Generator, Job, TempObject, RoutedEndpoint, JobEndpoint
246
293
 
247
- Fixes
248
- -----
294
+ ## Fixes
295
+
249
296
  - Rescue from Excon::Errors::Conflict which apparently gets raised sometimes (don't know why - see https://github.com/markevans/dragonfly/issues/167)
250
297
  - Alias portrait and landscape without question marks, so magic_attributes can be used with them
251
298
  - Fixed stack error when using `define_macro_on_include` twice
252
299
  - Use fog's `sync_clock` to overcome potential S3 time skew problems
253
300
  - Using :name in urls was causing problems when filenames had dashes in them
254
301
 
255
- 0.9.10 (2012-01-11)
256
- ===================
257
- Fixes
258
- -----
302
+ # 0.9.10 (2012-01-11)
303
+
304
+ ## Fixes
305
+
259
306
  - FileDataStore was causing errors when the storage path was flat (not in a directory structure)
260
307
 
261
- 0.9.9 (2011-12-30)
262
- ==================
263
- Features
264
- --------
308
+ # 0.9.9 (2011-12-30)
309
+
310
+ ## Features
311
+
265
312
  - Created tempfiles use the original file extension if known
266
313
  - Added `:case_sensitive` option to `validates_property` for dealing with upper-case extensions and mime-types.
267
314
  - Github Markup syntax on readme for code highlighting
@@ -270,16 +317,16 @@ Features
270
317
  - `to_file` creates intermediate subdirs by default, can be turned off with `:mkdirs => false` option
271
318
  - Added some more S3 regions
272
319
 
273
- Changes
274
- -------
320
+ ## Changes
321
+
275
322
  - Datastores now use `temp_object.meta`, not the second arg passed in to `store`
276
323
  - `meta`, `name`, etc. now lazily load the job on an attachment - previously you'd have to call `apply` to get the meta from the datastore
277
324
  - When assigning an image via the activemodel extensions, mark that uid attribute will change
278
325
  - `validates_property` uses Rails 3 validators
279
326
  - Deprecated saved 'heroku' config, in favour of configuring S3 explicitly
280
327
 
281
- Fixes
282
- -----
328
+ ## Fixes
329
+
283
330
  - Model attachment urls are consistent now - the name is appended to the url (with format "/:job/:name") ONLY if it has the "name" magic attribute
284
331
  - `identify` wasn't working properly for files with capital letter extensions
285
332
  - S3 datastore sets content mime_type by default
@@ -290,89 +337,89 @@ Fixes
290
337
  - S3DataStore was breaking on bucket_exists? when using AWS IAM
291
338
  - Put CookieMonster before ActionDispatch::Cookies in rack middleware stack - that way Rack::Cache won't come between them and mess things up
292
339
 
293
- 0.9.8 (2011-09-08)
294
- ==================
295
- Fixes
296
- -----
340
+ # 0.9.8 (2011-09-08)
341
+
342
+ ## Fixes
343
+
297
344
  - Regenerated gemspec again with ruby 1.8.7 - didn't seem to be fixed
298
345
 
299
- 0.9.7 (2011-09-08)
300
- ==================
301
- Fixes
302
- -----
346
+ # 0.9.7 (2011-09-08)
347
+
348
+ ## Fixes
349
+
303
350
  - Regenerated gemspec to overcome annoying yaml issue (http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html)
304
351
 
305
- 0.9.6 (2011-09-06)
306
- ==================
307
- Features
308
- --------
352
+ # 0.9.6 (2011-09-06)
353
+
354
+ ## Features
355
+
309
356
  - Allow setting `content_type` when storing in Mongo GridFS
310
357
 
311
- Changes
312
- -------
358
+ ## Changes
359
+
313
360
  - Tests use Rails 3.1
314
361
 
315
- Fixes
316
- -----
362
+ ## Fixes
363
+
317
364
  - Moved from fog's deprecated `get_object_url` to `get_object_https_url`
318
365
  - Allow initializing a TempObject with Rack::Test::UploadedFile
319
366
  - Tests working in Windows (except feature that uses FileCommandAnalyser)
320
367
  - Better shell quoting
321
368
 
322
- 0.9.5 (2011-07-27)
323
- ==================
324
- Features
325
- --------
369
+ # 0.9.5 (2011-07-27)
370
+
371
+ ## Features
372
+
326
373
  - Added reflection method `app.analyser_methods`
327
374
 
328
- Fixes
329
- -----
375
+ ## Fixes
376
+
330
377
  - Fixed `convert` and `identify` for files with spaces
331
378
  - Fixed size validations for Rails 3.0.7
332
379
 
333
- 0.9.4 (2011-06-10)
334
- ==================
335
- Fixes
336
- -----
380
+ # 0.9.4 (2011-06-10)
381
+
382
+ ## Fixes
383
+
337
384
  - Made use of Rack calling `close` on the response body to clean up tempfiles.
338
385
  The response body is now the job, which delegates `each` to the temp_object.
339
386
 
340
- 0.9.3 (2011-06-03)
341
- ==================
342
- Fixes
343
- -----
387
+ # 0.9.3 (2011-06-03)
388
+
389
+ ## Fixes
390
+
344
391
  - TempObject#to_file sets file permissions 644 - copying wasn't previously guaranteeing this
345
392
  - Added TempObject#close and closed?, which Rack uses to clean up tempfiles
346
393
  - replaced '/' characters with '~' in base64 encoded urls (they were confusing url recognition)
347
394
 
348
- 0.9.2 (2011-05-19)
349
- ==================
350
- Features
351
- --------
395
+ # 0.9.2 (2011-05-19)
396
+
397
+ ## Features
398
+
352
399
  - Added env['dragonfly.job'] for use in other Rack middlewares
353
400
  - Added CookieMonster middleware for removing 'Set-Cookie' headers
354
401
 
355
- Fixes
356
- -----
402
+ ## Fixes
403
+
357
404
  - Remove 'Set-Cookie' header from any requests coming from a rails route
358
405
 
359
- 0.9.1 (2011-05-11)
360
- ==================
361
- Features
362
- --------
406
+ # 0.9.1 (2011-05-11)
407
+
408
+ ## Features
409
+
363
410
  - Added reflection methods `app.processor_methods`, `app.generator_methods` and `app.job_methods`
364
411
 
365
- Fixes
366
- -----
412
+ ## Fixes
413
+
367
414
  - Improved performance of `resize_and_crop` method, using imagemagick built-in '^' operator
368
415
  - Improved server security validations
369
416
  - Deal with Excon::Errors::SocketError: EOFError errors which get thrown sometimes from S3 connection
370
417
  - Allow files with '..' (but not '../') in the middle of their name in file data store
371
418
 
372
- 0.9.0 (2011-04-27)
373
- ==================
374
- Features
375
- --------
419
+ # 0.9.0 (2011-04-27)
420
+
421
+ ## Features
422
+
376
423
  - Model accessors are configurable
377
424
  - added `after_assign` callback
378
425
  - added `after_unassign` callback
@@ -403,8 +450,8 @@ Features
403
450
  - Mongo datastore can reuse an existing connection/db
404
451
  - FileDataStore can be configured not to store meta (save on extra file)
405
452
 
406
- Changes
407
- -------
453
+ ## Changes
454
+
408
455
  - Removed `url_path_prefix` and `url_suffix` in favour of `url_format`
409
456
  - Middleware doesn't need mount point argument now
410
457
  - Removed support for rails 2.3
@@ -416,131 +463,127 @@ Changes
416
463
  - FileDataStore stores metadata in xxx.meta now, not xxx.extra
417
464
  - removed Job methods `uid_basename`, `uid_extname`, `encoded_format` and `encoded_extname` as they are now unnecessary
418
465
 
419
- Fixes
420
- -----
466
+ ## Fixes
467
+
421
468
  - Performance tweaks regarding temp_objects model accessors and job objects
422
469
 
423
- 0.8.5 (2011-05-11)
424
- ==================
425
- Fixes
426
- -----
470
+ # 0.8.5 (2011-05-11)
471
+
472
+ ## Fixes
473
+
427
474
  - Allow filenames that have '..' in them (but not '../') in the filedatastore
428
475
  - Better security for server
429
476
 
430
- 0.8.4 (2011-04-27)
431
- ==================
432
- Fixes
433
- -----
477
+ # 0.8.4 (2011-04-27)
478
+
479
+ ## Fixes
480
+
434
481
  - Security fix for file data store
435
482
 
436
- 0.8.2 (2011-01-11)
437
- ==================
438
- Fixes
439
- -----
483
+ # 0.8.2 (2011-01-11)
484
+
485
+ ## Fixes
486
+
440
487
  - Renamed ActiveModel methods like 'attachments' to avoid name clashes
441
488
  - Respond properly to HEAD, POST, PUT and DELETE requests
442
489
  - Got it working with jRuby and Rubinius
443
490
  - Made DOS protection SHA (and ETag) consistent
444
491
 
445
- 0.8.1 (2010-11-22)
446
- ==================
447
- Fixes
448
- -----
492
+ # 0.8.1 (2010-11-22)
493
+
494
+ ## Fixes
495
+
449
496
  Removed runtime dependencies that Jeweler automatically takes from the Gemfile
450
497
 
451
- 0.8.0 (2010-11-21)
452
- ==================
453
- Features
454
- --------
498
+ # 0.8.0 (2010-11-21)
499
+
500
+ ## Features
501
+
455
502
  - New ImageMagick generator, processor, encoder and analyser, which are now defaults
456
503
  (thanks to Henry Phan for work on this)
457
504
 
458
- Fixes
459
- -----
505
+ ## Fixes
506
+
460
507
  - Works with Rails 3.0.2 uploaded files (which has a changed API)
461
508
 
509
+ # 0.7.7 (2010-10-31)
510
+
511
+ ## Features
462
512
 
463
- 0.7.7 (2010-10-31)
464
- ==================
465
- Features
466
- --------
467
513
  - Added username/password authentication to mongo data store
468
514
 
469
- Fixes
470
- -----
515
+ ## Fixes
516
+
471
517
  - Fixes for Windows, inc. tempfile binmode and closing files
472
518
  - "IOError: closed stream" fix (hopefully!)
473
519
 
520
+ # 0.7.6 (2010-09-12)
521
+
522
+ ## Features
474
523
 
475
- 0.7.6 (2010-09-12)
476
- ==================
477
- Features
478
- --------
479
524
  - Added methods for querying job steps, and Job#uid, Job#uid_basename, etc.
480
525
  - Added Job#b64_data
481
526
  - Added configurable url_suffix
482
527
  - Added configurable content_disposition and content_filename
483
528
  - Can pass extra GET params to url_for
484
529
  - Can manually set uid on FileDataStore and S3DataStore
485
- (not yet documented because attachments have no way to pass it on yet)
530
+ (not yet documented because attachments have no way to pass it on yet)
486
531
  - Model attachments store meta info about themselves
487
532
 
488
- Changes
489
- -------
533
+ ## Changes
534
+
490
535
  - Configurable module doesn't implicitly call 'call' if attribute set as proc
491
536
  - Refactored Endpoint module -> Response object
492
537
 
493
- Fixes
494
- -----
538
+ ## Fixes
539
+
495
540
  - Ruby 1.9.2-p0 was raising encoding errors due to Tempfiles not being in binmode
496
541
 
542
+ # 0.7.5 (2010-09-01)
543
+
544
+ ## Changes
497
545
 
498
- 0.7.5 (2010-09-01)
499
- ==================
500
- Changes
501
- --------
502
546
  - RMagick processor, encoder, analyser and generator all use the filesystem now
503
547
  They can be configured to use in-memory strings with the use_filesystem config option.
504
548
  - Upgraded support from Rails 3.0.0.rc -> Rails.3.0.0
505
549
 
506
- 0.7.4 (2010-08-28)
507
- ==================
508
- Features
509
- --------
550
+ # 0.7.4 (2010-08-28)
551
+
552
+ ## Features
553
+
510
554
  - Gave model accessors bang methods process! and encode!
511
555
 
512
- 0.7.3 (2010-08-27)
513
- ==================
514
- Fixes
515
- -----
556
+ # 0.7.3 (2010-08-27)
557
+
558
+ ## Fixes
559
+
516
560
  - Seems as though inserting after Rails' Rack::Lock was worth it after all
517
561
 
518
- 0.7.2 (2010-08-27)
519
- ==================
520
- Fixes
521
- -----
562
+ # 0.7.2 (2010-08-27)
563
+
564
+ ## Fixes
565
+
522
566
  - S3DataStore was breaking if previous data hadn't stored meta
523
567
 
524
- 0.7.1 (2010-08-26)
525
- ==================
526
- Fixes
527
- -----
568
+ # 0.7.1 (2010-08-26)
569
+
570
+ ## Fixes
571
+
528
572
  - SimpleEndpoint was modifying env path_info so wasn't creating proper cache keys
529
573
  - to_response accepts env, so can use if-not-modified, etc.
530
574
 
531
- Features
532
- --------
575
+ ## Features
576
+
533
577
  - Doc tweaks: Added mongo page, notes about Capistrano
534
578
 
535
- Changes
536
- -------
579
+ ## Changes
580
+
537
581
  - ETags generated by hash of job.serialize - was getting a bit long
538
582
 
539
- 0.7.0 (2010-08-25)
540
- ==================
583
+ # 0.7.0 (2010-08-25)
584
+
585
+ ## Features
541
586
 
542
- Features
543
- --------
544
587
  - Ability to chain processing, encoding
545
588
  - Added Generators for arbitrary content generation
546
589
  - 'fetch_file' method for easily getting local files
@@ -561,16 +604,16 @@ Features
561
604
  - simple endpoints
562
605
  - more intelligent working out of Content-Type to send back
563
606
 
564
- Fixes
565
- -----
607
+ ## Fixes
608
+
566
609
  - proper use of ETags
567
610
  - remove whitespace from file/s3 datastore uids
568
611
  - dragonfly/rails/images url-encodes rack-cache config for windows users
569
612
  - Ruby 1.9.2 support
570
613
  - Better RMagick memory management using image.destroy!
571
614
 
572
- Changes
573
- -------
615
+ ## Changes
616
+
574
617
  - Dragonfly::App[:images] -> Dragonfly[:images]
575
618
  - Moved text/plasma generation into Generator
576
619
  - Use of lazy 'Job' objects
@@ -585,25 +628,22 @@ Changes
585
628
  - encoded urls
586
629
  - got rid of unnecessary configurable sha_length
587
630
 
631
+ # 0.6.2 (2010-06-24)
588
632
 
633
+ ## Features
589
634
 
590
- 0.6.2 (2010-06-24)
591
- ==================
592
- Features
593
- -----
594
635
  - Added ability for custom error messages in validations
595
636
 
596
- 0.6.1 (2010-05-16)
597
- ==================
598
- Fixes
599
- -----
637
+ # 0.6.1 (2010-05-16)
638
+
639
+ ## Fixes
640
+
600
641
  - STI was breaking when the model had a mixin too
601
642
 
602
- 0.6.0 (2010-05-11)
603
- ==================
643
+ # 0.6.0 (2010-05-11)
644
+
645
+ ## Features
604
646
 
605
- Features
606
- --------
607
647
  - Added 'scale factor' for text generation, which gives better quality font rendering for smaller fonts
608
648
  - Configurable objects allow for passing args, and passing a block for extra config
609
649
  - Added more 'saved configurations', for easier setting up on e.g. Heroku
@@ -611,100 +651,87 @@ Features
611
651
  - Added greyscale to RMagickProcessor
612
652
  - S3DataStore is configurable as to whether it uses the filesystem or not (to save a tempfile)
613
653
 
614
- Fixes
615
- -----
654
+ ## Fixes
655
+
616
656
  - Some specs refactoring, including making text processing specs less brittle
617
657
  - RMagickEncoder::SUPPORTED_FORMATS was proving problematic - now we use a configurable list instead
618
658
  - Got Rails 3 beta3 cucumber features working
619
659
  - Added check to see if bucket already exists in S3DataStore - apparently this was problematic in EU
620
660
 
621
- Changes
622
- -------
661
+ ## Changes
662
+
623
663
  - temp_object.tempfile now returns a closed tempfile, which temp_object.file returns an open file.
624
- Can also pass a block to temp_object.file which closes the file automatically
664
+ Can also pass a block to temp_object.file which closes the file automatically
625
665
  - Processors/Analysers/Encoders know about app now so can log to app's log
626
666
  - Imagemagick errors in RMagick processor/analyser/encoder now throw unable_to_handle and log a warning
627
667
  - Removed Rails generators - better being more explicit with saved configurations which are more concise now
628
668
 
629
- 0.5.7 (2010-04-18)
630
- ==================
669
+ # 0.5.7 (2010-04-18)
670
+
671
+ ## Fixes
631
672
 
632
- Fixes
633
- --------
634
673
  - Strip file command mime_type value because some versions of file command were appending a line-break
635
674
 
636
- 0.5.6 (2010-04-13)
637
- ==================
675
+ # 0.5.6 (2010-04-13)
676
+
677
+ ## Fixes
638
678
 
639
- Fixes
640
- --------
641
679
  - Wasn't working properly with Single-Table Inheritance
642
680
 
643
- 0.5.5 (2010-04-13)
644
- ==================
681
+ # 0.5.5 (2010-04-13)
682
+
683
+ ## Fixes
645
684
 
646
- Fixes
647
- --------
648
685
  - Rails 3 has changed 'metaclass' -> 'singleton_class' so adapt accordingly
649
686
 
650
- 0.5.4 (2010-04-12)
651
- ==================
687
+ # 0.5.4 (2010-04-12)
688
+
689
+ ## Features
652
690
 
653
- Features
654
- --------
655
691
  - Allow setting the uid manually
656
692
 
657
- Fixes
658
- -----
693
+ ## Fixes
694
+
659
695
  - Assigning an accessor to nil wasn't working properly
660
696
 
697
+ # 0.5.3 (2010-03-27)
661
698
 
662
- 0.5.3 (2010-03-27)
663
- ==================
699
+ ## Fixes
664
700
 
665
- Fixes
666
- -----
667
701
  - Assigning an accessor to nil wasn't working properly
668
702
 
703
+ # 0.5.2 (2010-03-04)
669
704
 
670
- 0.5.2 (2010-03-04)
671
- ==================
705
+ ## Features
672
706
 
673
- Features
674
- --------
675
707
  - Added 'registered mime-types'
676
708
  - Enhanced docs
677
709
 
678
- Fixes
679
- -----
710
+ ## Fixes
711
+
680
712
  - RMagickEncoder only encodes if not already in that format
681
713
 
714
+ # 0.5.1 (2010-02-20)
682
715
 
683
- 0.5.1 (2010-02-20)
684
- ==================
716
+ ## Fixes
685
717
 
686
- Fixes
687
- -----
688
718
  - Fixed 'broken pipe' errors in FileCommandAnalyser due to outputting loads of stuff to the command line stdin
689
719
 
690
- 0.5.0 (2010-02-20)
691
- ==================
720
+ # 0.5.0 (2010-02-20)
692
721
 
693
- Added support
694
- -------------
695
- - support for Rails 3
722
+ ## Added support
696
723
 
724
+ - support for Rails 3
697
725
 
698
- 0.4.4 (2010-02-16)
699
- ==================
726
+ # 0.4.4 (2010-02-16)
700
727
 
701
728
  Better late than never to start logging change history...
702
729
 
703
- New features
704
- ------------
730
+ ## New features
731
+
705
732
  - added aspect_ratio to rmagick_analyser
706
733
 
707
- Added support
708
- -------------
734
+ ## Added support
735
+
709
736
  - support for ruby 1.9
710
737
  - added development dependencies to gemspec for easier setting up