activestorage 6.1.7.10 → 7.0.0.alpha1

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

Potentially problematic release.


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

Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +126 -336
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +25 -11
  5. data/app/assets/javascripts/activestorage.esm.js +844 -0
  6. data/app/assets/javascripts/activestorage.js +257 -376
  7. data/app/controllers/active_storage/base_controller.rb +1 -10
  8. data/app/controllers/active_storage/blobs/proxy_controller.rb +14 -5
  9. data/app/controllers/active_storage/blobs/redirect_controller.rb +6 -4
  10. data/app/controllers/active_storage/representations/base_controller.rb +5 -1
  11. data/app/controllers/active_storage/representations/proxy_controller.rb +6 -5
  12. data/app/controllers/active_storage/representations/redirect_controller.rb +6 -4
  13. data/app/controllers/concerns/active_storage/set_blob.rb +6 -2
  14. data/app/controllers/concerns/active_storage/set_current.rb +3 -3
  15. data/app/controllers/concerns/active_storage/streaming.rb +65 -0
  16. data/app/javascript/activestorage/ujs.js +1 -1
  17. data/app/models/active_storage/attachment.rb +35 -2
  18. data/app/models/active_storage/blob/representable.rb +7 -5
  19. data/app/models/active_storage/blob.rb +26 -27
  20. data/app/models/active_storage/current.rb +12 -2
  21. data/app/models/active_storage/preview.rb +6 -4
  22. data/app/models/active_storage/record.rb +1 -1
  23. data/app/models/active_storage/variant.rb +6 -9
  24. data/app/models/active_storage/variant_record.rb +2 -0
  25. data/app/models/active_storage/variant_with_record.rb +9 -5
  26. data/app/models/active_storage/variation.rb +3 -3
  27. data/config/routes.rb +10 -10
  28. data/db/migrate/20170806125915_create_active_storage_tables.rb +11 -2
  29. data/db/update_migrate/20190112182829_add_service_name_to_active_storage_blobs.rb +0 -4
  30. data/db/update_migrate/20191206030411_create_active_storage_variant_records.rb +1 -3
  31. data/lib/active_storage/analyzer/audio_analyzer.rb +65 -0
  32. data/lib/active_storage/analyzer/image_analyzer/image_magick.rb +39 -0
  33. data/lib/active_storage/analyzer/image_analyzer/vips.rb +49 -0
  34. data/lib/active_storage/analyzer/image_analyzer.rb +2 -30
  35. data/lib/active_storage/analyzer/video_analyzer.rb +26 -11
  36. data/lib/active_storage/analyzer.rb +8 -4
  37. data/lib/active_storage/attached/changes/create_many.rb +7 -3
  38. data/lib/active_storage/attached/changes/create_one.rb +1 -1
  39. data/lib/active_storage/attached/changes/create_one_of_many.rb +1 -1
  40. data/lib/active_storage/attached/changes/delete_many.rb +1 -1
  41. data/lib/active_storage/attached/changes/delete_one.rb +1 -1
  42. data/lib/active_storage/attached/changes/detach_many.rb +18 -0
  43. data/lib/active_storage/attached/changes/detach_one.rb +24 -0
  44. data/lib/active_storage/attached/changes/purge_many.rb +27 -0
  45. data/lib/active_storage/attached/changes/purge_one.rb +27 -0
  46. data/lib/active_storage/attached/changes.rb +7 -1
  47. data/lib/active_storage/attached/many.rb +27 -15
  48. data/lib/active_storage/attached/model.rb +31 -5
  49. data/lib/active_storage/attached/one.rb +32 -27
  50. data/lib/active_storage/downloader.rb +2 -2
  51. data/lib/active_storage/engine.rb +28 -16
  52. data/lib/active_storage/fixture_set.rb +76 -0
  53. data/lib/active_storage/gem_version.rb +4 -4
  54. data/lib/active_storage/previewer/video_previewer.rb +0 -2
  55. data/lib/active_storage/previewer.rb +4 -4
  56. data/lib/active_storage/reflection.rb +12 -2
  57. data/lib/active_storage/service/azure_storage_service.rb +1 -1
  58. data/lib/active_storage/service/configurator.rb +1 -1
  59. data/lib/active_storage/service/disk_service.rb +13 -18
  60. data/lib/active_storage/service/gcs_service.rb +91 -7
  61. data/lib/active_storage/service/mirror_service.rb +1 -1
  62. data/lib/active_storage/service/registry.rb +1 -1
  63. data/lib/active_storage/service/s3_service.rb +4 -4
  64. data/lib/active_storage/service.rb +3 -3
  65. data/lib/active_storage/transformers/image_processing_transformer.rb +1 -66
  66. data/lib/active_storage/transformers/transformer.rb +1 -1
  67. data/lib/active_storage.rb +3 -292
  68. metadata +29 -22
  69. data/app/controllers/concerns/active_storage/disable_session.rb +0 -12
  70. data/app/controllers/concerns/active_storage/set_headers.rb +0 -12
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activestorage
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.7.10
4
+ version: 7.0.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2021-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,70 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.1.7.10
19
+ version: 7.0.0.alpha1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 6.1.7.10
26
+ version: 7.0.0.alpha1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 6.1.7.10
33
+ version: 7.0.0.alpha1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 6.1.7.10
40
+ version: 7.0.0.alpha1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activejob
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 6.1.7.10
47
+ version: 7.0.0.alpha1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 6.1.7.10
54
+ version: 7.0.0.alpha1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activerecord
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 6.1.7.10
61
+ version: 7.0.0.alpha1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 6.1.7.10
68
+ version: 7.0.0.alpha1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: marcel
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.0'
75
+ version: 1.0.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.0'
82
+ version: 1.0.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mini_mime
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +103,7 @@ files:
103
103
  - CHANGELOG.md
104
104
  - MIT-LICENSE
105
105
  - README.md
106
+ - app/assets/javascripts/activestorage.esm.js
106
107
  - app/assets/javascripts/activestorage.js
107
108
  - app/controllers/active_storage/base_controller.rb
108
109
  - app/controllers/active_storage/blobs/proxy_controller.rb
@@ -112,11 +113,10 @@ files:
112
113
  - app/controllers/active_storage/representations/base_controller.rb
113
114
  - app/controllers/active_storage/representations/proxy_controller.rb
114
115
  - app/controllers/active_storage/representations/redirect_controller.rb
115
- - app/controllers/concerns/active_storage/disable_session.rb
116
116
  - app/controllers/concerns/active_storage/file_server.rb
117
117
  - app/controllers/concerns/active_storage/set_blob.rb
118
118
  - app/controllers/concerns/active_storage/set_current.rb
119
- - app/controllers/concerns/active_storage/set_headers.rb
119
+ - app/controllers/concerns/active_storage/streaming.rb
120
120
  - app/javascript/activestorage/blob_record.js
121
121
  - app/javascript/activestorage/blob_upload.js
122
122
  - app/javascript/activestorage/direct_upload.js
@@ -149,7 +149,10 @@ files:
149
149
  - db/update_migrate/20191206030411_create_active_storage_variant_records.rb
150
150
  - lib/active_storage.rb
151
151
  - lib/active_storage/analyzer.rb
152
+ - lib/active_storage/analyzer/audio_analyzer.rb
152
153
  - lib/active_storage/analyzer/image_analyzer.rb
154
+ - lib/active_storage/analyzer/image_analyzer/image_magick.rb
155
+ - lib/active_storage/analyzer/image_analyzer/vips.rb
153
156
  - lib/active_storage/analyzer/null_analyzer.rb
154
157
  - lib/active_storage/analyzer/video_analyzer.rb
155
158
  - lib/active_storage/attached.rb
@@ -159,12 +162,17 @@ files:
159
162
  - lib/active_storage/attached/changes/create_one_of_many.rb
160
163
  - lib/active_storage/attached/changes/delete_many.rb
161
164
  - lib/active_storage/attached/changes/delete_one.rb
165
+ - lib/active_storage/attached/changes/detach_many.rb
166
+ - lib/active_storage/attached/changes/detach_one.rb
167
+ - lib/active_storage/attached/changes/purge_many.rb
168
+ - lib/active_storage/attached/changes/purge_one.rb
162
169
  - lib/active_storage/attached/many.rb
163
170
  - lib/active_storage/attached/model.rb
164
171
  - lib/active_storage/attached/one.rb
165
172
  - lib/active_storage/downloader.rb
166
173
  - lib/active_storage/engine.rb
167
174
  - lib/active_storage/errors.rb
175
+ - lib/active_storage/fixture_set.rb
168
176
  - lib/active_storage/gem_version.rb
169
177
  - lib/active_storage/log_subscriber.rb
170
178
  - lib/active_storage/previewer.rb
@@ -189,11 +197,10 @@ licenses:
189
197
  - MIT
190
198
  metadata:
191
199
  bug_tracker_uri: https://github.com/rails/rails/issues
192
- changelog_uri: https://github.com/rails/rails/blob/v6.1.7.10/activestorage/CHANGELOG.md
193
- documentation_uri: https://api.rubyonrails.org/v6.1.7.10/
200
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.0.alpha1/activestorage/CHANGELOG.md
201
+ documentation_uri: https://api.rubyonrails.org/v7.0.0.alpha1/
194
202
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
195
- source_code_uri: https://github.com/rails/rails/tree/v6.1.7.10/activestorage
196
- rubygems_mfa_required: 'true'
203
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.0.alpha1/activestorage
197
204
  post_install_message:
198
205
  rdoc_options: []
199
206
  require_paths:
@@ -202,14 +209,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
209
  requirements:
203
210
  - - ">="
204
211
  - !ruby/object:Gem::Version
205
- version: 2.5.0
212
+ version: 2.7.0
206
213
  required_rubygems_version: !ruby/object:Gem::Requirement
207
214
  requirements:
208
- - - ">="
215
+ - - ">"
209
216
  - !ruby/object:Gem::Version
210
- version: '0'
217
+ version: 1.3.1
211
218
  requirements: []
212
- rubygems_version: 3.5.16
219
+ rubygems_version: 3.1.6
213
220
  signing_key:
214
221
  specification_version: 4
215
222
  summary: Local and cloud file storage framework.
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This concern disables the session in order to allow caching by default in some CDNs as CloudFlare.
4
- module ActiveStorage::DisableSession
5
- extend ActiveSupport::Concern
6
-
7
- included do
8
- before_action do
9
- request.session_options[:skip] = true
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ActiveStorage::SetHeaders #:nodoc:
4
- extend ActiveSupport::Concern
5
-
6
- private
7
- def set_content_headers_from(blob)
8
- response.headers["Content-Type"] = blob.content_type_for_serving
9
- response.headers["Content-Disposition"] = ActionDispatch::Http::ContentDisposition.format \
10
- disposition: blob.forced_disposition_for_serving || params[:disposition] || "inline", filename: blob.filename.sanitized
11
- end
12
- end