deferred_associations 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Readme.markdown +4 -3
- data/VERSION +1 -1
- data/deferred_associations.gemspec +4 -5
- data/init.rb +1 -3
- data/lib/deferred_associations.rb +3 -0
- data/lib/has_and_belongs_to_many_with_deferred_save.rb +0 -3
- metadata +72 -56
- data/install.rb +0 -1
- data/uninstall.rb +0 -1
data/Readme.markdown
CHANGED
@@ -57,10 +57,11 @@ http://github.com/MartinKoerner/deferred_associations/issues
|
|
57
57
|
History
|
58
58
|
======
|
59
59
|
|
60
|
-
Most of the code for the habtm association was written by
|
60
|
+
Most of the code for the habtm association was written by TylerRick for his gem [has_and_belongs_to_many_with_deferred_save](https://github.com/TylerRick/has_and_belongs_to_many_with_deferred_save)
|
61
61
|
Mainly, I changed two things:
|
62
|
-
|
63
|
-
|
62
|
+
|
63
|
+
* added ActiveRecord 3 compatibility
|
64
|
+
* removed singleton methods, because they interfere with caching
|
64
65
|
|
65
66
|
License
|
66
67
|
=======
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
@@ -5,11 +5,11 @@
|
|
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.3"
|
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-03-
|
12
|
+
s.date = "2012-03-19"
|
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 = [
|
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
"VERSION",
|
20
20
|
"deferred_associations.gemspec",
|
21
21
|
"init.rb",
|
22
|
-
"install.rb",
|
23
22
|
"lib/array_to_association_wrapper.rb",
|
23
|
+
"lib/deferred_associations.rb",
|
24
24
|
"lib/has_and_belongs_to_many_with_deferred_save.rb",
|
25
25
|
"lib/has_many_with_deferred_save.rb",
|
26
26
|
"spec/.gitignore",
|
@@ -33,8 +33,7 @@ Gem::Specification.new do |s|
|
|
33
33
|
"spec/models/person.rb",
|
34
34
|
"spec/models/room.rb",
|
35
35
|
"spec/models/table.rb",
|
36
|
-
"spec/spec_helper.rb"
|
37
|
-
"uninstall.rb"
|
36
|
+
"spec/spec_helper.rb"
|
38
37
|
]
|
39
38
|
s.homepage = "http://github.com/MartinKoerner/deferred_associations"
|
40
39
|
s.require_paths = ["lib"]
|
data/init.rb
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
require
|
2
|
-
require File.join(File.dirname(__FILE__), 'lib/has_and_belongs_to_many_with_deferred_save')
|
3
|
-
require File.join(File.dirname(__FILE__), 'lib/has_many_with_deferred_save')
|
1
|
+
require 'deferred_associations'
|
@@ -1,6 +1,3 @@
|
|
1
|
-
# To do: make it work to call this twice in a class. Currently that probably wouldn't work, because it would try to alias methods to existing names...
|
2
|
-
# Note: before_save must be defined *before* including this module, not after.
|
3
|
-
|
4
1
|
module ActiveRecord
|
5
2
|
module Associations
|
6
3
|
module ClassMethods
|
metadata
CHANGED
@@ -1,41 +1,52 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deferred_associations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 13
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 3
|
10
|
+
version: 0.5.3
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
- Martin Koerner
|
14
|
+
- Tyler Rick
|
15
|
+
- Alessio Caiazza
|
11
16
|
autorequire:
|
12
17
|
bindir: bin
|
13
18
|
cert_chain: []
|
14
19
|
|
15
|
-
date: 2012-03-
|
20
|
+
date: 2012-03-19 00:00:00 Z
|
16
21
|
dependencies:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: activerecord
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
39
50
|
description: |-
|
40
51
|
Makes ActiveRecord defer/postpone saving the records you add to an habtm (has_and_belongs_to_many) or has_many
|
41
52
|
association until you call model.save, allowing validation in the style of normal attributes. Additionally you
|
@@ -48,28 +59,27 @@ extensions: []
|
|
48
59
|
extra_rdoc_files: []
|
49
60
|
|
50
61
|
files:
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
- uninstall.rb
|
62
|
+
- CHANGELOG
|
63
|
+
- Rakefile
|
64
|
+
- Readme.markdown
|
65
|
+
- VERSION
|
66
|
+
- deferred_associations.gemspec
|
67
|
+
- init.rb
|
68
|
+
- lib/array_to_association_wrapper.rb
|
69
|
+
- lib/deferred_associations.rb
|
70
|
+
- lib/has_and_belongs_to_many_with_deferred_save.rb
|
71
|
+
- lib/has_many_with_deferred_save.rb
|
72
|
+
- spec/.gitignore
|
73
|
+
- spec/db/database.yml
|
74
|
+
- spec/db/schema.rb
|
75
|
+
- spec/has_and_belongs_to_many_with_deferred_save_spec.rb
|
76
|
+
- spec/has_many_with_deferred_save_spec.rb
|
77
|
+
- spec/models/chair.rb
|
78
|
+
- spec/models/door.rb
|
79
|
+
- spec/models/person.rb
|
80
|
+
- spec/models/room.rb
|
81
|
+
- spec/models/table.rb
|
82
|
+
- spec/spec_helper.rb
|
73
83
|
homepage: http://github.com/MartinKoerner/deferred_associations
|
74
84
|
licenses: []
|
75
85
|
|
@@ -77,19 +87,25 @@ post_install_message:
|
|
77
87
|
rdoc_options: []
|
78
88
|
|
79
89
|
require_paths:
|
80
|
-
|
90
|
+
- lib
|
81
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
92
|
none: false
|
83
93
|
requirements:
|
84
|
-
|
85
|
-
|
86
|
-
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
hash: 3
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
87
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
101
|
none: false
|
89
102
|
requirements:
|
90
|
-
|
91
|
-
|
92
|
-
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
version: "0"
|
93
109
|
requirements: []
|
94
110
|
|
95
111
|
rubyforge_project:
|
data/install.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# Install hook code here
|
data/uninstall.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# Uninstall hook code here
|