activestorage 6.0.0.rc1 → 6.0.0.rc2

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8580843508ea2f503d6033f26c93d245915f3bc909466345df8720cc66f5f9b
4
- data.tar.gz: 25f095c896e240cba0fa842b402a28d4520b13eb53efbb9bb205d29c05a18aa8
3
+ metadata.gz: af49cf1a74d49cb0cb8a875f1d4686133abecb3695d3fcca94146c74fab99ecf
4
+ data.tar.gz: 97dc69ed43e2265302721f09c5c551d991c674a8ee09a414a1bbfcfb2314cd9d
5
5
  SHA512:
6
- metadata.gz: 6937e460ca8cd6ebd3e42543e5afb13bc96f7980e3026ebcd59dac443e955840e28652ffb4a8a68f022df63a33ad3d68a071a012eb9bedf2f3c99dba10c793a9
7
- data.tar.gz: 0aa39714af36c775897f663ed28dde3113e28cca23ec4e579d2004d384520657ea49c6c32f67bc3a878450af6edea623a475df984782f165cfd099d9a093554c
6
+ metadata.gz: 5b9d898d2c468a84e0f64edf12a2ba16d8bcc7f6676cbceb0643e32d3145f72f26b4be7cbe2f03691cf9b0de66b55c9ad0754e5210e59393a6ccf1f64e783817
7
+ data.tar.gz: e8c5a734a377b9bc70c92d3939de87c28ef06f869738992a8ef70ab39ae3d1686218a36516a3eeabe1f790dd58e3886052a0ccb557e0e3af6d7deb6ec5aa6fbb
@@ -1,3 +1,8 @@
1
+ ## Rails 6.0.0.rc2 (July 22, 2019) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 6.0.0.rc1 (April 24, 2019) ##
2
7
 
3
8
  * Don't raise when analyzing an image whose type is unsupported by ImageMagick.
@@ -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, default: []
49
- mattr_accessor :variant_processor, default: :mini_magick
51
+ mattr_accessor :analyzers, default: []
52
+
50
53
  mattr_accessor :paths, default: {}
51
- mattr_accessor :variable_content_types, default: []
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, default: []
54
- mattr_accessor :binary_content_type, default: "application/octet-stream"
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
- attachment_changes["#{name}"] =
97
- if attachables.nil? || Array(attachables).none?
98
- ActiveStorage::Attached::Changes::DeleteMany.new("#{name}", self)
99
- else
100
- ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, attachables)
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
 
@@ -10,7 +10,7 @@ module ActiveStorage
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
12
  TINY = 0
13
- PRE = "rc1"
13
+ PRE = "rc2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
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.rc1
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-04-24 00:00:00.000000000 Z
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.rc1
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.rc1
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.rc1
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.rc1
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.rc1
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.rc1
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.rc1/activestorage
154
- changelog_uri: https://github.com/rails/rails/blob/v6.0.0.rc1/activestorage/CHANGELOG.md
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: