@rails/activestorage 6.0.3 → 6.0.4-4

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 -231
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",
3
+ "version": "6.0.4-4",
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,231 +0,0 @@
1
- ## Rails 6.0.3 (May 06, 2020) ##
2
-
3
- * No changes.
4
-
5
-
6
- ## Rails 6.0.2.2 (March 19, 2020) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 6.0.2.1 (December 18, 2019) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 6.0.2 (December 13, 2019) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 6.0.1 (November 5, 2019) ##
22
-
23
- * `ActiveStorage::AnalyzeJob`s are discarded on `ActiveRecord::RecordNotFound` errors.
24
-
25
- *George Claghorn*
26
-
27
- * Blobs are recorded in the database before being uploaded to the service.
28
- This fixes that generated blob keys could silently collide, leading to
29
- data loss.
30
-
31
- *Julik Tarkhanov*
32
-
33
-
34
- ## Rails 6.0.0 (August 16, 2019) ##
35
-
36
- * No changes.
37
-
38
-
39
- ## Rails 6.0.0.rc2 (July 22, 2019) ##
40
-
41
- * No changes.
42
-
43
-
44
- ## Rails 6.0.0.rc1 (April 24, 2019) ##
45
-
46
- * Don't raise when analyzing an image whose type is unsupported by ImageMagick.
47
-
48
- Fixes #36065.
49
-
50
- *Guilherme Mansur*
51
-
52
- * Permit generating variants of BMP images.
53
-
54
- *Younes Serraj*
55
-
56
-
57
- ## Rails 6.0.0.beta3 (March 11, 2019) ##
58
-
59
- * No changes.
60
-
61
-
62
- ## Rails 6.0.0.beta2 (February 25, 2019) ##
63
-
64
- * No changes.
65
-
66
-
67
- ## Rails 6.0.0.beta1 (January 18, 2019) ##
68
-
69
- * [Rename npm package](https://github.com/rails/rails/pull/34905) from
70
- [`activestorage`](https://www.npmjs.com/package/activestorage) to
71
- [`@rails/activestorage`](https://www.npmjs.com/package/@rails/activestorage).
72
-
73
- *Javan Makhmali*
74
-
75
- * Replace `config.active_storage.queue` with two options that indicate which
76
- queues analysis and purge jobs should use, respectively:
77
-
78
- * `config.active_storage.queues.analysis`
79
- * `config.active_storage.queues.purge`
80
-
81
- `config.active_storage.queue` is preferred over the new options when it's
82
- set, but it is deprecated and will be removed in Rails 6.1.
83
-
84
- *George Claghorn*
85
-
86
- * Permit generating variants of TIFF images.
87
-
88
- *Luciano Sousa*
89
-
90
- * Use base36 (all lowercase) for all new Blob keys to prevent
91
- collisions and undefined behavior with case-insensitive filesystems and
92
- database indices.
93
-
94
- *Julik Tarkhanov*
95
-
96
- * It doesn’t include an `X-CSRF-Token` header if a meta tag is not found on
97
- the page. It previously included one with a value of `undefined`.
98
-
99
- *Cameron Bothner*
100
-
101
- * Fix `ArgumentError` when uploading to amazon s3
102
-
103
- *Hiroki Sanpei*
104
-
105
- * Add progressive JPG to default list of variable content types
106
-
107
- *Maurice Kühlborn*
108
-
109
- * Add `ActiveStorage.routes_prefix` for configuring generated routes.
110
-
111
- *Chris Bisnett*
112
-
113
- * `ActiveStorage::Service::AzureStorageService` only handles specifically
114
- relevant types of `Azure::Core::Http::HTTPError`. It previously obscured
115
- other types of `HTTPError`, which is the azure-storage gem’s catch-all
116
- exception class.
117
-
118
- *Cameron Bothner*
119
-
120
- * `ActiveStorage::DiskController#show` generates a 404 Not Found response when
121
- the requested file is missing from the disk service. It previously raised
122
- `Errno::ENOENT`.
123
-
124
- *Cameron Bothner*
125
-
126
- * `ActiveStorage::Blob#download` and `ActiveStorage::Blob#open` raise
127
- `ActiveStorage::FileNotFoundError` when the corresponding file is missing
128
- from the storage service. Services translate service-specific missing object
129
- exceptions (e.g. `Google::Cloud::NotFoundError` for the GCS service and
130
- `Errno::ENOENT` for the disk service) into
131
- `ActiveStorage::FileNotFoundError`.
132
-
133
- *Cameron Bothner*
134
-
135
- * Added the `ActiveStorage::SetCurrent` concern for custom Active Storage
136
- controllers that can't inherit from `ActiveStorage::BaseController`.
137
-
138
- *George Claghorn*
139
-
140
- * Active Storage error classes like `ActiveStorage::IntegrityError` and
141
- `ActiveStorage::UnrepresentableError` now inherit from `ActiveStorage::Error`
142
- instead of `StandardError`. This permits rescuing `ActiveStorage::Error` to
143
- handle all Active Storage errors.
144
-
145
- *Andrei Makarov*, *George Claghorn*
146
-
147
- * Uploaded files assigned to a record are persisted to storage when the record
148
- is saved instead of immediately.
149
-
150
- In Rails 5.2, the following causes an uploaded file in `params[:avatar]` to
151
- be stored:
152
-
153
- ```ruby
154
- @user.avatar = params[:avatar]
155
- ```
156
-
157
- In Rails 6, the uploaded file is stored when `@user` is successfully saved.
158
-
159
- *George Claghorn*
160
-
161
- * Add the ability to reflect on defined attachments using the existing
162
- ActiveRecord reflection mechanism.
163
-
164
- *Kevin Deisz*
165
-
166
- * Variant arguments of `false` or `nil` will no longer be passed to the
167
- processor. For example, the following will not have the monochrome
168
- variation applied:
169
-
170
- ```ruby
171
- avatar.variant(monochrome: false)
172
- ```
173
-
174
- *Jacob Smith*
175
-
176
- * Generated attachment getter and setter methods are created
177
- within the model's `GeneratedAssociationMethods` module to
178
- allow overriding and composition using `super`.
179
-
180
- *Josh Susser*, *Jamon Douglas*
181
-
182
- * Add `ActiveStorage::Blob#open`, which downloads a blob to a tempfile on disk
183
- and yields the tempfile. Deprecate `ActiveStorage::Downloading`.
184
-
185
- *David Robertson*, *George Claghorn*
186
-
187
- * Pass in `identify: false` as an argument when providing a `content_type` for
188
- `ActiveStorage::Attached::{One,Many}#attach` to bypass automatic content
189
- type inference. For example:
190
-
191
- ```ruby
192
- @message.image.attach(
193
- io: File.open('/path/to/file'),
194
- filename: 'file.pdf',
195
- content_type: 'application/pdf',
196
- identify: false
197
- )
198
- ```
199
-
200
- *Ryan Davidson*
201
-
202
- * The Google Cloud Storage service properly supports streaming downloads.
203
- It now requires version 1.11 or newer of the google-cloud-storage gem.
204
-
205
- *George Claghorn*
206
-
207
- * Use the [ImageProcessing](https://github.com/janko-m/image_processing) gem
208
- for Active Storage variants, and deprecate the MiniMagick backend.
209
-
210
- This means that variants are now automatically oriented if the original
211
- image was rotated. Also, in addition to the existing ImageMagick
212
- operations, variants can now use `:resize_to_fit`, `:resize_to_fill`, and
213
- other ImageProcessing macros. These are now recommended over raw `:resize`,
214
- as they also sharpen the thumbnail after resizing.
215
-
216
- The ImageProcessing gem also comes with a backend implemented on
217
- [libvips](http://jcupitt.github.io/libvips/), an alternative to
218
- ImageMagick which has significantly better performance than
219
- ImageMagick in most cases, both in terms of speed and memory usage. In
220
- Active Storage it's now possible to switch to the libvips backend by
221
- changing `Rails.application.config.active_storage.variant_processor` to
222
- `:vips`.
223
-
224
- *Janko Marohnić*
225
-
226
- * Rails 6 requires Ruby 2.5.0 or newer.
227
-
228
- *Jeremy Daer*, *Kasper Timm Hansen*
229
-
230
-
231
- Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activestorage/CHANGELOG.md) for previous changes.