deferring 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +5 -0
- data/gemfiles/rails_50.gemfile.lock +1 -1
- data/gemfiles/rails_51.gemfile.lock +1 -1
- data/gemfiles/rails_52.gemfile.lock +1 -1
- data/gemfiles/rails_60.gemfile.lock +1 -1
- data/gemfiles/rails_61.gemfile.lock +1 -1
- data/gemfiles/rails_70.gemfile +8 -0
- data/gemfiles/rails_70.gemfile.lock +63 -0
- data/lib/deferring/version.rb +1 -1
- data/lib/deferring.rb +7 -7
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81e75a7942010a6fe9e3e7696801b286d919877a1b9b9fe2e60dd988b9a1a57e
|
4
|
+
data.tar.gz: 0c312c277072b7831e94933bb5e496f89acbc8abad032537eb871ac52be1d2fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 730d5fa707a75a44c6eb6477a918beb0d83333899ed977f274f4ed8c745bb5d8b0fed7193b4086c3f68e0c596e976d2744c6fa5ba7f5d9aedc1646f1d92da196
|
7
|
+
data.tar.gz: 509f827d37021a1bda15cdb9bdd1fc363a5261351ef6af1a1ba1644063df5266aec620fe874187cc9e826a048702d04750ab0366ea9049cb499f4d3e31ab2467
|
data/Appraisals
CHANGED
@@ -0,0 +1,63 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
deferring (0.8.2)
|
5
|
+
activerecord (>= 4.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (7.0.8)
|
11
|
+
activesupport (= 7.0.8)
|
12
|
+
activerecord (7.0.8)
|
13
|
+
activemodel (= 7.0.8)
|
14
|
+
activesupport (= 7.0.8)
|
15
|
+
activesupport (7.0.8)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
20
|
+
appraisal (2.5.0)
|
21
|
+
bundler
|
22
|
+
rake
|
23
|
+
thor (>= 0.14.0)
|
24
|
+
concurrent-ruby (1.2.3)
|
25
|
+
diff-lcs (1.5.1)
|
26
|
+
i18n (1.14.1)
|
27
|
+
concurrent-ruby (~> 1.0)
|
28
|
+
mini_portile2 (2.8.5)
|
29
|
+
minitest (5.22.2)
|
30
|
+
rake (13.1.0)
|
31
|
+
rspec (3.13.0)
|
32
|
+
rspec-core (~> 3.13.0)
|
33
|
+
rspec-expectations (~> 3.13.0)
|
34
|
+
rspec-mocks (~> 3.13.0)
|
35
|
+
rspec-core (3.13.0)
|
36
|
+
rspec-support (~> 3.13.0)
|
37
|
+
rspec-expectations (3.13.0)
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
+
rspec-support (~> 3.13.0)
|
40
|
+
rspec-mocks (3.13.0)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.13.0)
|
43
|
+
rspec-support (3.13.0)
|
44
|
+
sqlite3 (1.7.2)
|
45
|
+
mini_portile2 (~> 2.8.0)
|
46
|
+
thor (1.3.0)
|
47
|
+
tzinfo (2.0.6)
|
48
|
+
concurrent-ruby (~> 1.0)
|
49
|
+
|
50
|
+
PLATFORMS
|
51
|
+
x86_64-linux
|
52
|
+
|
53
|
+
DEPENDENCIES
|
54
|
+
activerecord (= 7.0.8)
|
55
|
+
appraisal
|
56
|
+
bundler
|
57
|
+
deferring!
|
58
|
+
rake
|
59
|
+
rspec
|
60
|
+
sqlite3
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
2.2.32
|
data/lib/deferring/version.rb
CHANGED
data/lib/deferring.rb
CHANGED
@@ -238,7 +238,13 @@ module Deferring
|
|
238
238
|
unless record.valid?
|
239
239
|
valid = false
|
240
240
|
if autosave
|
241
|
-
if ActiveRecord
|
241
|
+
if ActiveRecord.version.release < Gem::Version.new('6.1.0')
|
242
|
+
record.errors.each do |attribute, message|
|
243
|
+
attribute = "#{association_name}.#{attribute}"
|
244
|
+
errors[attribute] << message
|
245
|
+
errors[attribute].uniq!
|
246
|
+
end
|
247
|
+
else # >= Rails 6.1
|
242
248
|
record.errors.group_by_attribute.each do |attribute, errors|
|
243
249
|
errors.each do |error|
|
244
250
|
self.errors.import(
|
@@ -247,12 +253,6 @@ module Deferring
|
|
247
253
|
)
|
248
254
|
end
|
249
255
|
end
|
250
|
-
else
|
251
|
-
record.errors.each do |attribute, message|
|
252
|
-
attribute = "#{association_name}.#{attribute}"
|
253
|
-
errors[attribute] << message
|
254
|
-
errors[attribute].uniq!
|
255
|
-
end
|
256
256
|
end
|
257
257
|
else
|
258
258
|
errors.add(association_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deferring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Roestenburg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -109,6 +109,8 @@ files:
|
|
109
109
|
- gemfiles/rails_60.gemfile.lock
|
110
110
|
- gemfiles/rails_61.gemfile
|
111
111
|
- gemfiles/rails_61.gemfile.lock
|
112
|
+
- gemfiles/rails_70.gemfile
|
113
|
+
- gemfiles/rails_70.gemfile.lock
|
112
114
|
- lib/deferring.rb
|
113
115
|
- lib/deferring/deferred_association.rb
|
114
116
|
- lib/deferring/deferred_callback_listener.rb
|