deferred_associations 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.travis.yml +12 -0
- data/Readme.markdown +14 -3
- data/VERSION +1 -1
- data/deferred_associations.gemspec +43 -26
- data/gemfiles/ar2.3.14.gemfile +12 -0
- data/gemfiles/ar2.3.14.gemfile.lock +47 -0
- data/gemfiles/ar3.2.3.gemfile +12 -0
- data/gemfiles/ar3.2.3.gemfile.lock +96 -0
- data/lib/has_and_belongs_to_many_with_deferred_save.rb +2 -1
- data/spec/has_and_belongs_to_many_with_deferred_save_spec.rb +30 -10
- data/spec/models/person.rb +12 -0
- data/spec/spec_helper.rb +2 -7
- metadata +73 -76
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Readme.markdown
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Make ActiveRecord defer/postpone saving the records you add to an habtm (has_and_belongs_to_many) or has_many association
|
2
2
|
until you call model.save, allowing validation in the style of normal attributes.
|
3
3
|
|
4
|
+
[![Build Status](https://secure.travis-ci.org/MartinKoerner/deferred_associations.png?branch=master)](http://travis-ci.org/MartinKoerner/deferred_associations) [![Dependency Status](https://gemnasium.com/MartinKoerner/deferred_associations.png?travis)](https://gemnasium.com/MartinKoerner/deferred_associations)
|
5
|
+
|
4
6
|
How to install
|
5
7
|
==============
|
6
8
|
|
@@ -26,7 +28,7 @@ Usage
|
|
26
28
|
# Neither people nor tables are saved to the database, if a validation error is added
|
27
29
|
end
|
28
30
|
|
29
|
-
def
|
31
|
+
def check_change
|
30
32
|
# you can check, if there were changes to the association
|
31
33
|
if people != people_without_deferred_save
|
32
34
|
self.updated_at = Time.now.utc
|
@@ -37,7 +39,7 @@ Usage
|
|
37
39
|
Compatibility
|
38
40
|
=============
|
39
41
|
|
40
|
-
Tested with Rails 2.3.14, 3.2.
|
42
|
+
Tested with Rails 2.3.14, 3.2.3 on Ruby 1.8.7, 1.9.3 and JRuby 1.6.6
|
41
43
|
|
42
44
|
Gotchas
|
43
45
|
=======
|
@@ -45,10 +47,19 @@ Gotchas
|
|
45
47
|
Be aware, that the habtm association objects sometimes asks the database instead of giving you the data directly from the array. So you can get something
|
46
48
|
like
|
47
49
|
|
48
|
-
room = Room.
|
50
|
+
room = Room.create
|
49
51
|
room.people << Person.create
|
50
52
|
room.people.first # => nil, since the DB doesn't have the association saved yet
|
51
53
|
|
54
|
+
|
55
|
+
Also it is good to know, that the array you set to an association is stored there directly, so after setting a list, the typical association
|
56
|
+
methods are not working:
|
57
|
+
|
58
|
+
room = Room.create
|
59
|
+
room.people.klass # => Person
|
60
|
+
room.people = [Person.first]
|
61
|
+
room.people.klass # => undefined method klass for #Array:0x007fa3b9efc2c0`
|
62
|
+
|
52
63
|
Bugs
|
53
64
|
====
|
54
65
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
@@ -1,44 +1,62 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "deferred_associations"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Martin Koerner", "Tyler Rick", "Alessio Caiazza"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-04-23"
|
13
13
|
s.description = "Makes ActiveRecord defer/postpone saving the records you add to an habtm (has_and_belongs_to_many) or has_many\n association until you call model.save, allowing validation in the style of normal attributes. Additionally you\n can check inside before_save filters, if the association was altered."
|
14
14
|
s.email = "martin.koerner@objectfab.de"
|
15
15
|
s.files = [
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
16
|
+
".gitignore",
|
17
|
+
".travis.yml",
|
18
|
+
"CHANGELOG",
|
19
|
+
"Rakefile",
|
20
|
+
"Readme.markdown",
|
21
|
+
"VERSION",
|
22
|
+
"deferred_associations.gemspec",
|
23
|
+
"gemfiles/ar2.3.14.gemfile",
|
24
|
+
"gemfiles/ar2.3.14.gemfile.lock",
|
25
|
+
"gemfiles/ar3.2.3.gemfile",
|
26
|
+
"gemfiles/ar3.2.3.gemfile.lock",
|
27
|
+
"init.rb",
|
28
|
+
"lib/array_to_association_wrapper.rb",
|
29
|
+
"lib/deferred_associations.rb",
|
30
|
+
"lib/has_and_belongs_to_many_with_deferred_save.rb",
|
31
|
+
"lib/has_many_with_deferred_save.rb",
|
32
|
+
"spec/.gitignore",
|
33
|
+
"spec/db/database.yml",
|
34
|
+
"spec/db/schema.rb",
|
35
|
+
"spec/has_and_belongs_to_many_with_deferred_save_spec.rb",
|
36
|
+
"spec/has_many_with_deferred_save_spec.rb",
|
37
|
+
"spec/models/chair.rb",
|
38
|
+
"spec/models/door.rb",
|
39
|
+
"spec/models/person.rb",
|
40
|
+
"spec/models/room.rb",
|
41
|
+
"spec/models/table.rb",
|
42
|
+
"spec/spec_helper.rb"
|
37
43
|
]
|
38
44
|
s.homepage = "http://github.com/MartinKoerner/deferred_associations"
|
45
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
39
46
|
s.require_paths = ["lib"]
|
40
47
|
s.rubygems_version = "1.8.15"
|
41
48
|
s.summary = "Makes ActiveRecord defer/postpone habtm or has_many associations"
|
49
|
+
s.test_files = [
|
50
|
+
"spec/has_and_belongs_to_many_with_deferred_save_spec.rb",
|
51
|
+
"spec/has_many_with_deferred_save_spec.rb",
|
52
|
+
"spec/spec_helper.rb",
|
53
|
+
"spec/db/schema.rb",
|
54
|
+
"spec/models/chair.rb",
|
55
|
+
"spec/models/door.rb",
|
56
|
+
"spec/models/person.rb",
|
57
|
+
"spec/models/room.rb",
|
58
|
+
"spec/models/table.rb"
|
59
|
+
]
|
42
60
|
|
43
61
|
if s.respond_to? :specification_version then
|
44
62
|
s.specification_version = 3
|
@@ -55,4 +73,3 @@ Gem::Specification.new do |s|
|
|
55
73
|
s.add_dependency(%q<rspec>, [">= 0"])
|
56
74
|
end
|
57
75
|
end
|
58
|
-
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
source 'https://rubygems.org'
|
3
|
+
|
4
|
+
gem "jruby-openssl", :platform=>:jruby
|
5
|
+
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
|
6
|
+
gem "sqlite3", :platform=>:ruby
|
7
|
+
|
8
|
+
gem 'activerecord', '=2.3.14'
|
9
|
+
|
10
|
+
gem 'rspec-rails', '=1.2.9'
|
11
|
+
|
12
|
+
gemspec :path=>"../"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
PATH
|
2
|
+
remote: /home/martin/Projekte/has_and_belongs_to_many_with_deferred_save
|
3
|
+
specs:
|
4
|
+
deferred_associations (0.5.3)
|
5
|
+
activerecord
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activerecord (2.3.14)
|
11
|
+
activesupport (= 2.3.14)
|
12
|
+
activerecord-jdbc-adapter (1.2.2)
|
13
|
+
activerecord-jdbcsqlite3-adapter (1.2.2)
|
14
|
+
activerecord-jdbc-adapter (~> 1.2.2)
|
15
|
+
jdbc-sqlite3 (~> 3.7.2)
|
16
|
+
activesupport (2.3.14)
|
17
|
+
bouncy-castle-java (1.5.0146.1)
|
18
|
+
diff-lcs (1.1.3)
|
19
|
+
jdbc-sqlite3 (3.7.2)
|
20
|
+
jruby-openssl (0.7.6.1)
|
21
|
+
bouncy-castle-java (>= 1.5.0146.1)
|
22
|
+
rack (1.4.1)
|
23
|
+
rspec (2.9.0)
|
24
|
+
rspec-core (~> 2.9.0)
|
25
|
+
rspec-expectations (~> 2.9.0)
|
26
|
+
rspec-mocks (~> 2.9.0)
|
27
|
+
rspec-core (2.9.0)
|
28
|
+
rspec-expectations (2.9.0)
|
29
|
+
diff-lcs (~> 1.1.3)
|
30
|
+
rspec-mocks (2.9.0)
|
31
|
+
rspec-rails (1.2.9)
|
32
|
+
rack (>= 1.0.0)
|
33
|
+
rspec (>= 1.2.9)
|
34
|
+
sqlite3 (1.3.5)
|
35
|
+
|
36
|
+
PLATFORMS
|
37
|
+
java
|
38
|
+
ruby
|
39
|
+
|
40
|
+
DEPENDENCIES
|
41
|
+
activerecord (= 2.3.14)
|
42
|
+
activerecord-jdbcsqlite3-adapter
|
43
|
+
deferred_associations!
|
44
|
+
jruby-openssl
|
45
|
+
rspec
|
46
|
+
rspec-rails (= 1.2.9)
|
47
|
+
sqlite3
|
@@ -0,0 +1,96 @@
|
|
1
|
+
PATH
|
2
|
+
remote: /home/martin/Projekte/has_and_belongs_to_many_with_deferred_save
|
3
|
+
specs:
|
4
|
+
deferred_associations (0.5.3)
|
5
|
+
activerecord
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (3.2.3)
|
11
|
+
activemodel (= 3.2.3)
|
12
|
+
activesupport (= 3.2.3)
|
13
|
+
builder (~> 3.0.0)
|
14
|
+
erubis (~> 2.7.0)
|
15
|
+
journey (~> 1.0.1)
|
16
|
+
rack (~> 1.4.0)
|
17
|
+
rack-cache (~> 1.2)
|
18
|
+
rack-test (~> 0.6.1)
|
19
|
+
sprockets (~> 2.1.2)
|
20
|
+
activemodel (3.2.3)
|
21
|
+
activesupport (= 3.2.3)
|
22
|
+
builder (~> 3.0.0)
|
23
|
+
activerecord (3.2.3)
|
24
|
+
activemodel (= 3.2.3)
|
25
|
+
activesupport (= 3.2.3)
|
26
|
+
arel (~> 3.0.2)
|
27
|
+
tzinfo (~> 0.3.29)
|
28
|
+
activerecord-jdbc-adapter (1.2.2)
|
29
|
+
activerecord-jdbcsqlite3-adapter (1.2.2)
|
30
|
+
activerecord-jdbc-adapter (~> 1.2.2)
|
31
|
+
jdbc-sqlite3 (~> 3.7.2)
|
32
|
+
activesupport (3.2.3)
|
33
|
+
i18n (~> 0.6)
|
34
|
+
multi_json (~> 1.0)
|
35
|
+
arel (3.0.2)
|
36
|
+
bouncy-castle-java (1.5.0146.1)
|
37
|
+
builder (3.0.0)
|
38
|
+
diff-lcs (1.1.3)
|
39
|
+
erubis (2.7.0)
|
40
|
+
hike (1.2.1)
|
41
|
+
i18n (0.6.0)
|
42
|
+
jdbc-sqlite3 (3.7.2)
|
43
|
+
journey (1.0.3)
|
44
|
+
jruby-openssl (0.7.6.1)
|
45
|
+
bouncy-castle-java (>= 1.5.0146.1)
|
46
|
+
json (1.6.6-java)
|
47
|
+
multi_json (1.3.2)
|
48
|
+
rack (1.4.1)
|
49
|
+
rack-cache (1.2)
|
50
|
+
rack (>= 0.4)
|
51
|
+
rack-ssl (1.3.2)
|
52
|
+
rack
|
53
|
+
rack-test (0.6.1)
|
54
|
+
rack (>= 1.0)
|
55
|
+
railties (3.2.3)
|
56
|
+
actionpack (= 3.2.3)
|
57
|
+
activesupport (= 3.2.3)
|
58
|
+
rack-ssl (~> 1.3.2)
|
59
|
+
rake (>= 0.8.7)
|
60
|
+
rdoc (~> 3.4)
|
61
|
+
thor (~> 0.14.6)
|
62
|
+
rake (0.9.2.2)
|
63
|
+
rdoc (3.12)
|
64
|
+
json (~> 1.4)
|
65
|
+
rspec (2.9.0)
|
66
|
+
rspec-core (~> 2.9.0)
|
67
|
+
rspec-expectations (~> 2.9.0)
|
68
|
+
rspec-mocks (~> 2.9.0)
|
69
|
+
rspec-core (2.9.0)
|
70
|
+
rspec-expectations (2.9.1)
|
71
|
+
diff-lcs (~> 1.1.3)
|
72
|
+
rspec-mocks (2.9.0)
|
73
|
+
rspec-rails (2.9.0)
|
74
|
+
actionpack (>= 3.0)
|
75
|
+
activesupport (>= 3.0)
|
76
|
+
railties (>= 3.0)
|
77
|
+
rspec (~> 2.9.0)
|
78
|
+
sprockets (2.1.2)
|
79
|
+
hike (~> 1.2)
|
80
|
+
rack (~> 1.0)
|
81
|
+
tilt (~> 1.1, != 1.3.0)
|
82
|
+
thor (0.14.6)
|
83
|
+
tilt (1.3.3)
|
84
|
+
tzinfo (0.3.33)
|
85
|
+
|
86
|
+
PLATFORMS
|
87
|
+
java
|
88
|
+
|
89
|
+
DEPENDENCIES
|
90
|
+
activerecord (= 3.2.3)
|
91
|
+
activerecord-jdbcsqlite3-adapter
|
92
|
+
deferred_associations!
|
93
|
+
jruby-openssl
|
94
|
+
rspec
|
95
|
+
rspec-rails
|
96
|
+
sqlite3
|
@@ -61,7 +61,8 @@ module ActiveRecord
|
|
61
61
|
if ActiveRecord::VERSION::STRING >= "3"
|
62
62
|
define_method "#{collection_singular_ids}_with_deferred_save=" do |ids|
|
63
63
|
ids = Array.wrap(ids).reject { |id| id.blank? }
|
64
|
-
|
64
|
+
reflection_wrapper = self.send("#{collection_name}_without_deferred_save")
|
65
|
+
new_values = reflection_wrapper.klass.find(ids)
|
65
66
|
self.send("#{collection_name}=", new_values)
|
66
67
|
end
|
67
68
|
alias_method_chain :"#{collection_singular_ids}=", 'deferred_save'
|
@@ -100,15 +100,7 @@ describe "has_and_belongs_to_many_with_deferred_save" do
|
|
100
100
|
@people[2].reload.rooms.size.should == 0
|
101
101
|
|
102
102
|
obj = @people[2]
|
103
|
-
|
104
|
-
rooms.each do |room|
|
105
|
-
this_room_unsaved = rooms_without_deferred_save.include?(room) ? 0 : 1
|
106
|
-
if room.people.size + this_room_unsaved > room.maximum_occupancy
|
107
|
-
errors.add :rooms, "This room has reached its maximum occupancy"
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
obj.class.send(:validate, :extra_validation)
|
103
|
+
obj.do_extra_validation = true
|
112
104
|
|
113
105
|
@people[2].rooms << @room
|
114
106
|
@people[2].rooms.size.should == 1
|
@@ -151,7 +143,7 @@ describe "has_and_belongs_to_many_with_deferred_save" do
|
|
151
143
|
|
152
144
|
@room.bs_diff_before_module.should be_true
|
153
145
|
@room.bs_diff_after_module.should be_true
|
154
|
-
if
|
146
|
+
if ar3?
|
155
147
|
@room.bs_diff_method.should be_nil # Rails 3.2: nil (before_save filter is not supported)
|
156
148
|
else
|
157
149
|
@room.bs_diff_method.should be_true
|
@@ -186,6 +178,30 @@ describe "has_and_belongs_to_many_with_deferred_save" do
|
|
186
178
|
@room.save.should be_true
|
187
179
|
Room.find(@room.id).person_ids.should == [@people[1].id]
|
188
180
|
end
|
181
|
+
|
182
|
+
it "should work with multiple id setters and object setters" do
|
183
|
+
@room = Room.find(@room.id)
|
184
|
+
@room.people = [@people[0]]
|
185
|
+
@room.person_ids = [@people[0].id, @people[1].id]
|
186
|
+
@room.people = [@people[1]]
|
187
|
+
@room.person_ids = [@people[0].id, @people[1].id]
|
188
|
+
@room.people = [@people[1]]
|
189
|
+
@room.save
|
190
|
+
@room = Room.find(@room.id)
|
191
|
+
@room.people.should == [@people[1]]
|
192
|
+
end
|
193
|
+
|
194
|
+
it "should give klass in AR 3" do
|
195
|
+
if ar3?
|
196
|
+
@room.people.klass.should == Person
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
it "should give aliased_table_name in AR 2.3" do
|
201
|
+
unless ar3?
|
202
|
+
@room.people.aliased_table_name.should == "people"
|
203
|
+
end
|
204
|
+
end
|
189
205
|
end
|
190
206
|
|
191
207
|
describe "doors" do
|
@@ -211,4 +227,8 @@ describe "has_and_belongs_to_many_with_deferred_save" do
|
|
211
227
|
end
|
212
228
|
end
|
213
229
|
|
230
|
+
def ar3?
|
231
|
+
ActiveRecord::VERSION::STRING >= "3"
|
232
|
+
end
|
233
|
+
|
214
234
|
end
|
data/spec/models/person.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
1
|
class Person < ActiveRecord::Base
|
2
2
|
has_and_belongs_to_many_with_deferred_save :rooms, :validate => true
|
3
|
+
|
4
|
+
attr :do_extra_validation, true
|
5
|
+
validate :extra_validation, :if => :do_extra_validation
|
6
|
+
|
7
|
+
def extra_validation
|
8
|
+
rooms.each do |room|
|
9
|
+
this_room_unsaved = rooms_without_deferred_save.include?(room) ? 0 : 1
|
10
|
+
if room.people.size + this_room_unsaved > room.maximum_occupancy
|
11
|
+
errors.add :rooms, "This room has reached its maximum occupancy"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
3
15
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
|
2
2
|
plugin_test_dir = File.dirname(__FILE__)
|
3
3
|
|
4
|
-
require 'rubygems'
|
5
|
-
USE_AR_3 = true
|
6
4
|
|
7
|
-
|
8
|
-
|
5
|
+
require 'active_record'
|
6
|
+
if ActiveRecord::VERSION::STRING >= "3"
|
9
7
|
require 'logger'
|
10
|
-
require 'active_record'
|
11
8
|
else
|
12
|
-
gem 'activerecord', '=2.3.14'
|
13
|
-
require 'active_record'
|
14
9
|
# Workaround for https://rails.lighthouseapp.com/projects/8994/tickets/2577-when-using-activerecordassociations-outside-of-rails-a-nameerror-is-thrown
|
15
10
|
ActiveRecord::ActiveRecordError
|
16
11
|
end
|
metadata
CHANGED
@@ -1,52 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deferred_associations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 13
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
- 3
|
10
|
-
version: 0.5.3
|
5
|
+
version: 0.5.4
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
|
-
- Martin Koerner
|
14
|
-
- Tyler Rick
|
15
|
-
- Alessio Caiazza
|
8
|
+
- Martin Koerner
|
9
|
+
- Tyler Rick
|
10
|
+
- Alessio Caiazza
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
14
|
|
20
|
-
date: 2012-
|
15
|
+
date: 2012-04-23 00:00:00 Z
|
21
16
|
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
hash: 3
|
45
|
-
segments:
|
46
|
-
- 0
|
47
|
-
version: "0"
|
48
|
-
type: :development
|
49
|
-
version_requirements: *id002
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: activerecord
|
19
|
+
prerelease: false
|
20
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
21
|
+
none: false
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: "0"
|
26
|
+
type: :runtime
|
27
|
+
version_requirements: *id001
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rspec
|
30
|
+
prerelease: false
|
31
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
32
|
+
none: false
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: "0"
|
37
|
+
type: :development
|
38
|
+
version_requirements: *id002
|
50
39
|
description: |-
|
51
40
|
Makes ActiveRecord defer/postpone saving the records you add to an habtm (has_and_belongs_to_many) or has_many
|
52
41
|
association until you call model.save, allowing validation in the style of normal attributes. Additionally you
|
@@ -59,53 +48,53 @@ extensions: []
|
|
59
48
|
extra_rdoc_files: []
|
60
49
|
|
61
50
|
files:
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-
|
78
|
-
- spec
|
79
|
-
- spec/
|
80
|
-
- spec/
|
81
|
-
- spec/
|
82
|
-
- spec/
|
51
|
+
- .gitignore
|
52
|
+
- .travis.yml
|
53
|
+
- CHANGELOG
|
54
|
+
- Rakefile
|
55
|
+
- Readme.markdown
|
56
|
+
- VERSION
|
57
|
+
- deferred_associations.gemspec
|
58
|
+
- gemfiles/ar2.3.14.gemfile
|
59
|
+
- gemfiles/ar2.3.14.gemfile.lock
|
60
|
+
- gemfiles/ar3.2.3.gemfile
|
61
|
+
- gemfiles/ar3.2.3.gemfile.lock
|
62
|
+
- init.rb
|
63
|
+
- lib/array_to_association_wrapper.rb
|
64
|
+
- lib/deferred_associations.rb
|
65
|
+
- lib/has_and_belongs_to_many_with_deferred_save.rb
|
66
|
+
- lib/has_many_with_deferred_save.rb
|
67
|
+
- spec/.gitignore
|
68
|
+
- spec/db/database.yml
|
69
|
+
- spec/db/schema.rb
|
70
|
+
- spec/has_and_belongs_to_many_with_deferred_save_spec.rb
|
71
|
+
- spec/has_many_with_deferred_save_spec.rb
|
72
|
+
- spec/models/chair.rb
|
73
|
+
- spec/models/door.rb
|
74
|
+
- spec/models/person.rb
|
75
|
+
- spec/models/room.rb
|
76
|
+
- spec/models/table.rb
|
77
|
+
- spec/spec_helper.rb
|
83
78
|
homepage: http://github.com/MartinKoerner/deferred_associations
|
84
79
|
licenses: []
|
85
80
|
|
86
81
|
post_install_message:
|
87
|
-
rdoc_options:
|
88
|
-
|
82
|
+
rdoc_options:
|
83
|
+
- --charset=UTF-8
|
89
84
|
require_paths:
|
90
|
-
- lib
|
85
|
+
- lib
|
91
86
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
87
|
none: false
|
93
88
|
requirements:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
segments:
|
98
|
-
- 0
|
99
|
-
version: "0"
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
100
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
93
|
none: false
|
102
94
|
requirements:
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
version: "0"
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: "0"
|
109
98
|
requirements: []
|
110
99
|
|
111
100
|
rubyforge_project:
|
@@ -113,5 +102,13 @@ rubygems_version: 1.8.15
|
|
113
102
|
signing_key:
|
114
103
|
specification_version: 3
|
115
104
|
summary: Makes ActiveRecord defer/postpone habtm or has_many associations
|
116
|
-
test_files:
|
117
|
-
|
105
|
+
test_files:
|
106
|
+
- spec/has_and_belongs_to_many_with_deferred_save_spec.rb
|
107
|
+
- spec/has_many_with_deferred_save_spec.rb
|
108
|
+
- spec/spec_helper.rb
|
109
|
+
- spec/db/schema.rb
|
110
|
+
- spec/models/chair.rb
|
111
|
+
- spec/models/door.rb
|
112
|
+
- spec/models/person.rb
|
113
|
+
- spec/models/room.rb
|
114
|
+
- spec/models/table.rb
|