shrine 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of shrine might be problematic. Click here for more details.

Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +681 -0
  3. data/README.md +73 -21
  4. data/doc/carrierwave.md +75 -20
  5. data/doc/creating_storages.md +15 -26
  6. data/doc/direct_s3.md +113 -31
  7. data/doc/multiple_files.md +4 -8
  8. data/doc/paperclip.md +98 -31
  9. data/doc/refile.md +4 -6
  10. data/doc/testing.md +24 -21
  11. data/lib/shrine.rb +32 -20
  12. data/lib/shrine/plugins/activerecord.rb +2 -0
  13. data/lib/shrine/plugins/add_metadata.rb +2 -0
  14. data/lib/shrine/plugins/background_helpers.rb +2 -0
  15. data/lib/shrine/plugins/backgrounding.rb +11 -4
  16. data/lib/shrine/plugins/backup.rb +2 -0
  17. data/lib/shrine/plugins/cached_attachment_data.rb +2 -0
  18. data/lib/shrine/plugins/copy.rb +2 -0
  19. data/lib/shrine/plugins/data_uri.rb +20 -12
  20. data/lib/shrine/plugins/default_storage.rb +2 -0
  21. data/lib/shrine/plugins/default_url.rb +2 -0
  22. data/lib/shrine/plugins/default_url_options.rb +2 -0
  23. data/lib/shrine/plugins/delete_promoted.rb +2 -0
  24. data/lib/shrine/plugins/delete_raw.rb +2 -0
  25. data/lib/shrine/plugins/determine_mime_type.rb +18 -2
  26. data/lib/shrine/plugins/direct_upload.rb +6 -6
  27. data/lib/shrine/plugins/download_endpoint.rb +2 -0
  28. data/lib/shrine/plugins/dynamic_storage.rb +2 -0
  29. data/lib/shrine/plugins/hooks.rb +2 -0
  30. data/lib/shrine/plugins/included.rb +2 -0
  31. data/lib/shrine/plugins/infer_extension.rb +131 -0
  32. data/lib/shrine/plugins/keep_files.rb +2 -0
  33. data/lib/shrine/plugins/logging.rb +6 -4
  34. data/lib/shrine/plugins/metadata_attributes.rb +2 -0
  35. data/lib/shrine/plugins/migration_helpers.rb +2 -0
  36. data/lib/shrine/plugins/module_include.rb +2 -0
  37. data/lib/shrine/plugins/moving.rb +2 -0
  38. data/lib/shrine/plugins/multi_delete.rb +4 -0
  39. data/lib/shrine/plugins/parallelize.rb +2 -0
  40. data/lib/shrine/plugins/parsed_json.rb +2 -0
  41. data/lib/shrine/plugins/presign_endpoint.rb +7 -7
  42. data/lib/shrine/plugins/pretty_location.rb +2 -0
  43. data/lib/shrine/plugins/processing.rb +2 -0
  44. data/lib/shrine/plugins/rack_file.rb +2 -0
  45. data/lib/shrine/plugins/rack_response.rb +2 -0
  46. data/lib/shrine/plugins/recache.rb +2 -0
  47. data/lib/shrine/plugins/refresh_metadata.rb +2 -0
  48. data/lib/shrine/plugins/remote_url.rb +12 -1
  49. data/lib/shrine/plugins/remove_attachment.rb +2 -0
  50. data/lib/shrine/plugins/remove_invalid.rb +2 -0
  51. data/lib/shrine/plugins/restore_cached_data.rb +2 -0
  52. data/lib/shrine/plugins/sequel.rb +2 -0
  53. data/lib/shrine/plugins/signature.rb +10 -8
  54. data/lib/shrine/plugins/store_dimensions.rb +5 -3
  55. data/lib/shrine/plugins/upload_endpoint.rb +7 -8
  56. data/lib/shrine/plugins/upload_options.rb +2 -0
  57. data/lib/shrine/plugins/validation_helpers.rb +2 -0
  58. data/lib/shrine/plugins/versions.rb +72 -31
  59. data/lib/shrine/storage/file_system.rb +11 -4
  60. data/lib/shrine/storage/linter.rb +5 -13
  61. data/lib/shrine/storage/s3.rb +16 -13
  62. data/lib/shrine/version.rb +3 -1
  63. data/shrine.gemspec +7 -6
  64. metadata +26 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6ffc195c54c2afa0b36d184a94e44f5e8e110bb
4
- data.tar.gz: '026928b32cef34807152c6999cee6e5f2f94ef81'
3
+ metadata.gz: 3eaf93cef812b79947acfc7c7430ef325d9a491d
4
+ data.tar.gz: 0f303e9d11e6068d7fea7d9ee82de5f3b0366ae4
5
5
  SHA512:
6
- metadata.gz: b520588785bf8fb1145500fe7a5819685d3a1ec00773c9bf124a7e4b8c0a6c4f5400e0389910741db02aaf58a591df263ba8e305f9112ed83bda997d6b6dbed5
7
- data.tar.gz: a993d56594c2ea0b8c31f5c8bf84416358da9bdda4ede5c5353ba8be89d8cb5058f05dc97eedaf9a63efcf592c9354006fd4b402bc65399d989933aceb6e4a5c
6
+ metadata.gz: 4fe0e87ded5e804acfa29876e7b1f3fc777cfb8ba1fcb3f579d82f108db6df526e9fe1c606a9058ed6071985e94408cace9d0584656421d7daf83b16302617a6
7
+ data.tar.gz: 98553462acfd41d1f24de296c82cbe12f4be7333693e2e4acd436416a524e7d348a0169248b7ea60d168462814e9e52d48a35afa6f642eb7dfc1592d72abfca7
@@ -0,0 +1,681 @@
1
+ ## 2.9.0 (2018-01-27)
2
+
3
+ * Support arrays of files in `versions` plugin (@janko-m)
4
+
5
+ * Added `:marcel` analyzer to `determine_mime_type` plugin (@janko-m)
6
+
7
+ * Deprecate `:filename` option of the `data_uri` plugin in favour of the new `infer_extension` plugin (@janko-m)
8
+
9
+ * Add `infer_extension` plugin for automatically deducing upload location extension from MIME type (@janko-m)
10
+
11
+ * Apply default storage options passed via `Attachment.new` in `backgrounding` plugin (@janko-m)
12
+
13
+ * Fix S3 storage replacing spaces in filename with "+" symbols (@ndbroadbent)
14
+
15
+ * Deprecate the `multi_delete` plugin (@janko-m)
16
+
17
+ * Allow calling `UploadedFile#open` without passing a block (@hmistry)
18
+
19
+ * Delete tempfiles in case of errors in `UploadedFile#download` and `Storage::S3#download` (@hmistry)
20
+
21
+ * Freeze all string literals (@hmistry)
22
+
23
+ * Allow passing options to `Model#<attachment>_attacher` for overriding `Attacher` options (@janko-m)
24
+
25
+ ## 2.8.0 (2017-10-11)
26
+
27
+ * Expand relative directory paths when initializing `Storage::FileSystem` (@janko-m)
28
+
29
+ * Fix `logging` plugin erroring on `:json` format when ActiveSupport is loaded (@janko-m)
30
+
31
+ * Allow `Storage::S3#clear!` to take a block for specifying which objects to delete (@janko-m)
32
+
33
+ * Make `:filemagic` analyzer close the FileMagic descriptor even in case of exceptions (@janko-m)
34
+
35
+ * Make `:file` analyzer work for potential file types which have magic bytes farther than 256 KB (@janko-m)
36
+
37
+ * Deprecate `aws-sdk` 2.x in favour of the new `aws-sdk-s3` gem (@janko-m)
38
+
39
+ * Modify `UploadedFile#extension` to always return the extension in lowercase format (@janko-m)
40
+
41
+ * Downcase the original file extension when generating an upload location (@janko-m)
42
+
43
+ * Allow specifying the full record attribute name in `metadata_attributes` plugin (@janko-m)
44
+
45
+ * Allow specifying metadata mappings on `metadata_attributes` plugin initialization (@janko-m)
46
+
47
+ * Add support for ranged requests in `download_endpoint` and `rack_response` plugins (@janko-m)
48
+
49
+ * Allow `Storage::S3#open` and `Storage::S3#download` to accept additional options (@janko-m)
50
+
51
+ * Forward any options given to `UploadedFile#open` or `UploadedFile#download` to the storage (@janko-m)
52
+
53
+ * Update `direct_upload` plugin to support Roda 3 (@janko-m)
54
+
55
+ ## 2.7.0 (2017-09-11)
56
+
57
+ * Deprecate the `Shrine::DownloadEndpoint` constant over `Shrine.download_endpoint` (@janko-m)
58
+
59
+ * Allow an additional `#headers` attribute on presigns and return it in `presign_endpoint` (@janko-m)
60
+
61
+ * Allow overriding `upload_endpoint` and `presign_endpoint` options per-endpoint (@janko-m)
62
+
63
+ * Add `:presign` and `:rack_response` options to `presign_endpoint` (@janko-m)
64
+
65
+ * Add `:upload`, `:upload_context` and `:rack_response` options to `upload_endpoint` (@janko-m)
66
+
67
+ * Modify `upload_endpoint` and `presign_endpoint` to return `text/plain` error responses (@janko-m)
68
+
69
+ * Add `:request` upload context parameter in `upload_endpoint` (@janko-m)
70
+
71
+ * Change `:action` upload context parameter to `:upload` in `upload_endpoint` (@janko-m)
72
+
73
+ * Return `405 Method Not Allowed` on invalid HTTP verb in `upload_endpoint` and `presign_endpoint` (@janko-m)
74
+
75
+ * Modify `upload_endpoint` and `presign_endpoint` to handle requests on the root URL (@janko-m)
76
+
77
+ * Allow creating Rack apps dynamically in `upload_endpoint` and `presign_endpoint` (@janko-m)
78
+
79
+ * Remove Roda dependency from `upload_endpoint` and `presign_endpoint` plugins (@janko-m)
80
+
81
+ * Split `direct_upload` plugin into `upload_endpoint` and `presign_endpoint` plugins (@janko-m)
82
+
83
+ * Support the new `aws-sdk-s3` gem in `Shrine::Storage::S3` (@lizdeika)
84
+
85
+ * Return `Cache-Control` header in `download_endpoint` to permanently cache responses (@janko-m)
86
+
87
+ * Return `404 Not Found` when uploaded file doesn't exist in `download_endpoint` (@janko-m)
88
+
89
+ * Utilize uploaded file metadata when generating response in `download_endpoint` (@janko-m)
90
+
91
+ * Fix deprecation warning when generating fake presign with query parameters (@janko-m)
92
+
93
+ * Don't raise error in `file` and `filemagic` MIME type analyzer on empty IO (@ypresto)
94
+
95
+ * Require `down` in `remote_url` plugin even when a custom downloader is given (@janko-m)
96
+
97
+ * Require `time` library in `logging` plugin to fix `undefined method #iso8601 for Time` (@janko-m)
98
+
99
+ * Allow validations defined on a superclass to be reused in a subclass (@printercu)
100
+
101
+ * Allow validation error messages to be an array of arguments for ActiveRecord (@janko-m)
102
+
103
+ * Allow model subclasses to override the attachment with a different uploader (@janko-m)
104
+
105
+ * Accept `Attacher.new` options like `store:` and `cache:` via `Attachment.new` (@ypresto)
106
+
107
+ * Raise `ArgumentError` when `:bucket` option is nil in `Shrine::Storage::S3#initialize` (@janko-m)
108
+
109
+ * Don't wrap base64-encoded content into 60 columns in `UploadedFile#base64` and `#data_uri` (@janko-m)
110
+
111
+ * Add `:mini_mime` option to `determine_mime_type` plugin for using the [mini_mime](https://github.com/discourse/mini_mime) gem (@janko-m)
112
+
113
+ * Fix `data_uri` plugin raising an exception on Ruby 2.4.1 when using raw data URIs (@janko-m)
114
+
115
+ * Implement `Shrine::Storage::S3#open` using the aws-sdk gem instead of `Down.open` (@janko-m)
116
+
117
+ * Un-deprecate `Shrine.uploaded_file` accepting file data as JSON string (@janko-m)
118
+
119
+ * Don't wrap base64-formatted signatures to 60 columns (@janko-m)
120
+
121
+ * Don't add a newline at the end of the base64-formatted signature (@janko-m)
122
+
123
+ ## 2.6.1 (2017-04-12)
124
+
125
+ * Fix `download_endpoint` returning incorrect reponse body in some cases (@janko-m)
126
+
127
+ ## 2.6.0 (2017-04-04)
128
+
129
+ * Make `Shrine::Storage::FileSystem#path` public which returns path to the file as a `Pathname` object (@janko-m)
130
+
131
+ * Add `Shrine.rack_file` to `rack_file` plugin for converting Rack uploaded file hash into an IO (@janko-m)
132
+
133
+ * Deprecate passing a Rack file hash to `Shrine#upload` (@janko-m)
134
+
135
+ * Expose `Shrine.extract_dimensions` and `Shrine.dimensions_analyzers` in `store_dimensions` plugin (@janko-m)
136
+
137
+ * Add `metadata_attributes` plugin for syncing attachment metadata with additional record attributes (@janko-m)
138
+
139
+ * Remove the undocumented `:magic_header` option from `determine_mime_type` plugin (@janko-m)
140
+
141
+ * Expose `Shrine.determine_mime_type` and `Shrine.mime_type_analyzers` in `determine_mime_type` plugin (@janko-m)
142
+
143
+ * Add `signature` plugin for calculating a SHA{1,256,384,512}/MD5/CRC32 hash of a file (@janko-m)
144
+
145
+ * Return the resolved plugin module when calling `Shrine.plugin` (@janko-m)
146
+
147
+ * Accept hash of metadata with symbol keys as well in `add_metadata` block (@janko-m)
148
+
149
+ * Add `refresh_metadata` plugin for re-extracting metadata from an uploaded file (@janko-m)
150
+
151
+ * Allow S3 storage to use parallelized multipart upload for files from FileSystem storage as well (@janko-m)
152
+
153
+ * Improve default multipart copy threshold for S3 storage (@janko-m)
154
+
155
+ * Allow specifying multipart upload and copy thresholds separately in `Shrine::Storage::S3` (@janko-m)
156
+
157
+ * Fix `Storage::FileSystem#clear!` not deleting old files if there are newer files in the same directory (@janko-m)
158
+
159
+ * Allow media type in the data URI to have additional parameters (@janko-m)
160
+
161
+ * URI-decode non-base64 data URIs, as such data URIs are URI-encoded according to the specification (@janko-m)
162
+
163
+ * Improve performance of parsing data URIs by 10x switching from a regex to StringScanner (@janko-m)
164
+
165
+ * Reduce memory usage of `Shrine.data_uri` and `UploadedFile#base64` by at least 2x (@janko-m)
166
+
167
+ * Add `Shrine.data_uri` to `data_uri` plugin which parses and converts the given data URI to an IO object (@janko-m)
168
+
169
+ * Make `rack_file` plugin work with HashWithIndifferentAccess-like objects such as Hashie::Mash (@janko-m)
170
+
171
+ * Expose `Aws::S3::Client` via `Shrine::Storage::S3#client`, and deprecate `Shrine::Strorage::S3#s3` (@janko-m)
172
+
173
+ * Modify `delete_raw` plugin to delete any IOs that respond to `#path` (@janko-m)
174
+
175
+ * Require the Tempfile standard library in lib/shrine.rb (@janko-m)
176
+
177
+ * Deprecate dimensions validations passing when a dimension is nil (@janko-m)
178
+
179
+ * Deprecate passing regexes to type/extension whitelists/blacklists in `validation_helpers` (@janko-m)
180
+
181
+ * Don't include list of blacklisted types and extensions in default `validation_helpers` messages (@janko-m)
182
+
183
+ * Improve default error messages in `validation_helpers` plugin (@janko-m)
184
+
185
+ * Don't require the `benchmark` standard library in `logging` plugin (@janko-m)
186
+
187
+ * Don't dirty the attacher in `Attacher#set` when attachment hasn't changed (@janko-m)
188
+
189
+ * Rename `Attacher#attached?` to a more accurate `Attacher#changed?` (@janko-m)
190
+
191
+ * Allow calling `Attacher#finalize` if attachment hasn't changed, instead of raising an error (@janko-m)
192
+
193
+ * Make `Shrine::Storage::S3#object` method public (@janko-m)
194
+
195
+ * Prevent autoloading race conditions in aws-sdk gem by eager loading the S3 service (@janko-m)
196
+
197
+ * Raise `Shrine::Error` when `Shrine#generate_location` returns nil (@janko-m)
198
+
199
+ ## 2.5.0 (2016-11-11)
200
+
201
+ * Add `Attacher.default_url` as the idiomatic way of declaring default URLs (@janko-m)
202
+
203
+ * Allow uploaders themselves to accept Rack uploaded files when `rack_file` is loaded (@janko-m)
204
+
205
+ * Raise a descriptive error when two versions are pointing to the same IO object (@janko-m)
206
+
207
+ * Make `backgrounding` plugin work with plain model instances (@janko-m)
208
+
209
+ * Make validation methods in `validation_helpers` plugin return whether validation succeeded (@janko-m)
210
+
211
+ * Make extension matching case insensitive in `validation_helpers` plugin (@jonasheinrich)
212
+
213
+ * Make `remove_invalid` plugin remove dirty state on attacher after removing invalid file (@janko-m)
214
+
215
+ * Raise error if `Shrine::UploadedFile` isn't initialized with valid data (@janko-m)
216
+
217
+ * Accept `extension` parameter without the dot in presign endpoint of `direct_upload` plugin (@jonasheinrich)
218
+
219
+ * Add `:fallback_to_original` option to `versions` plugin for disabling fallback to original file (@janko-m)
220
+
221
+ * Add `#dimensions` method to `UploadedFile` when loading `store_dimensions` plugin (@janko-m)
222
+
223
+ * Make it possible to extract multiple metadata values at once with the `add_metadata` plugin (@janko-m)
224
+
225
+ ## 2.4.1 (2016-10-17)
226
+
227
+ * Move back JSON serialization from `Attacher#write` to `Attacher#_set` (@janko-m)
228
+
229
+ * Make `remove_invalid` plugin assign back a previous attachment if was there (@janko-m)
230
+
231
+ * Deprecate `Storage::FileSystem#download` (@janko-m)
232
+
233
+ * In `UploadedFile#download` use extension from `#original_filename` if `#id` doesn't have it (@janko-m)
234
+
235
+ ## 2.4.0 (2016-10-11)
236
+
237
+ * Add `#convert_before_write` and `#convert_after_read` on the Attacher for data attribute conversion (@janko-m)
238
+
239
+ * Extract the `<attachment>_data` attribute name into `Attacher#data_attribute` (@janko-m)
240
+
241
+ * Support JSON and JSONB PostgreSQL columns with ActiveRecord (@janko-m)
242
+
243
+ * Fix S3 storage not handling filenames with double quotes in Content-Disposition header (@janko-m)
244
+
245
+ * Work around aws-sdk failing with non-ASCII characters in Content-Disposition header (@janko-m)
246
+
247
+ * Allow dynamically generating URL options in `default_url_options` plugin (@janko-m)
248
+
249
+ * Don't run file validations when duplicating the record in `copy` plugin (@janko-m)
250
+
251
+ * Don't use `Storage#stream` in download_endpoint plugin anymore, rely on `Storage#open` (@janko-m)
252
+
253
+ * Remove explicitly unlinking Tempfiles returned by `Storage#open` (@janko-m)
254
+
255
+ * Move `:host` from first-class storage option to `#url` option on FileSystem and S3 storage (@janko-m)
256
+
257
+ * Don't fail in FileSystem storage when attempting to delete a file that doesn't exist (@janko-m)
258
+
259
+ * In `UploadedFile#open` handle the case when `Storage#open` raises an error (@janko-m)
260
+
261
+ * Make the `sequel` plugin use less memory during transactions (@janko-m)
262
+
263
+ * Use Roda's streaming plugin in `download_endpoint` for better EventMachine integration (@janko-m)
264
+
265
+ * Deprecate accepting a JSON string in `Shrine.uploaded_file` (@janko-m)
266
+
267
+ * In S3 storage automatically write original filename to `Content-Disposition` header (@janko-m)
268
+
269
+ * Override `#to_s` in `Shrine::Attachment` for better introspection with `puts` (@janko-m)
270
+
271
+ ## 2.3.1 (2016-09-01)
272
+
273
+ * Don't change permissions of existing directories in FileSystem storage (@janko-m)
274
+
275
+ ## 2.3.0 (2016-08-27)
276
+
277
+ * Prevent client from caching the presign response in direct_upload plugin (@janko-m)
278
+
279
+ * Make Sequel update only the attachment in background job (@janko-m)
280
+
281
+ * Add copy plugin for copying files from one record to another (@janko-m)
282
+
283
+ * Disable moving when uploading stored file to backup storage (@janko-m)
284
+
285
+ * Make `Attacher#recache` from the recache plugin public for standalone usage (@janko-m)
286
+
287
+ * Allow changing `Shrine::Attacher#context` once the attacher is instantiated (@janko-m)
288
+
289
+ * Make `Attacher#read` for reading the attachment column public (@janko-m)
290
+
291
+ * Don't rely on the `#id` writer on a model instance in backgrounding plugin (@janko-m)
292
+
293
+ * Don't make `Attacher#swap` private in sequel and activerecord plugins (@janko-m)
294
+
295
+ * Set default UNIX permissions to 0644 for files and 0755 for directories (@janko-m)
296
+
297
+ * Apply directory permissions to all subfolders inside the main folder (@janko-m)
298
+
299
+ * Add `:directory_permissions` to `Storage::FileSystem` (@janko-m)
300
+
301
+ ## 2.2.0 (2016-07-29)
302
+
303
+ * Soft deprecate `:phase` over `:action` in `context` (@janko-m)
304
+
305
+ * Add ability to sequel and activerecord plugins to disable callbacks and validations (@janko-m)
306
+
307
+ * The direct_upload endpoint now always includes both upload and presign routes (@janko-m)
308
+
309
+ * Don't let the combination for delete_raw and moving plugins trigger any errors (@janko-m)
310
+
311
+ * Add `UploadedFile#open` that mimics `File.open` with a block (@janko-m)
312
+
313
+ * In the storage linter don't require `#clear!` to be implemented (@janko-m)
314
+
315
+ * In backgrounding plugin don't require model to have attachment module included (@janko-m)
316
+
317
+ * Add add_metadata plugin for defining additional metadata values to be extracted (@janko-m)
318
+
319
+ * In determine_mime_type plugin raise error when file command wasn't found or errored (@janko-m)
320
+
321
+ * Add processing plugin for simpler and more declarative definition of processing (@janko-m)
322
+
323
+ * Storage classes don't need to implement the `#read` method anymore (@janko-m)
324
+
325
+ * Use aws-sdk in `S3#download`, which will automatically retry failed downloads (@janko-m)
326
+
327
+ * Add `:multipart_threshold` for when S3 storage should use parallelized multipart copy/upload (@janko-m)
328
+
329
+ * Automatically use optimized multipart S3 upload for files larger than 15MB (@janko-m)
330
+
331
+ * Avoid an additional HEAD request to determine content length in multipart S3 copy (@janko-m)
332
+
333
+ ## 2.1.1 (2016-07-14)
334
+
335
+ * Fix `S3#open` throwing a NameError if `net/http` isn't required (@janko-m)
336
+
337
+ ## 2.1.0 (2016-06-27)
338
+
339
+ * Remove `:names` from versions plugin, and deprecate generating versions in :cache phase (@janko-m)
340
+
341
+ * Pass a `Shrine::UploadedFile` in restore_cached_data instead of the raw IO (@janko-m)
342
+
343
+ * Increase magic header length in determine_mime_type and make it configurable (@janko-m)
344
+
345
+ * Execute `file` command in determine_mime_type the same way for files as for general IOs (@janko-m)
346
+
347
+ * Make logging and parallelize plugins work properly when loaded in this order (@janko-m)
348
+
349
+ * Don't assert arity of IO methods, so that objects like `Rack::Test::UploadedFile` are allowed (@janko-m)
350
+
351
+ * Deprecate `#cached_<attachment>_data=` over using `<attachment>` for the hidden field (@janko-m)
352
+
353
+ ## 2.0.1 (2016-05-30)
354
+
355
+ * Don't override previously set default_url in versions plugin (@janko-m)
356
+
357
+ ## 2.0.0 (2016-05-19)
358
+
359
+ * Include query parameters in CDN-ed S3 URLs, making them work for private objects (@janko-m)
360
+
361
+ * Remove the `:include_error` option from remote_url plugin (@janko-m)
362
+
363
+ * Make previous plugin options persist when reapplying the plugin (@janko-m)
364
+
365
+ * Improve how upload options and metadata are passed to storage's `#upload` and `#move` (@janko-m)
366
+
367
+ * Remove `Shrine::Confirm` and confirming `Storage#clear!` in general (@janko-m)
368
+
369
+ * Allow implementing a custom dimensions analyzer using built-in ones (@janko-m)
370
+
371
+ * Don't error in determine_mime_type when MimeMagic cannot determine the MIME (@janko-m)
372
+
373
+ * Allow implementing a custom MIME type analyzer using built-in ones (@janko-m)
374
+
375
+ * Don't check that the cached file exists in restore_cached_data plugin (@janko-m)
376
+
377
+ * Deprecate migration_helpers plugin and move `Attacher#cached?` and `Attacher#stored?` to base (@janko-m)
378
+
379
+ * Don't trigger restore_cached_data plugin functionality when assigning the same cached attachment (@janko-m)
380
+
381
+ * Give `Attacher#_promote` and `Attacher#promote` the same method signature (@janko-m)
382
+
383
+ * Add `Attacher#_delete` which now spawns a background job instead of `Attacher#delete!` (@janko-m)
384
+
385
+ * Make `Attacher#cache!`, `Attacher#store!`, and `Attacher#delete!` public (@janko-m)
386
+
387
+ * Don't cache storages in dynamic_storage plugin (@janko-m)
388
+
389
+ * Make only one HTTP request in download_endpoint plugin (@janko-m)
390
+
391
+ * Print secuity warning when not using determine_mime_type plugin (@janko-m)
392
+
393
+ * Support Mongoid in backgrounding plugin (@janko-m)
394
+
395
+ * Allow including attachment module to non-`Sequel::Model` objects in sequel plugin (@janko-m)
396
+
397
+ * Handle paths that start with "-" in determine_mime_type plugin when `:file` analyzer is used (@zaeleus)
398
+
399
+ * Allow including attachment module to non-`ActiveRecord::Base` objects in activerecord plugin (@janko-m)
400
+
401
+ * Remove deprecated "restore_cached" alias for restore_cached_data plugin (@janko-m)
402
+
403
+ * Remove deprecated "delete_uploaded" alias for delete_raw plugin (@janko-m)
404
+
405
+ * Make the default generated unique location shorter (@janko-m)
406
+
407
+ * Make the `:delegate` option in migration_helpers default to `false` (@janko-m)
408
+
409
+ * Don't require `:storages` option anymore in moving plugin (@janko-m)
410
+
411
+ * Don't delete uploaded IO if storage doesn't support moving in moving plugin (@janko-m)
412
+
413
+ * Rename delete phases to be shorter and consistent in naming with upload phases (@janko-m)
414
+
415
+ * Remove deprecated `Shrine#default_url` (@janko-m)
416
+
417
+ * Remove deprecated `:subdirectory` on FileSystem storage (@janko-m)
418
+
419
+ * Don't return the uploaded file in `Attacher#set` and `Attacher#assign` (@janko-m)
420
+
421
+ * Return the attacher instance in `Attacher.promote` and `Attacher.delete` in backgrounding plugin (@janko-m)
422
+
423
+ * Rename "attachment" to "name", and "uploaded_file" to "attachment" in backgrounding plugin (@janko-m)
424
+
425
+ * Remove using `:presign` for presign options instead of `:presign_options` (@janko-m)
426
+
427
+ * Remove deprecated `Shrine.direct_endpoint` from direct_upload plugin (@janko-m)
428
+
429
+ * Remove deprecated keep_location plugin (@janko-m)
430
+
431
+ * Make `Shrine#extract_dimensions` a private method in store_dimensions plugin (@janko-m)
432
+
433
+ * Keep `Shrine#extract_mime_type` a private method when loading determine_mime_type plugin (@janko-m)
434
+
435
+ * Deprecate loading the backgrounding plugin through the old "background_helpers" alias (@janko-m)
436
+
437
+ ## 1.4.2 (2016-04-19)
438
+
439
+ * Removed ActiveRecord's automatic support for optimistic locking as it wasn't stable (@janko-m)
440
+
441
+ * Fixed record's dataset being modified after promoting preventing further updates with the same instance (@janko-m)
442
+
443
+ ## 1.4.1 (2016-04-18)
444
+
445
+ * Bring back triggering callbacks on promote in ORM plugins, and add support for optimistic locking (@janko-m)
446
+
447
+ ## 1.4.0 (2016-04-15)
448
+
449
+ * Return "Content-Length" response header in download_endpoint plugin (@janko-m)
450
+
451
+ * Make determine_mime_type and store_dimensions automatically rewind IO with custom analyzer (@janko-m)
452
+
453
+ * Make `before_*` and `after_*` hooks happen before and after `around_*` hooks (@janko-m)
454
+
455
+ * Rename restore_cached plugin to more accurate "restore_cached_data" (@janko-m)
456
+
457
+ * Prevent errors when attempting to validate dimensions when they are absent (@janko-m)
458
+
459
+ * Remove "thread" gem dependency in parallelize plugin (@janko-m)
460
+
461
+ * Add `:filename` to data_uri plugin for generating filenames based on content type (@janko-m)
462
+
463
+ * Make user-defined hooks always happen around logging (@janko-m)
464
+
465
+ * Add `:presign_location` to direct_upload for generating the key (@janko-m)
466
+
467
+ * Add separate `:presign_options` option for receiving presign options in direct_upload plugin (@janko-m)
468
+
469
+ * Add ability to generate fake presigns for storages which don't support them for testing (@janko-m)
470
+
471
+ * Change the `/:storage/:name` route to `/:storage/upload` in direct_upload plugin (@janko-m)
472
+
473
+ * Fix logger not being inherited in the logging plugin (@janko-m)
474
+
475
+ * Add delete_promoted plugin for deleting promoted files after record has been updated (@janko-m)
476
+
477
+ * Allow passing phase to `Attacher#promote` and generalize promoting background job (@janko-m)
478
+
479
+ * Close the cached file after extracting its metadata in restore_cached plugin (@janko-m)
480
+
481
+ * Rename delete_uploaded plugin to "delete_raw" to better explain its functionality (@janko-m)
482
+
483
+ * Pass the SSL CA bundle to open-uri when downloading an S3 file (@janko-m)
484
+
485
+ * Add `Attacher.dump` and `Attacher.load` for writing custom background jobs with custom functionality (@janko-m)
486
+
487
+ * Fix S3 URL erroring due to not being URL-encoded when `:host` option is used (@janko-m)
488
+
489
+ * Remove a tiny possibility of a race condition with backgrounding on subsequent updates (@janko-m)
490
+
491
+ * Add `:delegate` option to migration_helpers for opting out of defining methods on the model (@janko-m)
492
+
493
+ * Make logging plugin log number of both input and output files for processing (@janko-m)
494
+
495
+ * Make deleting backup work with backgrounding plugin (@janko-m)
496
+
497
+ * Make storing backup happen *after* promoting instead of before (@janko-m)
498
+
499
+ * Add `:fallbacks` to versions plugin for fallback URLs for versions which haven't finished processing (@janko-m)
500
+
501
+ * Fix keep_files not to spawn a background job when file will not be deleted (@janko-m)
502
+
503
+ ## 1.3.0 (2016-03-12)
504
+
505
+ * Add `<attachment>_cached?` and `<attachment>_stored?` to migration_helpers plugin (@janko-m)
506
+
507
+ * Fix `Attacher#backup_file` from backup plugin not to modify the given uploaded file (@janko-m)
508
+
509
+ * Allow modifying UploadedFile's data hash after it's instantiated to change the UploadedFile (@janko-m)
510
+
511
+ * Deprecate the keep_location plugin (@janko-m)
512
+
513
+ * Don't mutate context hash inside the uploader (@janko-m)
514
+
515
+ * Make extracted metadata accessible in `#generate_location` through `:metadata` in context hash (@janko-m)
516
+
517
+ * Don't require the "metadata" key when instantiating a `Shrine::UploadedFile` (@janko-m)
518
+
519
+ * Add `:include_error` option to remote_url for accessing download error in `:error_message` block (@janko-m)
520
+
521
+ * Give different error message when file wasn't found or was too large in remote_url (@janko-m)
522
+
523
+ * Rewind the IO after extracting MIME type with MimeMagic (@janko-m)
524
+
525
+ * Rewind the IO after extracting image dimensions even when extraction failed (@kaapa)
526
+
527
+ * Correctly infer the extension in `#generate_location` when uploading an `UploadedFile` (@janko-m)
528
+
529
+ * Fix ability for errors to accumulate in data_uri and remote_url plugins when assigning mutliples to same record instance (@janko-m)
530
+
531
+ * Bump Down dependency to 2.0.0 in order to fix downloading URLs with "[]" characters (@janko-m)
532
+
533
+ * Add `:namespace` option to pretty_location for including class namespace in location (@janko-m)
534
+
535
+ * Don't include the namespace of the class in the location with the pretty_location plugin (@janko-m)
536
+
537
+ * Remove aws-sdk deprecation warning when storage isn't instantiated with credentials (@reidab)
538
+
539
+ * Don't make uploaded file's metadata methods error when the corresponding key-value pair is missing (@janko-m)
540
+
541
+ * Close the `UploadedFile` on upload only if it was previously opened, which doesn't happen on S3 COPY (@reidab)
542
+
543
+ * Fix `NameError` when silencing "missing record" errors in backgrounding (@janko-m)
544
+
545
+ ## 1.2.0 (2016-01-26)
546
+
547
+ * Make `Shrine::Attacher.promote` and `Shrine::Attacher.delete` return the record in backgrounding plugin (@janko-m)
548
+
549
+ * Close the IO on upload even if the upload errors (@janko-m)
550
+
551
+ * Use a transaction when checking if attachment has changed after storing during promotion (@janko-m)
552
+
553
+ * Don't attempt to start promoting in background if attachment has already changed (@janko-m)
554
+
555
+ * Don't error in backgrounding when record is missing (@janko-m)
556
+
557
+ * Prevent multiline content type spoof attempts in validation_helpers (@xzo)
558
+
559
+ * Make custom metadata inherited from uploaded files and make `#extract_metadata` called only on caching (@janko-m)
560
+
561
+ ## 1.1.0 (2015-12-26)
562
+
563
+ * Rename the "background_helpers" plugin to "backgrounding" (@janko-m)
564
+
565
+ * Rename the `:subdirectory` option to `:prefix` on FileSystem storage (@janko-m)
566
+
567
+ * Add download_endpoint plugin for downloading files uploaded to database storages and for securing downloads (@janko-m)
568
+
569
+ * Make `around_*` hooks return the result of the corresponding action (@janko-m)
570
+
571
+ * Make the direct upload endpoint customizable, inheritable and inspectable (@janko-m)
572
+
573
+ * Add upload_options plugin for dynamically generating storage-specific upload options (@janko-m)
574
+
575
+ * Allow the context hash to be modified (@janko-m)
576
+
577
+ * Fix extension not being returned for storages which remove it from ID (Flickr, SQL, GridFS) (@janko-m)
578
+
579
+ * Delete underlying Tempfiles when closing an `UploadedFile` (@janko-m)
580
+
581
+ * Fix background_helpers plugin not working with ActiveJob (@janko-m)
582
+
583
+ * Add `UploadedFile#base64` to the data_uri plugin (@janko-m)
584
+
585
+ * Optimize `UploadedData#data_uri` to not download the file and instantiate file contents string only once (@janko-m)
586
+
587
+ * Allow adding S3 upload options dynamically per upload (@janko-m)
588
+
589
+ * Add delete_uploaded plugin for automatically deleting files after they're uploaded (@janko-m)
590
+
591
+ * Close an open file descriptor left after downloading a FileSystem file (@janko-m)
592
+
593
+ * Make `FileSystem#url` Windows compatible (@janko-m)
594
+
595
+ * Add `UploadedFile#content_type` alias to `#mime_type` for better integration with upload libraries (@janko-m)
596
+
597
+ * Add a `UploadedFile#data_uri` method to the data_uri plugin (@janko-m)
598
+
599
+ * Allow the data_uri plugin to accept "+" symbols in MIME type names (@janko-m)
600
+
601
+ * Make the data_uri plugin accept data URIs which aren't base64 encoded (@janko-m)
602
+
603
+ * Close all IOs after uploading them (@janko-m)
604
+
605
+ * Allow passing a custom IO object to the Linter (@janko-m)
606
+
607
+ * Add remove_invalid plugin for automatically deleting and deassigning invalid cached files (@janko-m)
608
+
609
+ * Add `:max_size` option to the direct_upload plugin (@janko-m)
610
+
611
+ * Move `Shrine#default_url` to default_url plugin (@janko-m)
612
+
613
+ * Enable `S3#multi_delete` to delete more than 1000 objects by batching deletes (@janko-m)
614
+
615
+ * Add the keep_location plugin for easier debugging or backups (@janko-m)
616
+
617
+ * Add the backup plugin for backing up stored files (@janko-m)
618
+
619
+ * Storages don't need to rewind the files after upload anymore (@janko-m)
620
+
621
+ * Make S3 presigns work when the `:endpoint` option is given (@NetsoftHoldings)
622
+
623
+ * Fix parallelize plugin to always work with the moving plugin (@janko-m)
624
+
625
+ * Fix S3 storage to handle copying files that are larger than 5GB (@janko-m)
626
+
627
+ * Add `:upload_options` to S3 storage for applying additional options on upload (@janko-m)
628
+
629
+ * Reduce length of URLs generated with pretty_location plugin (@gshaw)
630
+
631
+ ## 1.0.0 (2015-11-27)
632
+
633
+ * Improve Windows compatibility in the FileSystem storage (@janko-m)
634
+
635
+ * Remove the ability for FileSystem storage to accept IDs starting with a slash (@janko-m)
636
+
637
+ * Fix keep_files plugin requiring context for deleting files (@janko-m)
638
+
639
+ * Extract assigning cached files by parsed JSON into a parsed_json plugin (@janko-m)
640
+
641
+ * Add `(before|around|after)_upload` to the hooks plugin (@janko-m)
642
+
643
+ * Fix `S3#multi_delete` and `S3#clear!` not using the prefix (@janko-m)
644
+
645
+ * Add ability to pass presign options to storages in the direct_upload plugin (@janko-m)
646
+
647
+ * Remove `Shrine.io!` because it was actually meant to be only for internal use (@janko-m)
648
+
649
+ * Remove `Shrine.delete` because of redundancy (@janko-m)
650
+
651
+ * Add default_url_options plugin for specifiying default URL options for uploaded files (@janko-m)
652
+
653
+ * Add module_include plugin for easily extending core classes for given uploader (@janko-m)
654
+
655
+ * Add support for Sequel's Postgres JSON column support (@janko-m)
656
+
657
+ * Fix migration_helpers plugin not detecting when column changed (@janko-m)
658
+
659
+ * Add the `:public` option to S3 storage for retrieving public URLs which aren't signed (@janko-m)
660
+
661
+ * Remove the delete_invalid plugin, as it could cause lame errors (@janko-m)
662
+
663
+ * Don't delete cached files anymore, as it can cause errors with backgrounding (@janko-m)
664
+
665
+ * Add a `:host` option to the S3 storage for specifying CDNs (@janko-m)
666
+
667
+ * Don't allow same attachment to be promoted multiple times with backgrounding (@janko-m)
668
+
669
+ * Fix recache plugin causing an infinite loop (@janko-m)
670
+
671
+ * Fix an encoding error in determine_mime_type when using `:file` with non-files (@janko-m)
672
+
673
+ * Make `UploadedFile` actually delete itself only once (@janko-m)
674
+
675
+ * Make `UploadedFile#inspect` cleaner by showing only the data hash (@janko-m)
676
+
677
+ * Make determine_mime_type able to accept non-files when using :file (@janko-m)
678
+
679
+ * Make logging plugin accept PORO instance which don't have an #id (@janko-m)
680
+
681
+ * Add rack_file plugin for attaching Rack file hashes to models (@janko-m)