deferring 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +16 -15
- data/Appraisals +8 -8
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/deferring.gemspec +1 -1
- data/gemfiles/rails_40.gemfile +1 -1
- data/gemfiles/rails_40.gemfile.lock +34 -30
- data/gemfiles/rails_41.gemfile +1 -1
- data/gemfiles/rails_41.gemfile.lock +35 -31
- data/gemfiles/{rails_30.gemfile → rails_42.gemfile} +1 -1
- data/gemfiles/rails_42.gemfile.lock +64 -0
- data/gemfiles/{rails_32.gemfile → rails_50.gemfile} +1 -1
- data/gemfiles/rails_50.gemfile.lock +63 -0
- data/lib/deferring.rb +55 -52
- data/lib/deferring/deferred_association.rb +8 -6
- data/lib/deferring/deferred_callback_listener.rb +9 -3
- data/lib/deferring/version.rb +1 -3
- data/spec/lib/deferring_habtm_spec.rb +140 -90
- data/spec/lib/deferring_has_many_spec.rb +58 -44
- data/spec/spec_helper.rb +12 -1
- data/spec/support/active_record.rb +5 -5
- metadata +10 -11
- data/gemfiles/rails_30.gemfile.lock +0 -55
- data/gemfiles/rails_32.gemfile.lock +0 -57
- data/spec/support/rails_versions.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf753ccbdb9acdc1f4ef4af594315caa60b68895
|
4
|
+
data.tar.gz: 5dd367686b2102d0e904f71a52cf3b35f252a067
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a5c30f9649f72edce92aa48c772d050c0fc8bdc87ed122fa1b4acf6ccb52aa410243ad86cb0f10dbf612276e98e0fdbfb0aaefee787013f6bbe1f325ec03b09
|
7
|
+
data.tar.gz: e631910b62aab2e4c586d6e6803f2af1649d351b9e2ddb5f35bc83c9ea89c8d0bb29700cdcecccc1724611234c560cc1c6712c8566735afd2edf48e96883a8e1
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
rvm:
|
4
|
-
-
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- rbx-2
|
8
|
-
- jruby-19mode
|
4
|
+
- 2.3.0
|
5
|
+
- 2.3.3
|
6
|
+
- 2.4.0
|
9
7
|
- ruby-head
|
10
|
-
|
8
|
+
|
9
|
+
gemfile:
|
10
|
+
- gemfiles/rails_40.gemfile
|
11
|
+
- gemfiles/rails_41.gemfile
|
12
|
+
- gemfiles/rails_42.gemfile
|
13
|
+
- gemfiles/rails_50.gemfile
|
11
14
|
|
12
15
|
sudo: false
|
13
16
|
|
14
17
|
matrix:
|
15
18
|
allow_failures:
|
16
|
-
- rvm: rbx-2
|
17
|
-
- rvm: jruby-19mode
|
18
19
|
- rvm: ruby-head
|
19
|
-
|
20
|
-
|
21
|
-
gemfile:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
gemfile: gemfiles/rails_40.gemfile
|
21
|
+
- rvm: ruby-head
|
22
|
+
gemfile: gemfiles/rails_41.gemfile
|
23
|
+
- rvm: 2.4.0
|
24
|
+
gemfile: gemfiles/rails_40.gemfile
|
25
|
+
- rvm: 2.4.0
|
26
|
+
gemfile: gemfiles/rails_41.gemfile
|
26
27
|
|
27
28
|
script: 'bundle exec rake'
|
data/Appraisals
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
appraise 'rails-
|
2
|
-
gem 'activerecord', '
|
1
|
+
appraise 'rails-40' do
|
2
|
+
gem 'activerecord', '4.0.13'
|
3
3
|
end
|
4
4
|
|
5
|
-
appraise 'rails-
|
6
|
-
gem 'activerecord', '
|
5
|
+
appraise 'rails-41' do
|
6
|
+
gem 'activerecord', '4.1.15'
|
7
7
|
end
|
8
8
|
|
9
|
-
appraise 'rails-
|
10
|
-
gem 'activerecord', '4.
|
9
|
+
appraise 'rails-42' do
|
10
|
+
gem 'activerecord', '4.2.8'
|
11
11
|
end
|
12
12
|
|
13
|
-
appraise 'rails-
|
14
|
-
gem 'activerecord', '
|
13
|
+
appraise 'rails-50' do
|
14
|
+
gem 'activerecord', '5.0.2'
|
15
15
|
end
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
Deferring makes it possible to delay saving ActiveRecord associations until the
|
7
7
|
parent object has been saved.
|
8
8
|
|
9
|
-
Currently supporting Rails
|
9
|
+
Currently supporting Rails 4.x & 5.0 on MRI Ruby 2.3+.
|
10
10
|
|
11
11
|
It is important to note that Deferring does not touch the original `has_many`
|
12
12
|
and `has_and_belongs_to_many` associations. You can use them, without worrying
|
data/deferring.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_dependency 'activerecord', '>
|
24
|
+
spec.add_dependency 'activerecord', '> 4.0'
|
25
25
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
27
|
spec.add_development_dependency 'rake'
|
data/gemfiles/rails_40.gemfile
CHANGED
@@ -1,63 +1,67 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
deferring (0.
|
5
|
-
activerecord (>
|
4
|
+
deferring (0.3.0)
|
5
|
+
activerecord (> 4.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (4.0.
|
11
|
-
activesupport (= 4.0.
|
10
|
+
activemodel (4.0.13)
|
11
|
+
activesupport (= 4.0.13)
|
12
12
|
builder (~> 3.1.0)
|
13
|
-
activerecord (4.0.
|
14
|
-
activemodel (= 4.0.
|
13
|
+
activerecord (4.0.13)
|
14
|
+
activemodel (= 4.0.13)
|
15
15
|
activerecord-deprecated_finders (~> 1.0.2)
|
16
|
-
activesupport (= 4.0.
|
16
|
+
activesupport (= 4.0.13)
|
17
17
|
arel (~> 4.0.0)
|
18
|
-
activerecord-deprecated_finders (1.0.
|
19
|
-
activesupport (4.0.
|
18
|
+
activerecord-deprecated_finders (1.0.4)
|
19
|
+
activesupport (4.0.13)
|
20
20
|
i18n (~> 0.6, >= 0.6.9)
|
21
21
|
minitest (~> 4.2)
|
22
22
|
multi_json (~> 1.3)
|
23
23
|
thread_safe (~> 0.1)
|
24
24
|
tzinfo (~> 0.3.37)
|
25
|
-
appraisal (1.0
|
25
|
+
appraisal (2.1.0)
|
26
26
|
bundler
|
27
27
|
rake
|
28
28
|
thor (>= 0.14.0)
|
29
29
|
arel (4.0.2)
|
30
30
|
builder (3.1.4)
|
31
|
-
diff-lcs (1.
|
32
|
-
i18n (0.
|
31
|
+
diff-lcs (1.3)
|
32
|
+
i18n (0.8.1)
|
33
33
|
minitest (4.7.5)
|
34
|
-
multi_json (1.
|
35
|
-
rake (
|
36
|
-
rspec (3.
|
37
|
-
rspec-core (~> 3.
|
38
|
-
rspec-expectations (~> 3.
|
39
|
-
rspec-mocks (~> 3.
|
40
|
-
rspec-core (3.
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-expectations (3.
|
34
|
+
multi_json (1.12.1)
|
35
|
+
rake (12.0.0)
|
36
|
+
rspec (3.5.0)
|
37
|
+
rspec-core (~> 3.5.0)
|
38
|
+
rspec-expectations (~> 3.5.0)
|
39
|
+
rspec-mocks (~> 3.5.0)
|
40
|
+
rspec-core (3.5.4)
|
41
|
+
rspec-support (~> 3.5.0)
|
42
|
+
rspec-expectations (3.5.0)
|
43
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-mocks (3.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
rspec-support (~> 3.5.0)
|
45
|
+
rspec-mocks (3.5.0)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.5.0)
|
48
|
+
rspec-support (3.5.0)
|
49
|
+
sqlite3 (1.3.13)
|
50
|
+
thor (0.19.4)
|
51
|
+
thread_safe (0.3.6)
|
52
|
+
tzinfo (0.3.52)
|
52
53
|
|
53
54
|
PLATFORMS
|
54
55
|
ruby
|
55
56
|
|
56
57
|
DEPENDENCIES
|
57
|
-
activerecord (= 4.0.
|
58
|
+
activerecord (= 4.0.13)
|
58
59
|
appraisal
|
59
60
|
bundler (~> 1.3)
|
60
61
|
deferring!
|
61
62
|
rake
|
62
63
|
rspec
|
63
64
|
sqlite3
|
65
|
+
|
66
|
+
BUNDLED WITH
|
67
|
+
1.13.0
|
data/gemfiles/rails_41.gemfile
CHANGED
@@ -1,62 +1,66 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
deferring (0.
|
5
|
-
activerecord (>
|
4
|
+
deferring (0.3.0)
|
5
|
+
activerecord (> 4.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (4.1.
|
11
|
-
activesupport (= 4.1.
|
10
|
+
activemodel (4.1.15)
|
11
|
+
activesupport (= 4.1.15)
|
12
12
|
builder (~> 3.1)
|
13
|
-
activerecord (4.1.
|
14
|
-
activemodel (= 4.1.
|
15
|
-
activesupport (= 4.1.
|
13
|
+
activerecord (4.1.15)
|
14
|
+
activemodel (= 4.1.15)
|
15
|
+
activesupport (= 4.1.15)
|
16
16
|
arel (~> 5.0.0)
|
17
|
-
activesupport (4.1.
|
17
|
+
activesupport (4.1.15)
|
18
18
|
i18n (~> 0.6, >= 0.6.9)
|
19
19
|
json (~> 1.7, >= 1.7.7)
|
20
20
|
minitest (~> 5.1)
|
21
21
|
thread_safe (~> 0.1)
|
22
22
|
tzinfo (~> 1.1)
|
23
|
-
appraisal (1.0
|
23
|
+
appraisal (2.1.0)
|
24
24
|
bundler
|
25
25
|
rake
|
26
26
|
thor (>= 0.14.0)
|
27
27
|
arel (5.0.1.20140414130214)
|
28
|
-
builder (3.2.
|
29
|
-
diff-lcs (1.
|
30
|
-
i18n (0.
|
31
|
-
json (1.8.
|
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.
|
28
|
+
builder (3.2.3)
|
29
|
+
diff-lcs (1.3)
|
30
|
+
i18n (0.8.1)
|
31
|
+
json (1.8.6)
|
32
|
+
minitest (5.10.1)
|
33
|
+
rake (12.0.0)
|
34
|
+
rspec (3.5.0)
|
35
|
+
rspec-core (~> 3.5.0)
|
36
|
+
rspec-expectations (~> 3.5.0)
|
37
|
+
rspec-mocks (~> 3.5.0)
|
38
|
+
rspec-core (3.5.4)
|
39
|
+
rspec-support (~> 3.5.0)
|
40
|
+
rspec-expectations (3.5.0)
|
41
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-mocks (3.
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
rspec-support (~> 3.5.0)
|
43
|
+
rspec-mocks (3.5.0)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.5.0)
|
46
|
+
rspec-support (3.5.0)
|
47
|
+
sqlite3 (1.3.13)
|
48
|
+
thor (0.19.4)
|
49
|
+
thread_safe (0.3.6)
|
50
|
+
tzinfo (1.2.2)
|
50
51
|
thread_safe (~> 0.1)
|
51
52
|
|
52
53
|
PLATFORMS
|
53
54
|
ruby
|
54
55
|
|
55
56
|
DEPENDENCIES
|
56
|
-
activerecord (= 4.1.
|
57
|
+
activerecord (= 4.1.15)
|
57
58
|
appraisal
|
58
59
|
bundler (~> 1.3)
|
59
60
|
deferring!
|
60
61
|
rake
|
61
62
|
rspec
|
62
63
|
sqlite3
|
64
|
+
|
65
|
+
BUNDLED WITH
|
66
|
+
1.13.0
|
@@ -0,0 +1,64 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
deferring (0.3.0)
|
5
|
+
activerecord (> 4.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (4.2.8)
|
11
|
+
activesupport (= 4.2.8)
|
12
|
+
builder (~> 3.1)
|
13
|
+
activerecord (4.2.8)
|
14
|
+
activemodel (= 4.2.8)
|
15
|
+
activesupport (= 4.2.8)
|
16
|
+
arel (~> 6.0)
|
17
|
+
activesupport (4.2.8)
|
18
|
+
i18n (~> 0.7)
|
19
|
+
minitest (~> 5.1)
|
20
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
21
|
+
tzinfo (~> 1.1)
|
22
|
+
appraisal (2.1.0)
|
23
|
+
bundler
|
24
|
+
rake
|
25
|
+
thor (>= 0.14.0)
|
26
|
+
arel (6.0.4)
|
27
|
+
builder (3.2.3)
|
28
|
+
diff-lcs (1.3)
|
29
|
+
i18n (0.8.1)
|
30
|
+
minitest (5.10.1)
|
31
|
+
rake (12.0.0)
|
32
|
+
rspec (3.5.0)
|
33
|
+
rspec-core (~> 3.5.0)
|
34
|
+
rspec-expectations (~> 3.5.0)
|
35
|
+
rspec-mocks (~> 3.5.0)
|
36
|
+
rspec-core (3.5.4)
|
37
|
+
rspec-support (~> 3.5.0)
|
38
|
+
rspec-expectations (3.5.0)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.5.0)
|
41
|
+
rspec-mocks (3.5.0)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.5.0)
|
44
|
+
rspec-support (3.5.0)
|
45
|
+
sqlite3 (1.3.13)
|
46
|
+
thor (0.19.4)
|
47
|
+
thread_safe (0.3.6)
|
48
|
+
tzinfo (1.2.2)
|
49
|
+
thread_safe (~> 0.1)
|
50
|
+
|
51
|
+
PLATFORMS
|
52
|
+
ruby
|
53
|
+
|
54
|
+
DEPENDENCIES
|
55
|
+
activerecord (= 4.2.8)
|
56
|
+
appraisal
|
57
|
+
bundler (~> 1.3)
|
58
|
+
deferring!
|
59
|
+
rake
|
60
|
+
rspec
|
61
|
+
sqlite3
|
62
|
+
|
63
|
+
BUNDLED WITH
|
64
|
+
1.13.0
|
@@ -0,0 +1,63 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
deferring (0.3.0)
|
5
|
+
activerecord (> 4.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (5.0.2)
|
11
|
+
activesupport (= 5.0.2)
|
12
|
+
activerecord (5.0.2)
|
13
|
+
activemodel (= 5.0.2)
|
14
|
+
activesupport (= 5.0.2)
|
15
|
+
arel (~> 7.0)
|
16
|
+
activesupport (5.0.2)
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
+
i18n (~> 0.7)
|
19
|
+
minitest (~> 5.1)
|
20
|
+
tzinfo (~> 1.1)
|
21
|
+
appraisal (2.1.0)
|
22
|
+
bundler
|
23
|
+
rake
|
24
|
+
thor (>= 0.14.0)
|
25
|
+
arel (7.1.4)
|
26
|
+
concurrent-ruby (1.0.5)
|
27
|
+
diff-lcs (1.3)
|
28
|
+
i18n (0.8.1)
|
29
|
+
minitest (5.10.1)
|
30
|
+
rake (12.0.0)
|
31
|
+
rspec (3.5.0)
|
32
|
+
rspec-core (~> 3.5.0)
|
33
|
+
rspec-expectations (~> 3.5.0)
|
34
|
+
rspec-mocks (~> 3.5.0)
|
35
|
+
rspec-core (3.5.4)
|
36
|
+
rspec-support (~> 3.5.0)
|
37
|
+
rspec-expectations (3.5.0)
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
+
rspec-support (~> 3.5.0)
|
40
|
+
rspec-mocks (3.5.0)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.5.0)
|
43
|
+
rspec-support (3.5.0)
|
44
|
+
sqlite3 (1.3.13)
|
45
|
+
thor (0.19.4)
|
46
|
+
thread_safe (0.3.6)
|
47
|
+
tzinfo (1.2.2)
|
48
|
+
thread_safe (~> 0.1)
|
49
|
+
|
50
|
+
PLATFORMS
|
51
|
+
ruby
|
52
|
+
|
53
|
+
DEPENDENCIES
|
54
|
+
activerecord (= 5.0.2)
|
55
|
+
appraisal
|
56
|
+
bundler (~> 1.3)
|
57
|
+
deferring!
|
58
|
+
rake
|
59
|
+
rspec
|
60
|
+
sqlite3
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
1.13.0
|