snusnu-dm-accepts_nested_attributes 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,233 @@
1
+ [b621475 | Wed May 13 04:29:30 UTC 2009] snusnu <gamsnjaga@gmail.com>
2
+
3
+ * bumped version to 0.0.6.
4
+
5
+ [91923dd | Wed May 13 04:18:49 UTC 2009] snusnu <gamsnjaga@gmail.com>
6
+
7
+ * respect dm-is-remixable (thx Asher Van Brunt for pointing this out)
8
+
9
+ Since class_inheritable_accessor is not available on Module, dana
10
+ bailed out for dm-is-remixable. This should hopefully fix this issue.
11
+
12
+ [ef8e1ca | Mon May 11 00:17:43 UTC 2009] snusnu <gamsnjaga@gmail.com>
13
+
14
+ * added CHANGELOG rake task and file (taken from manveru/ramaze)
15
+
16
+ [52c55bc | Wed Apr 29 04:50:32 UTC 2009] snusnu <gamsnjaga@gmail.com>
17
+
18
+ * bump tiny version for extlib/hook compatible gem.
19
+
20
+ [c34edae | Wed Apr 29 04:46:43 UTC 2009] snusnu <gamsnjaga@gmail.com>
21
+
22
+ * now compatible with extlib/hook. (last commit was missing files)
23
+
24
+ [8e42229 | Wed Apr 29 04:34:20 UTC 2009] snusnu <gamsnjaga@gmail.com>
25
+
26
+ * workaround extlib/hook not respecting hooked but redefined methods.
27
+
28
+ [578e658 | Wed Apr 29 02:46:56 UTC 2009] snusnu <gamsnjaga@gmail.com>
29
+
30
+ * only alter common DataMapper namespace if really necessary.
31
+
32
+ [7da8378 | Wed Apr 29 01:41:07 UTC 2009] snusnu <gamsnjaga@gmail.com>
33
+
34
+ * less brittle specs with no more auto_migrations before(:each)
35
+
36
+ [f2a2fcb | Wed Apr 29 01:38:00 UTC 2009] snusnu <gamsnjaga@gmail.com>
37
+
38
+ * updated Manifest and gemspec to reflect spec cleanings
39
+
40
+ [dd0a4a8 | Fri Apr 24 17:29:41 UTC 2009] snusnu <gamsnjaga@gmail.com>
41
+
42
+ * removed fixtures and specs for customized has(n, :through) associations.
43
+
44
+ It makes no sense to spec all different options for the association
45
+ macros in integration specs. Rather, it should be specced once and
46
+ for all (in unit specs) that dm-accepts_nested_attributes infers the
47
+ right kind of associations. Think about it, then do it!
48
+
49
+ [ac7c008 | Fri Apr 24 17:27:12 UTC 2009] snusnu <gamsnjaga@gmail.com>
50
+
51
+ * be explicit about before(:each)
52
+
53
+ [7a56d17 | Fri Apr 24 17:26:35 UTC 2009] snusnu <gamsnjaga@gmail.com>
54
+
55
+ * removed commented code
56
+
57
+ [03bc5c2 | Fri Apr 24 17:25:25 UTC 2009] snusnu <gamsnjaga@gmail.com>
58
+
59
+ * don't auto_migrate! before(:each) spec run (takes half the time)
60
+
61
+ [b6f5bf5 | Tue Apr 21 14:52:22 UTC 2009] snusnu <gamsnjaga@gmail.com>
62
+
63
+ * removed debugging outputs
64
+
65
+ [001c791 | Sat Apr 18 14:31:35 UTC 2009] snusnu <gamsnjaga@gmail.com>
66
+
67
+ * added red specs for transactions. make them green.
68
+
69
+ [9852f03 | Sat Apr 18 03:07:04 UTC 2009] snusnu <gamsnjaga@gmail.com>
70
+
71
+ * formatting
72
+
73
+ [3fceda3 | Sat Apr 18 02:34:54 UTC 2009] snusnu <gamsnjaga@gmail.com>
74
+
75
+ * no need to require gem dependencies in spec_helper.rb
76
+
77
+ [2118726 | Wed Apr 15 18:57:22 UTC 2009] snusnu <gamsnjaga@gmail.com>
78
+
79
+ * initial support for wrapping every save inside a transaction.
80
+
81
+ * this probably needs more thinking, also funny is that specs if
82
+ called from textmate rspec bundle all pass, whereas when called
83
+ from the shell, some of them (only has(1)) break.
84
+ investigate this
85
+ * dbussink also suggested it might be a good idea to add an option
86
+ that allows to turn transaction usage off.
87
+ * also, look for some api to infer wether a backend supports
88
+ (nested) transactions or not. we could default to true if it does,
89
+ but still leave the option to turn it off nevertheless.
90
+
91
+ [abdc211 | Wed Apr 15 14:18:07 UTC 2009] snusnu <gamsnjaga@gmail.com>
92
+
93
+ * added sanitize_nested_attributes to provide a hook for doing this.
94
+
95
+ * see http://is.gd/sz2d for the motivation behind this new method
96
+
97
+ [158b6ea | Wed Apr 15 02:50:38 UTC 2009] snusnu <gamsnjaga@gmail.com>
98
+
99
+ * fixed broken generated gemspec. find out why this happens.
100
+
101
+ [5603c57 | Wed Apr 15 02:49:54 UTC 2009] snusnu <gamsnjaga@gmail.com>
102
+
103
+ * updated manifest to include new specs from integration branch
104
+
105
+ [4c5e656 | Tue Apr 14 18:25:02 UTC 2009] Rupert Voelcker <rupert@rupespad.com>
106
+
107
+ * added #{association_name}_attributes reader
108
+
109
+ Signed-off-by: Martin Gamsjaeger <gamsnjaga@gmail.com>
110
+
111
+ [6d26213 | Tue Apr 14 03:09:34 UTC 2009] Rupert Voelcker <rupert@rupespad.com>
112
+
113
+ * added associated attributes reader (doesn't do anything yet)
114
+
115
+ Signed-off-by: Martin Gamsjaeger <gamsnjaga@gmail.com>
116
+
117
+ [32dcfe8 | Wed Apr 15 02:20:00 UTC 2009] snusnu <gamsnjaga@gmail.com>
118
+
119
+ * initial support for dm-validations
120
+
121
+ * this desperately needs specs! currently only basic not null
122
+ constraint specs pass (well, there are no other).
123
+ * saving a resource along with its associations should always
124
+ be done inside a transaction! figure out how to do that!
125
+ * validation errors from associated resources should be copied
126
+ to the parent resource. this currently happens, but it's not
127
+ specced at all so consider the behavior undefined.
128
+
129
+ [fef1578 | Wed Apr 15 01:37:14 UTC 2009] snusnu <gamsnjaga@gmail.com>
130
+
131
+ * initialize dm logger before setting up dm adapter
132
+
133
+ [8d7ede8 | Wed Apr 15 01:35:50 UTC 2009] snusnu <gamsnjaga@gmail.com>
134
+
135
+ * allow to call puth helper like puts without parameter
136
+
137
+ [4e204a1 | Tue Apr 14 01:19:30 UTC 2009] Rupert Voelcker <rupert@rupespad.com>
138
+
139
+ * now works with 'renamed' has many relationships
140
+
141
+ Signed-off-by: Martin Gamsjaeger <gamsnjaga@gmail.com>
142
+
143
+ [8f20aad | Mon Apr 13 00:33:40 UTC 2009] snusnu <gamsnjaga@gmail.com>
144
+
145
+ * build that gem\!
146
+
147
+ [cc02415 | Sun Apr 12 22:57:26 UTC 2009] snusnu <gamsnjaga@gmail.com>
148
+
149
+ * updated manifest
150
+
151
+ [d0f0dce | Sun Apr 12 22:57:08 UTC 2009] snusnu <gamsnjaga@gmail.com>
152
+
153
+ * use constants from Rakefile in tasks/install
154
+
155
+ [b45ea52 | Fri Apr 10 16:12:11 UTC 2009] snusnu <gamsnjaga@gmail.com>
156
+
157
+ * added get_#{association_name} helper for (many/one)_to_one associations.
158
+
159
+ This is mainly to support common usecases in fields_for. This method
160
+ will return a new record if the associated object is nil at the time
161
+ it is accessed, and the associated object otherwise. This should help
162
+ fields_for to render the right id and name attributes for the input
163
+ fields. This method is not generated for (one/many)_to_many associations
164
+ since these return an Collection anyway and this allow to call build
165
+ or get on it. A possible use case would look something like this:
166
+
167
+ <% fields_for @location.get_geo_point do %>
168
+ ...
169
+ <% end =%>
170
+
171
+ The whole purpose of this commit is to provide something to fields_for
172
+ that is guaranteed to not be nil.
173
+
174
+ [8acb396 | Fri Apr 10 02:28:48 UTC 2009] snusnu <gamsnjaga@gmail.com>
175
+
176
+ * no .rb extension in require statements
177
+
178
+ [bd6dfe6 | Fri Apr 10 01:52:45 UTC 2009] snusnu <gamsnjaga@gmail.com>
179
+
180
+ * added passing specs for reject_if procs
181
+
182
+ [2a1d309 | Thu Apr 09 19:55:52 UTC 2009] snusnu <gamsnjaga@gmail.com>
183
+
184
+ * updated README
185
+
186
+ [b0fcf44 | Thu Apr 09 19:52:14 UTC 2009] snusnu <gamsnjaga@gmail.com>
187
+
188
+ * update now works for has(n, :through) -> all works now
189
+
190
+ [a8ba5f6 | Thu Apr 09 19:44:48 UTC 2009] snusnu <gamsnjaga@gmail.com>
191
+
192
+ * destroy now works for has(n, :through)
193
+
194
+ [2b5d583 | Thu Apr 09 19:11:35 UTC 2009] snusnu <gamsnjaga@gmail.com>
195
+
196
+ * explain what's going on when creating a new has(n, :through) child entry
197
+
198
+ [b8a4be4 | Thu Apr 09 18:59:44 UTC 2009] snusnu <gamsnjaga@gmail.com>
199
+
200
+ * updated README to reflect latest changes
201
+
202
+ [1efbb4c | Thu Apr 09 18:56:27 UTC 2009] snusnu <gamsnjaga@gmail.com>
203
+
204
+ * create now works for has(n, :through)
205
+
206
+ [71d3d73 | Thu Apr 09 16:07:41 UTC 2009] snusnu <gamsnjaga@gmail.com>
207
+
208
+ * added a few spec helpers
209
+
210
+ [2783be5 | Thu Apr 09 03:06:59 UTC 2009] snusnu <gamsnjaga@gmail.com>
211
+
212
+ * more robust (backwards compatible) monkeypatch.
213
+
214
+ [c49516e | Thu Apr 09 01:42:23 UTC 2009] snusnu <gamsnjaga@gmail.com>
215
+
216
+ * README cosmetics
217
+
218
+ [974d7b5 | Thu Apr 09 01:38:01 UTC 2009] snusnu <gamsnjaga@gmail.com>
219
+
220
+ * Updated README to reflect the latest status.
221
+
222
+ [69eb9ff | Thu Apr 09 01:28:10 UTC 2009] snusnu <gamsnjaga@gmail.com>
223
+
224
+ * reworked association saving. all except has(n,:through) work now
225
+
226
+ [1200617 | Wed Apr 08 18:57:58 UTC 2009] snusnu <gamsnjaga@gmail.com>
227
+
228
+ * really minor README cosmetics
229
+
230
+ [bda2607 | Wed Apr 08 17:44:34 UTC 2009] snusnu <gamsnjaga@gmail.com>
231
+
232
+ * Push it
233
+
@@ -5,6 +5,7 @@ Manifest.txt
5
5
  README.textile
6
6
  Rakefile
7
7
  TODO
8
+ CHANGELOG
8
9
  lib/dm-accepts_nested_attributes.rb
9
10
  lib/dm-accepts_nested_attributes/association_proxies.rb
10
11
  lib/dm-accepts_nested_attributes/association_validation.rb
@@ -3,9 +3,8 @@ module DataMapper
3
3
 
4
4
  module ClassMethods
5
5
 
6
- def self.extended(base)
7
- base.class_inheritable_accessor :autosave_associations
8
- base.autosave_associations = {}
6
+ def autosave_associations
7
+ @autosave_associations ||= {}
9
8
  end
10
9
 
11
10
  # Defines an attributes reader and writer for the specified association(s).
@@ -1,7 +1,7 @@
1
1
  module DataMapper
2
2
  module NestedAttributes
3
3
 
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
 
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snusnu-dm-accepts_nested_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Martin Gamsj\xC3\xA4ger"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-29 00:00:00 -07:00
12
+ date: 2009-05-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -50,6 +50,7 @@ files:
50
50
  - README.textile
51
51
  - Rakefile
52
52
  - TODO
53
+ - CHANGELOG
53
54
  - lib/dm-accepts_nested_attributes.rb
54
55
  - lib/dm-accepts_nested_attributes/association_proxies.rb
55
56
  - lib/dm-accepts_nested_attributes/association_validation.rb
@@ -74,7 +75,7 @@ files:
74
75
  - tasks/hoe.rb
75
76
  - tasks/install.rb
76
77
  - tasks/spec.rb
77
- has_rdoc: true
78
+ has_rdoc: false
78
79
  homepage: http://github.com/snusnu/dm-accepts_nested_attributes/tree/master
79
80
  post_install_message:
80
81
  rdoc_options:
@@ -99,7 +100,7 @@ requirements: []
99
100
  rubyforge_project: dm-accepts_nested_attributes
100
101
  rubygems_version: 1.2.0
101
102
  signing_key:
102
- specification_version: 2
103
+ specification_version: 3
103
104
  summary: A DataMapper plugin that adds the possibility to perform nested model attribute assignment
104
105
  test_files: []
105
106