deferring 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -10
- data/Appraisals +10 -5
- data/deferring.gemspec +0 -1
- data/gemfiles/rails_42.gemfile +2 -1
- data/gemfiles/rails_42.gemfile.lock +27 -27
- data/gemfiles/rails_50.gemfile +2 -1
- data/gemfiles/rails_50.gemfile.lock +27 -27
- data/gemfiles/rails_51.gemfile +2 -1
- data/gemfiles/rails_51.gemfile.lock +27 -27
- data/gemfiles/rails_52.gemfile +2 -1
- data/gemfiles/rails_52.gemfile.lock +27 -27
- data/gemfiles/rails_60.gemfile +2 -1
- data/gemfiles/rails_60.gemfile.lock +29 -29
- data/lib/deferring/deferred_association.rb +2 -2
- data/lib/deferring/version.rb +1 -1
- data/spec/lib/deferring_nested_attributes_spec.rb +18 -0
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b06d2014bec77285df7d494e04b1aceae86e4ce9b147f0916002db02e1e79cba
|
4
|
+
data.tar.gz: d89af52998b5d67de9f29cf971a5f68f1ce9339e340f3170c9c0cbd6c4df1713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fd88c4d8a0c1be57f6b4ac674faf39bc1a152117a86d719aa6e2727cd93b916d547404e66c5e67f636aeb209918a0dcbcf78db256704ff3e45c0f9951c592ca
|
7
|
+
data.tar.gz: 15ac8fa0e41d23af97a1ac35ac0e29c429e1287bc83fa6cf7148437070a57a6bd8a36fa49910bc5d8ee4288d2ca20c091ac7289b63b210e2c13d4db4997453a8
|
data/.travis.yml
CHANGED
@@ -5,6 +5,7 @@ rvm:
|
|
5
5
|
- 2.4.6
|
6
6
|
- 2.5.5
|
7
7
|
- 2.6.3
|
8
|
+
- 2.7.1
|
8
9
|
|
9
10
|
gemfile:
|
10
11
|
- gemfiles/rails_42.gemfile
|
@@ -23,13 +24,3 @@ matrix:
|
|
23
24
|
gemfile: gemfiles/rails_60.gemfile
|
24
25
|
- rvm: 2.4.6
|
25
26
|
gemfile: gemfiles/rails_60.gemfile
|
26
|
-
- rvm: 2.5.5
|
27
|
-
gemfile: gemfiles/rails_42.gemfile
|
28
|
-
- rvm: 2.5.5
|
29
|
-
gemfile: gemfiles/rails_50.gemfile
|
30
|
-
- rvm: 2.5.5
|
31
|
-
gemfile: gemfiles/rails_51.gemfile
|
32
|
-
- rvm: 2.5.5
|
33
|
-
gemfile: gemfiles/rails_52.gemfile
|
34
|
-
- rvm: 2.5.5
|
35
|
-
gemfile: gemfiles/rails_60.gemfile
|
data/Appraisals
CHANGED
@@ -1,19 +1,24 @@
|
|
1
1
|
appraise 'rails-42' do
|
2
|
-
gem 'activerecord', '4.2.
|
2
|
+
gem 'activerecord', '4.2.11.3'
|
3
|
+
gem 'sqlite3', '~> 1.3.6'
|
3
4
|
end
|
4
5
|
|
5
6
|
appraise 'rails-50' do
|
6
|
-
gem 'activerecord', '5.0.7'
|
7
|
+
gem 'activerecord', '5.0.7.2'
|
8
|
+
gem 'sqlite3', '~> 1.3.6'
|
7
9
|
end
|
8
10
|
|
9
11
|
appraise 'rails-51' do
|
10
|
-
gem 'activerecord', '5.1.
|
12
|
+
gem 'activerecord', '5.1.7'
|
13
|
+
gem 'sqlite3'
|
11
14
|
end
|
12
15
|
|
13
16
|
appraise 'rails-52' do
|
14
|
-
gem 'activerecord', '5.2.
|
17
|
+
gem 'activerecord', '5.2.4.3'
|
18
|
+
gem 'sqlite3'
|
15
19
|
end
|
16
20
|
|
17
21
|
appraise 'rails-60' do
|
18
|
-
gem 'activerecord', '6.0.
|
22
|
+
gem 'activerecord', '6.0.3.2'
|
23
|
+
gem 'sqlite3'
|
19
24
|
end
|
data/deferring.gemspec
CHANGED
@@ -25,6 +25,5 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
26
26
|
spec.add_development_dependency 'rake'
|
27
27
|
spec.add_development_dependency 'rspec'
|
28
|
-
spec.add_development_dependency 'sqlite3'
|
29
28
|
spec.add_development_dependency 'appraisal'
|
30
29
|
end
|
data/gemfiles/rails_42.gemfile
CHANGED
@@ -7,60 +7,60 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (4.2.
|
11
|
-
activesupport (= 4.2.
|
10
|
+
activemodel (4.2.11.3)
|
11
|
+
activesupport (= 4.2.11.3)
|
12
12
|
builder (~> 3.1)
|
13
|
-
activerecord (4.2.
|
14
|
-
activemodel (= 4.2.
|
15
|
-
activesupport (= 4.2.
|
13
|
+
activerecord (4.2.11.3)
|
14
|
+
activemodel (= 4.2.11.3)
|
15
|
+
activesupport (= 4.2.11.3)
|
16
16
|
arel (~> 6.0)
|
17
|
-
activesupport (4.2.
|
17
|
+
activesupport (4.2.11.3)
|
18
18
|
i18n (~> 0.7)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
thread_safe (~> 0.3, >= 0.3.4)
|
21
21
|
tzinfo (~> 1.1)
|
22
|
-
appraisal (2.
|
22
|
+
appraisal (2.3.0)
|
23
23
|
bundler
|
24
24
|
rake
|
25
25
|
thor (>= 0.14.0)
|
26
26
|
arel (6.0.4)
|
27
|
-
builder (3.2.
|
28
|
-
concurrent-ruby (1.
|
29
|
-
diff-lcs (1.
|
27
|
+
builder (3.2.4)
|
28
|
+
concurrent-ruby (1.1.6)
|
29
|
+
diff-lcs (1.4.4)
|
30
30
|
i18n (0.9.5)
|
31
31
|
concurrent-ruby (~> 1.0)
|
32
|
-
minitest (5.
|
33
|
-
rake (
|
34
|
-
rspec (3.
|
35
|
-
rspec-core (~> 3.
|
36
|
-
rspec-expectations (~> 3.
|
37
|
-
rspec-mocks (~> 3.
|
38
|
-
rspec-core (3.
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-expectations (3.
|
32
|
+
minitest (5.14.1)
|
33
|
+
rake (13.0.1)
|
34
|
+
rspec (3.9.0)
|
35
|
+
rspec-core (~> 3.9.0)
|
36
|
+
rspec-expectations (~> 3.9.0)
|
37
|
+
rspec-mocks (~> 3.9.0)
|
38
|
+
rspec-core (3.9.2)
|
39
|
+
rspec-support (~> 3.9.3)
|
40
|
+
rspec-expectations (3.9.2)
|
41
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-mocks (3.
|
42
|
+
rspec-support (~> 3.9.0)
|
43
|
+
rspec-mocks (3.9.1)
|
44
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-support (3.
|
45
|
+
rspec-support (~> 3.9.0)
|
46
|
+
rspec-support (3.9.3)
|
47
47
|
sqlite3 (1.3.13)
|
48
|
-
thor (0.
|
48
|
+
thor (1.0.1)
|
49
49
|
thread_safe (0.3.6)
|
50
|
-
tzinfo (1.2.
|
50
|
+
tzinfo (1.2.7)
|
51
51
|
thread_safe (~> 0.1)
|
52
52
|
|
53
53
|
PLATFORMS
|
54
54
|
ruby
|
55
55
|
|
56
56
|
DEPENDENCIES
|
57
|
-
activerecord (= 4.2.
|
57
|
+
activerecord (= 4.2.11.3)
|
58
58
|
appraisal
|
59
59
|
bundler (~> 1.3)
|
60
60
|
deferring!
|
61
61
|
rake
|
62
62
|
rspec
|
63
|
-
sqlite3
|
63
|
+
sqlite3 (~> 1.3.6)
|
64
64
|
|
65
65
|
BUNDLED WITH
|
66
66
|
1.17.3
|
data/gemfiles/rails_50.gemfile
CHANGED
@@ -7,58 +7,58 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (5.0.7)
|
11
|
-
activesupport (= 5.0.7)
|
12
|
-
activerecord (5.0.7)
|
13
|
-
activemodel (= 5.0.7)
|
14
|
-
activesupport (= 5.0.7)
|
10
|
+
activemodel (5.0.7.2)
|
11
|
+
activesupport (= 5.0.7.2)
|
12
|
+
activerecord (5.0.7.2)
|
13
|
+
activemodel (= 5.0.7.2)
|
14
|
+
activesupport (= 5.0.7.2)
|
15
15
|
arel (~> 7.0)
|
16
|
-
activesupport (5.0.7)
|
16
|
+
activesupport (5.0.7.2)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 0.7, < 2)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
tzinfo (~> 1.1)
|
21
|
-
appraisal (2.
|
21
|
+
appraisal (2.3.0)
|
22
22
|
bundler
|
23
23
|
rake
|
24
24
|
thor (>= 0.14.0)
|
25
25
|
arel (7.1.4)
|
26
|
-
concurrent-ruby (1.
|
27
|
-
diff-lcs (1.
|
28
|
-
i18n (1.
|
26
|
+
concurrent-ruby (1.1.6)
|
27
|
+
diff-lcs (1.4.4)
|
28
|
+
i18n (1.8.3)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
minitest (5.
|
31
|
-
rake (
|
32
|
-
rspec (3.
|
33
|
-
rspec-core (~> 3.
|
34
|
-
rspec-expectations (~> 3.
|
35
|
-
rspec-mocks (~> 3.
|
36
|
-
rspec-core (3.
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-expectations (3.
|
30
|
+
minitest (5.14.1)
|
31
|
+
rake (13.0.1)
|
32
|
+
rspec (3.9.0)
|
33
|
+
rspec-core (~> 3.9.0)
|
34
|
+
rspec-expectations (~> 3.9.0)
|
35
|
+
rspec-mocks (~> 3.9.0)
|
36
|
+
rspec-core (3.9.2)
|
37
|
+
rspec-support (~> 3.9.3)
|
38
|
+
rspec-expectations (3.9.2)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
40
|
+
rspec-support (~> 3.9.0)
|
41
|
+
rspec-mocks (3.9.1)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
43
|
+
rspec-support (~> 3.9.0)
|
44
|
+
rspec-support (3.9.3)
|
45
45
|
sqlite3 (1.3.13)
|
46
|
-
thor (0.
|
46
|
+
thor (1.0.1)
|
47
47
|
thread_safe (0.3.6)
|
48
|
-
tzinfo (1.2.
|
48
|
+
tzinfo (1.2.7)
|
49
49
|
thread_safe (~> 0.1)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
53
53
|
|
54
54
|
DEPENDENCIES
|
55
|
-
activerecord (= 5.0.7)
|
55
|
+
activerecord (= 5.0.7.2)
|
56
56
|
appraisal
|
57
57
|
bundler (~> 1.3)
|
58
58
|
deferring!
|
59
59
|
rake
|
60
60
|
rspec
|
61
|
-
sqlite3
|
61
|
+
sqlite3 (~> 1.3.6)
|
62
62
|
|
63
63
|
BUNDLED WITH
|
64
64
|
1.17.3
|
data/gemfiles/rails_51.gemfile
CHANGED
@@ -7,52 +7,52 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (5.1.
|
11
|
-
activesupport (= 5.1.
|
12
|
-
activerecord (5.1.
|
13
|
-
activemodel (= 5.1.
|
14
|
-
activesupport (= 5.1.
|
10
|
+
activemodel (5.1.7)
|
11
|
+
activesupport (= 5.1.7)
|
12
|
+
activerecord (5.1.7)
|
13
|
+
activemodel (= 5.1.7)
|
14
|
+
activesupport (= 5.1.7)
|
15
15
|
arel (~> 8.0)
|
16
|
-
activesupport (5.1.
|
16
|
+
activesupport (5.1.7)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 0.7, < 2)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
tzinfo (~> 1.1)
|
21
|
-
appraisal (2.
|
21
|
+
appraisal (2.3.0)
|
22
22
|
bundler
|
23
23
|
rake
|
24
24
|
thor (>= 0.14.0)
|
25
25
|
arel (8.0.0)
|
26
|
-
concurrent-ruby (1.
|
27
|
-
diff-lcs (1.
|
28
|
-
i18n (1.
|
26
|
+
concurrent-ruby (1.1.6)
|
27
|
+
diff-lcs (1.4.4)
|
28
|
+
i18n (1.8.3)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
minitest (5.
|
31
|
-
rake (
|
32
|
-
rspec (3.
|
33
|
-
rspec-core (~> 3.
|
34
|
-
rspec-expectations (~> 3.
|
35
|
-
rspec-mocks (~> 3.
|
36
|
-
rspec-core (3.
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-expectations (3.
|
30
|
+
minitest (5.14.1)
|
31
|
+
rake (13.0.1)
|
32
|
+
rspec (3.9.0)
|
33
|
+
rspec-core (~> 3.9.0)
|
34
|
+
rspec-expectations (~> 3.9.0)
|
35
|
+
rspec-mocks (~> 3.9.0)
|
36
|
+
rspec-core (3.9.2)
|
37
|
+
rspec-support (~> 3.9.3)
|
38
|
+
rspec-expectations (3.9.2)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
40
|
+
rspec-support (~> 3.9.0)
|
41
|
+
rspec-mocks (3.9.1)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
45
|
-
sqlite3 (1.
|
46
|
-
thor (0.
|
43
|
+
rspec-support (~> 3.9.0)
|
44
|
+
rspec-support (3.9.3)
|
45
|
+
sqlite3 (1.4.2)
|
46
|
+
thor (1.0.1)
|
47
47
|
thread_safe (0.3.6)
|
48
|
-
tzinfo (1.2.
|
48
|
+
tzinfo (1.2.7)
|
49
49
|
thread_safe (~> 0.1)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
53
53
|
|
54
54
|
DEPENDENCIES
|
55
|
-
activerecord (= 5.1.
|
55
|
+
activerecord (= 5.1.7)
|
56
56
|
appraisal
|
57
57
|
bundler (~> 1.3)
|
58
58
|
deferring!
|
data/gemfiles/rails_52.gemfile
CHANGED
@@ -7,52 +7,52 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (5.2.
|
11
|
-
activesupport (= 5.2.
|
12
|
-
activerecord (5.2.
|
13
|
-
activemodel (= 5.2.
|
14
|
-
activesupport (= 5.2.
|
10
|
+
activemodel (5.2.4.3)
|
11
|
+
activesupport (= 5.2.4.3)
|
12
|
+
activerecord (5.2.4.3)
|
13
|
+
activemodel (= 5.2.4.3)
|
14
|
+
activesupport (= 5.2.4.3)
|
15
15
|
arel (>= 9.0)
|
16
|
-
activesupport (5.2.
|
16
|
+
activesupport (5.2.4.3)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 0.7, < 2)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
tzinfo (~> 1.1)
|
21
|
-
appraisal (2.
|
21
|
+
appraisal (2.3.0)
|
22
22
|
bundler
|
23
23
|
rake
|
24
24
|
thor (>= 0.14.0)
|
25
25
|
arel (9.0.0)
|
26
|
-
concurrent-ruby (1.
|
27
|
-
diff-lcs (1.
|
28
|
-
i18n (1.
|
26
|
+
concurrent-ruby (1.1.6)
|
27
|
+
diff-lcs (1.4.4)
|
28
|
+
i18n (1.8.3)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
minitest (5.
|
31
|
-
rake (
|
32
|
-
rspec (3.
|
33
|
-
rspec-core (~> 3.
|
34
|
-
rspec-expectations (~> 3.
|
35
|
-
rspec-mocks (~> 3.
|
36
|
-
rspec-core (3.
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-expectations (3.
|
30
|
+
minitest (5.14.1)
|
31
|
+
rake (13.0.1)
|
32
|
+
rspec (3.9.0)
|
33
|
+
rspec-core (~> 3.9.0)
|
34
|
+
rspec-expectations (~> 3.9.0)
|
35
|
+
rspec-mocks (~> 3.9.0)
|
36
|
+
rspec-core (3.9.2)
|
37
|
+
rspec-support (~> 3.9.3)
|
38
|
+
rspec-expectations (3.9.2)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
40
|
+
rspec-support (~> 3.9.0)
|
41
|
+
rspec-mocks (3.9.1)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
45
|
-
sqlite3 (1.
|
46
|
-
thor (0.
|
43
|
+
rspec-support (~> 3.9.0)
|
44
|
+
rspec-support (3.9.3)
|
45
|
+
sqlite3 (1.4.2)
|
46
|
+
thor (1.0.1)
|
47
47
|
thread_safe (0.3.6)
|
48
|
-
tzinfo (1.2.
|
48
|
+
tzinfo (1.2.7)
|
49
49
|
thread_safe (~> 0.1)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
53
53
|
|
54
54
|
DEPENDENCIES
|
55
|
-
activerecord (= 5.2.
|
55
|
+
activerecord (= 5.2.4.3)
|
56
56
|
appraisal
|
57
57
|
bundler (~> 1.3)
|
58
58
|
deferring!
|
data/gemfiles/rails_60.gemfile
CHANGED
@@ -7,52 +7,52 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (6.0.
|
11
|
-
activesupport (= 6.0.
|
12
|
-
activerecord (6.0.
|
13
|
-
activemodel (= 6.0.
|
14
|
-
activesupport (= 6.0.
|
15
|
-
activesupport (6.0.
|
10
|
+
activemodel (6.0.3.2)
|
11
|
+
activesupport (= 6.0.3.2)
|
12
|
+
activerecord (6.0.3.2)
|
13
|
+
activemodel (= 6.0.3.2)
|
14
|
+
activesupport (= 6.0.3.2)
|
15
|
+
activesupport (6.0.3.2)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 0.7, < 2)
|
18
18
|
minitest (~> 5.1)
|
19
19
|
tzinfo (~> 1.1)
|
20
|
-
zeitwerk (~> 2.
|
21
|
-
appraisal (2.
|
20
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
21
|
+
appraisal (2.3.0)
|
22
22
|
bundler
|
23
23
|
rake
|
24
24
|
thor (>= 0.14.0)
|
25
|
-
concurrent-ruby (1.1.
|
26
|
-
diff-lcs (1.
|
27
|
-
i18n (1.
|
25
|
+
concurrent-ruby (1.1.6)
|
26
|
+
diff-lcs (1.4.4)
|
27
|
+
i18n (1.8.3)
|
28
28
|
concurrent-ruby (~> 1.0)
|
29
|
-
minitest (5.
|
30
|
-
rake (
|
31
|
-
rspec (3.
|
32
|
-
rspec-core (~> 3.
|
33
|
-
rspec-expectations (~> 3.
|
34
|
-
rspec-mocks (~> 3.
|
35
|
-
rspec-core (3.
|
36
|
-
rspec-support (~> 3.
|
37
|
-
rspec-expectations (3.
|
29
|
+
minitest (5.14.1)
|
30
|
+
rake (13.0.1)
|
31
|
+
rspec (3.9.0)
|
32
|
+
rspec-core (~> 3.9.0)
|
33
|
+
rspec-expectations (~> 3.9.0)
|
34
|
+
rspec-mocks (~> 3.9.0)
|
35
|
+
rspec-core (3.9.2)
|
36
|
+
rspec-support (~> 3.9.3)
|
37
|
+
rspec-expectations (3.9.2)
|
38
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-mocks (3.
|
39
|
+
rspec-support (~> 3.9.0)
|
40
|
+
rspec-mocks (3.9.1)
|
41
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-support (3.
|
44
|
-
sqlite3 (1.4.
|
45
|
-
thor (0.
|
42
|
+
rspec-support (~> 3.9.0)
|
43
|
+
rspec-support (3.9.3)
|
44
|
+
sqlite3 (1.4.2)
|
45
|
+
thor (1.0.1)
|
46
46
|
thread_safe (0.3.6)
|
47
|
-
tzinfo (1.2.
|
47
|
+
tzinfo (1.2.7)
|
48
48
|
thread_safe (~> 0.1)
|
49
|
-
zeitwerk (2.1
|
49
|
+
zeitwerk (2.3.1)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
53
53
|
|
54
54
|
DEPENDENCIES
|
55
|
-
activerecord (= 6.0.
|
55
|
+
activerecord (= 6.0.3.2)
|
56
56
|
appraisal
|
57
57
|
bundler (~> 1.3)
|
58
58
|
deferring!
|
@@ -65,9 +65,9 @@ module Deferring
|
|
65
65
|
#
|
66
66
|
# The delegation has to be explicit in this case, because the inclusion of
|
67
67
|
# Enumerable also defines the select-method on DeferredAssociation.
|
68
|
-
def select(value =
|
68
|
+
def select(value = nil, &block)
|
69
69
|
if block_given?
|
70
|
-
objects.select { |*block_args|
|
70
|
+
objects.select { |*block_args| block.call(*block_args) }
|
71
71
|
else
|
72
72
|
original_association.select(value)
|
73
73
|
end
|
data/lib/deferring/version.rb
CHANGED
@@ -9,6 +9,7 @@ RSpec.describe 'deferred accepts_nested_attributes' do
|
|
9
9
|
Team.create!(name: 'Database Administration')
|
10
10
|
Team.create!(name: 'End-User Support')
|
11
11
|
Team.create!(name: 'Operations')
|
12
|
+
|
12
13
|
end
|
13
14
|
|
14
15
|
let(:bob) { Person.where(name: 'Bob').first }
|
@@ -47,4 +48,21 @@ RSpec.describe 'deferred accepts_nested_attributes' do
|
|
47
48
|
expect(p.team_ids.sort).to eq([1])
|
48
49
|
end
|
49
50
|
|
51
|
+
it '' do
|
52
|
+
issue = Issue.create!(subject: 'Foo', person: bob)
|
53
|
+
|
54
|
+
p = Person.where(name: 'Alice').take
|
55
|
+
p.attributes = {
|
56
|
+
issues_attributes: [
|
57
|
+
{ id: issue.id },
|
58
|
+
]
|
59
|
+
}
|
60
|
+
p.save!
|
61
|
+
|
62
|
+
p.reload
|
63
|
+
expect(p.issues.size).to eq(1)
|
64
|
+
|
65
|
+
bob.reload
|
66
|
+
expect(bob.issues.size).to eq(0)
|
67
|
+
end
|
50
68
|
end
|
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.6.
|
4
|
+
version: 0.6.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: 2020-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: sqlite3
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: appraisal
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|