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