activestorage 6.0.0.rc1 → 6.0.0.rc2
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.
Potentially problematic release.
This version of activestorage might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/active_storage.rb +13 -5
- data/lib/active_storage/attached/model.rb +12 -5
- data/lib/active_storage/engine.rb +2 -0
- data/lib/active_storage/gem_version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af49cf1a74d49cb0cb8a875f1d4686133abecb3695d3fcca94146c74fab99ecf
|
4
|
+
data.tar.gz: 97dc69ed43e2265302721f09c5c551d991c674a8ee09a414a1bbfcfb2314cd9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b9d898d2c468a84e0f64edf12a2ba16d8bcc7f6676cbceb0643e32d3145f72f26b4be7cbe2f03691cf9b0de66b55c9ad0754e5210e59393a6ccf1f64e783817
|
7
|
+
data.tar.gz: e8c5a734a377b9bc70c92d3939de87c28ef06f869738992a8ef70ab39ae3d1686218a36516a3eeabe1f790dd58e3886052a0ccb557e0e3af6d7deb6ec5aa6fbb
|
data/CHANGELOG.md
CHANGED
data/lib/active_storage.rb
CHANGED
@@ -43,18 +43,26 @@ module ActiveStorage
|
|
43
43
|
|
44
44
|
mattr_accessor :logger
|
45
45
|
mattr_accessor :verifier
|
46
|
+
mattr_accessor :variant_processor, default: :mini_magick
|
47
|
+
|
46
48
|
mattr_accessor :queues, default: {}
|
49
|
+
|
47
50
|
mattr_accessor :previewers, default: []
|
48
|
-
mattr_accessor :analyzers,
|
49
|
-
|
51
|
+
mattr_accessor :analyzers, default: []
|
52
|
+
|
50
53
|
mattr_accessor :paths, default: {}
|
51
|
-
|
54
|
+
|
55
|
+
mattr_accessor :variable_content_types, default: []
|
56
|
+
mattr_accessor :binary_content_type, default: "application/octet-stream"
|
52
57
|
mattr_accessor :content_types_to_serve_as_binary, default: []
|
53
|
-
mattr_accessor :content_types_allowed_inline,
|
54
|
-
|
58
|
+
mattr_accessor :content_types_allowed_inline, default: []
|
59
|
+
|
55
60
|
mattr_accessor :service_urls_expire_in, default: 5.minutes
|
61
|
+
|
56
62
|
mattr_accessor :routes_prefix, default: "/rails/active_storage"
|
57
63
|
|
64
|
+
mattr_accessor :replace_on_assign_to_many, default: false
|
65
|
+
|
58
66
|
module Transformers
|
59
67
|
extend ActiveSupport::Autoload
|
60
68
|
|
@@ -93,12 +93,19 @@ module ActiveStorage
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def #{name}=(attachables)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
96
|
+
if ActiveStorage.replace_on_assign_to_many
|
97
|
+
attachment_changes["#{name}"] =
|
98
|
+
if attachables.nil? || Array(attachables).none?
|
99
|
+
ActiveStorage::Attached::Changes::DeleteMany.new("#{name}", self)
|
100
|
+
else
|
101
|
+
ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, attachables)
|
102
|
+
end
|
103
|
+
else
|
104
|
+
if !attachables.nil? || Array(attachables).any?
|
105
|
+
attachment_changes["#{name}"] =
|
106
|
+
ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, #{name}.blobs + attachables)
|
101
107
|
end
|
108
|
+
end
|
102
109
|
end
|
103
110
|
CODE
|
104
111
|
|
@@ -79,6 +79,8 @@ module ActiveStorage
|
|
79
79
|
ActiveStorage.service_urls_expire_in = app.config.active_storage.service_urls_expire_in || 5.minutes
|
80
80
|
ActiveStorage.content_types_allowed_inline = app.config.active_storage.content_types_allowed_inline || []
|
81
81
|
ActiveStorage.binary_content_type = app.config.active_storage.binary_content_type || "application/octet-stream"
|
82
|
+
|
83
|
+
ActiveStorage.replace_on_assign_to_many = app.config.active_storage.replace_on_assign_to_many || false
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
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.0.0.
|
4
|
+
version: 6.0.0.rc2
|
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: 2019-
|
11
|
+
date: 2019-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.0.0.
|
19
|
+
version: 6.0.0.rc2
|
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.0.0.
|
26
|
+
version: 6.0.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activejob
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 6.0.0.
|
33
|
+
version: 6.0.0.rc2
|
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.0.0.
|
40
|
+
version: 6.0.0.rc2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activerecord
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 6.0.0.
|
47
|
+
version: 6.0.0.rc2
|
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.0.0.
|
54
|
+
version: 6.0.0.rc2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: marcel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,8 +150,8 @@ homepage: https://rubyonrails.org
|
|
150
150
|
licenses:
|
151
151
|
- MIT
|
152
152
|
metadata:
|
153
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.
|
154
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.
|
153
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.rc2/activestorage
|
154
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.rc2/activestorage/CHANGELOG.md
|
155
155
|
post_install_message:
|
156
156
|
rdoc_options: []
|
157
157
|
require_paths:
|