@rails/activestorage 6.0.3-7 → 6.0.4-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/CHANGELOG.md +0 -268
package/README.md CHANGED
@@ -10,7 +10,7 @@ You can read more about Active Storage in the [Active Storage Overview](https://
10
10
 
11
11
  ## Compared to other storage solutions
12
12
 
13
- A key difference to how Active Storage works compared to other attachment solutions in Rails is through the use of built-in [Blob](https://github.com/rails/rails/blob/master/activestorage/app/models/active_storage/blob.rb) and [Attachment](https://github.com/rails/rails/blob/master/activestorage/app/models/active_storage/attachment.rb) models (backed by Active Record). This means existing application models do not need to be modified with additional columns to associate with files. Active Storage uses polymorphic associations via the `Attachment` join model, which then connects to the actual `Blob`.
13
+ A key difference to how Active Storage works compared to other attachment solutions in Rails is through the use of built-in [Blob](https://github.com/rails/rails/blob/main/activestorage/app/models/active_storage/blob.rb) and [Attachment](https://github.com/rails/rails/blob/main/activestorage/app/models/active_storage/attachment.rb) models (backed by Active Record). This means existing application models do not need to be modified with additional columns to associate with files. Active Storage uses polymorphic associations via the `Attachment` join model, which then connects to the actual `Blob`.
14
14
 
15
15
  `Blob` models store attachment metadata (filename, content-type, etc.), and their identifier key in the storage service. Blob models do not store the actual binary data. They are intended to be immutable in spirit. One file, one blob. You can associate the same blob with multiple application models as well. And if you want to do transformations of a given `Blob`, the idea is that you'll simply create a new one, rather than attempt to mutate the existing one (though of course you can delete the previous version later if you don't need it).
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/activestorage",
3
- "version": "6.0.3-7",
3
+ "version": "6.0.4-2",
4
4
  "description": "Attach cloud and local files in Rails applications",
5
5
  "main": "app/assets/javascripts/activestorage.js",
6
6
  "files": [
package/CHANGELOG.md DELETED
@@ -1,268 +0,0 @@
1
- ## Rails 6.0.3.7 (May 05, 2021) ##
2
-
3
- * No changes.
4
-
5
-
6
- ## Rails 6.0.3.6 (March 26, 2021) ##
7
-
8
- * Marcel is upgraded to version 1.0.0 to avoid a dependency on GPL-licensed
9
- mime types data.
10
-
11
- *George Claghorn*
12
-
13
-
14
- ## Rails 6.0.3.5 (February 10, 2021) ##
15
-
16
- * No changes.
17
-
18
-
19
- ## Rails 6.0.3.4 (October 07, 2020) ##
20
-
21
- * No changes.
22
-
23
-
24
- ## Rails 6.0.3.3 (September 09, 2020) ##
25
-
26
- * No changes.
27
-
28
-
29
- ## Rails 6.0.3.2 (June 17, 2020) ##
30
-
31
- * No changes.
32
-
33
-
34
- ## Rails 6.0.3.1 (May 18, 2020) ##
35
-
36
- * [CVE-2020-8162] Include Content-Length in signature for ActiveStorage direct upload
37
-
38
- ## Rails 6.0.3 (May 06, 2020) ##
39
-
40
- * No changes.
41
-
42
-
43
- ## Rails 6.0.2.2 (March 19, 2020) ##
44
-
45
- * No changes.
46
-
47
-
48
- ## Rails 6.0.2.1 (December 18, 2019) ##
49
-
50
- * No changes.
51
-
52
-
53
- ## Rails 6.0.2 (December 13, 2019) ##
54
-
55
- * No changes.
56
-
57
-
58
- ## Rails 6.0.1 (November 5, 2019) ##
59
-
60
- * `ActiveStorage::AnalyzeJob`s are discarded on `ActiveRecord::RecordNotFound` errors.
61
-
62
- *George Claghorn*
63
-
64
- * Blobs are recorded in the database before being uploaded to the service.
65
- This fixes that generated blob keys could silently collide, leading to
66
- data loss.
67
-
68
- *Julik Tarkhanov*
69
-
70
-
71
- ## Rails 6.0.0 (August 16, 2019) ##
72
-
73
- * No changes.
74
-
75
-
76
- ## Rails 6.0.0.rc2 (July 22, 2019) ##
77
-
78
- * No changes.
79
-
80
-
81
- ## Rails 6.0.0.rc1 (April 24, 2019) ##
82
-
83
- * Don't raise when analyzing an image whose type is unsupported by ImageMagick.
84
-
85
- Fixes #36065.
86
-
87
- *Guilherme Mansur*
88
-
89
- * Permit generating variants of BMP images.
90
-
91
- *Younes Serraj*
92
-
93
-
94
- ## Rails 6.0.0.beta3 (March 11, 2019) ##
95
-
96
- * No changes.
97
-
98
-
99
- ## Rails 6.0.0.beta2 (February 25, 2019) ##
100
-
101
- * No changes.
102
-
103
-
104
- ## Rails 6.0.0.beta1 (January 18, 2019) ##
105
-
106
- * [Rename npm package](https://github.com/rails/rails/pull/34905) from
107
- [`activestorage`](https://www.npmjs.com/package/activestorage) to
108
- [`@rails/activestorage`](https://www.npmjs.com/package/@rails/activestorage).
109
-
110
- *Javan Makhmali*
111
-
112
- * Replace `config.active_storage.queue` with two options that indicate which
113
- queues analysis and purge jobs should use, respectively:
114
-
115
- * `config.active_storage.queues.analysis`
116
- * `config.active_storage.queues.purge`
117
-
118
- `config.active_storage.queue` is preferred over the new options when it's
119
- set, but it is deprecated and will be removed in Rails 6.1.
120
-
121
- *George Claghorn*
122
-
123
- * Permit generating variants of TIFF images.
124
-
125
- *Luciano Sousa*
126
-
127
- * Use base36 (all lowercase) for all new Blob keys to prevent
128
- collisions and undefined behavior with case-insensitive filesystems and
129
- database indices.
130
-
131
- *Julik Tarkhanov*
132
-
133
- * It doesn’t include an `X-CSRF-Token` header if a meta tag is not found on
134
- the page. It previously included one with a value of `undefined`.
135
-
136
- *Cameron Bothner*
137
-
138
- * Fix `ArgumentError` when uploading to amazon s3
139
-
140
- *Hiroki Sanpei*
141
-
142
- * Add progressive JPG to default list of variable content types
143
-
144
- *Maurice Kühlborn*
145
-
146
- * Add `ActiveStorage.routes_prefix` for configuring generated routes.
147
-
148
- *Chris Bisnett*
149
-
150
- * `ActiveStorage::Service::AzureStorageService` only handles specifically
151
- relevant types of `Azure::Core::Http::HTTPError`. It previously obscured
152
- other types of `HTTPError`, which is the azure-storage gem’s catch-all
153
- exception class.
154
-
155
- *Cameron Bothner*
156
-
157
- * `ActiveStorage::DiskController#show` generates a 404 Not Found response when
158
- the requested file is missing from the disk service. It previously raised
159
- `Errno::ENOENT`.
160
-
161
- *Cameron Bothner*
162
-
163
- * `ActiveStorage::Blob#download` and `ActiveStorage::Blob#open` raise
164
- `ActiveStorage::FileNotFoundError` when the corresponding file is missing
165
- from the storage service. Services translate service-specific missing object
166
- exceptions (e.g. `Google::Cloud::NotFoundError` for the GCS service and
167
- `Errno::ENOENT` for the disk service) into
168
- `ActiveStorage::FileNotFoundError`.
169
-
170
- *Cameron Bothner*
171
-
172
- * Added the `ActiveStorage::SetCurrent` concern for custom Active Storage
173
- controllers that can't inherit from `ActiveStorage::BaseController`.
174
-
175
- *George Claghorn*
176
-
177
- * Active Storage error classes like `ActiveStorage::IntegrityError` and
178
- `ActiveStorage::UnrepresentableError` now inherit from `ActiveStorage::Error`
179
- instead of `StandardError`. This permits rescuing `ActiveStorage::Error` to
180
- handle all Active Storage errors.
181
-
182
- *Andrei Makarov*, *George Claghorn*
183
-
184
- * Uploaded files assigned to a record are persisted to storage when the record
185
- is saved instead of immediately.
186
-
187
- In Rails 5.2, the following causes an uploaded file in `params[:avatar]` to
188
- be stored:
189
-
190
- ```ruby
191
- @user.avatar = params[:avatar]
192
- ```
193
-
194
- In Rails 6, the uploaded file is stored when `@user` is successfully saved.
195
-
196
- *George Claghorn*
197
-
198
- * Add the ability to reflect on defined attachments using the existing
199
- ActiveRecord reflection mechanism.
200
-
201
- *Kevin Deisz*
202
-
203
- * Variant arguments of `false` or `nil` will no longer be passed to the
204
- processor. For example, the following will not have the monochrome
205
- variation applied:
206
-
207
- ```ruby
208
- avatar.variant(monochrome: false)
209
- ```
210
-
211
- *Jacob Smith*
212
-
213
- * Generated attachment getter and setter methods are created
214
- within the model's `GeneratedAssociationMethods` module to
215
- allow overriding and composition using `super`.
216
-
217
- *Josh Susser*, *Jamon Douglas*
218
-
219
- * Add `ActiveStorage::Blob#open`, which downloads a blob to a tempfile on disk
220
- and yields the tempfile. Deprecate `ActiveStorage::Downloading`.
221
-
222
- *David Robertson*, *George Claghorn*
223
-
224
- * Pass in `identify: false` as an argument when providing a `content_type` for
225
- `ActiveStorage::Attached::{One,Many}#attach` to bypass automatic content
226
- type inference. For example:
227
-
228
- ```ruby
229
- @message.image.attach(
230
- io: File.open('/path/to/file'),
231
- filename: 'file.pdf',
232
- content_type: 'application/pdf',
233
- identify: false
234
- )
235
- ```
236
-
237
- *Ryan Davidson*
238
-
239
- * The Google Cloud Storage service properly supports streaming downloads.
240
- It now requires version 1.11 or newer of the google-cloud-storage gem.
241
-
242
- *George Claghorn*
243
-
244
- * Use the [ImageProcessing](https://github.com/janko-m/image_processing) gem
245
- for Active Storage variants, and deprecate the MiniMagick backend.
246
-
247
- This means that variants are now automatically oriented if the original
248
- image was rotated. Also, in addition to the existing ImageMagick
249
- operations, variants can now use `:resize_to_fit`, `:resize_to_fill`, and
250
- other ImageProcessing macros. These are now recommended over raw `:resize`,
251
- as they also sharpen the thumbnail after resizing.
252
-
253
- The ImageProcessing gem also comes with a backend implemented on
254
- [libvips](http://jcupitt.github.io/libvips/), an alternative to
255
- ImageMagick which has significantly better performance than
256
- ImageMagick in most cases, both in terms of speed and memory usage. In
257
- Active Storage it's now possible to switch to the libvips backend by
258
- changing `Rails.application.config.active_storage.variant_processor` to
259
- `:vips`.
260
-
261
- *Janko Marohnić*
262
-
263
- * Rails 6 requires Ruby 2.5.0 or newer.
264
-
265
- *Jeremy Daer*, *Kasper Timm Hansen*
266
-
267
-
268
- Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activestorage/CHANGELOG.md) for previous changes.