tenacity 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -72,7 +72,7 @@ much the same way, supporting many of the same options.
72
72
  new_wheel = Wheel.create
73
73
  car.wheels << new_wheel
74
74
  car.save
75
- car.wheels # [wheel_1, wheel_2, wheel_3, wheel_4]
75
+ car.wheels # [wheel_1, wheel_2, wheel_3, new_wheel]
76
76
 
77
77
 
78
78
  == Additional Usage Details
data/history.txt CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.5.1
2
+
3
+ * Bug fixes
4
+
5
+ * Should not re-load the source of the association when source.target(true)
6
+ is called.
7
+
1
8
  == 0.5.0
2
9
 
3
10
  * Major enhancements
@@ -54,7 +54,6 @@ module Tenacity
54
54
  end
55
55
 
56
56
  def get_associate(association, params)
57
- _t_reload unless id.nil?
58
57
  force_reload = params.first unless params.empty?
59
58
  value = create_proxy(instance_variable_get(_t_ivar_name(association)), association)
60
59
  if value.nil? || force_reload
@@ -1,3 +1,3 @@
1
1
  module Tenacity
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -11,14 +11,12 @@ class BelongsToTest < Test::Unit::TestCase
11
11
 
12
12
  should "memoize the association" do
13
13
  assert_equal @car, @wheel.active_record_car
14
+ assert_nil @car.prop
14
15
 
15
- other_car = ActiveRecordCar.create
16
- assert_equal @car, MongoMapperWheel.find(@wheel.id).active_record_car
17
- MongoMapperWheel.update(@wheel.id, :active_record_car => other_car)
18
- assert_equal other_car, MongoMapperWheel.find(@wheel.id).active_record_car
16
+ ActiveRecordCar.update(@car.id, {:prop => 'abc123'})
19
17
 
20
- assert_equal @car, @wheel.active_record_car
21
- assert_equal other_car, @wheel.active_record_car(true)
18
+ assert_nil @wheel.active_record_car.prop
19
+ assert_equal 'abc123', @wheel.active_record_car(true).prop
22
20
  end
23
21
 
24
22
  should "be able to specify the class name of the associated class" do
@@ -6,6 +6,7 @@ ActiveRecord::Base.establish_connection(
6
6
 
7
7
  ActiveRecord::Schema.define :version => 0 do
8
8
  create_table :active_record_cars, :force => true do |t|
9
+ t.string :prop
9
10
  end
10
11
 
11
12
  create_table :active_record_engines, :force => true do |t|
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenacity
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 9
4
5
  prerelease:
5
- version: 0.5.0
6
+ segments:
7
+ - 0
8
+ - 5
9
+ - 1
10
+ version: 0.5.1
6
11
  platform: ruby
7
12
  authors:
8
13
  - John Wood
@@ -10,228 +15,327 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-06-14 00:00:00 -05:00
18
+ date: 2011-07-05 00:00:00 -05:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
17
22
  name: activesupport
23
+ prerelease: false
24
+ type: :runtime
18
25
  requirement: &id001 !ruby/object:Gem::Requirement
19
26
  none: false
20
27
  requirements:
21
28
  - - ">="
22
29
  - !ruby/object:Gem::Version
30
+ hash: 5
31
+ segments:
32
+ - 2
33
+ - 3
23
34
  version: "2.3"
24
- type: :runtime
25
- prerelease: false
26
35
  version_requirements: *id001
27
36
  - !ruby/object:Gem::Dependency
28
37
  name: bundler
38
+ prerelease: false
39
+ type: :development
29
40
  requirement: &id002 !ruby/object:Gem::Requirement
30
41
  none: false
31
42
  requirements:
32
43
  - - ~>
33
44
  - !ruby/object:Gem::Version
45
+ hash: 23
46
+ segments:
47
+ - 1
48
+ - 0
49
+ - 0
34
50
  version: 1.0.0
35
- type: :development
36
- prerelease: false
37
51
  version_requirements: *id002
38
52
  - !ruby/object:Gem::Dependency
39
53
  name: rake
54
+ prerelease: false
55
+ type: :development
40
56
  requirement: &id003 !ruby/object:Gem::Requirement
41
57
  none: false
42
58
  requirements:
43
59
  - - ~>
44
60
  - !ruby/object:Gem::Version
61
+ hash: 49
62
+ segments:
63
+ - 0
64
+ - 8
65
+ - 7
45
66
  version: 0.8.7
46
- type: :development
47
- prerelease: false
48
67
  version_requirements: *id003
49
68
  - !ruby/object:Gem::Dependency
50
69
  name: rcov
70
+ prerelease: false
71
+ type: :development
51
72
  requirement: &id004 !ruby/object:Gem::Requirement
52
73
  none: false
53
74
  requirements:
54
75
  - - ~>
55
76
  - !ruby/object:Gem::Version
77
+ hash: 41
78
+ segments:
79
+ - 0
80
+ - 9
81
+ - 9
56
82
  version: 0.9.9
57
- type: :development
58
- prerelease: false
59
83
  version_requirements: *id004
60
84
  - !ruby/object:Gem::Dependency
61
85
  name: shoulda
86
+ prerelease: false
87
+ type: :development
62
88
  requirement: &id005 !ruby/object:Gem::Requirement
63
89
  none: false
64
90
  requirements:
65
91
  - - ~>
66
92
  - !ruby/object:Gem::Version
93
+ hash: 37
94
+ segments:
95
+ - 2
96
+ - 11
97
+ - 3
67
98
  version: 2.11.3
68
- type: :development
69
- prerelease: false
70
99
  version_requirements: *id005
71
100
  - !ruby/object:Gem::Dependency
72
101
  name: mocha
102
+ prerelease: false
103
+ type: :development
73
104
  requirement: &id006 !ruby/object:Gem::Requirement
74
105
  none: false
75
106
  requirements:
76
107
  - - ~>
77
108
  - !ruby/object:Gem::Version
109
+ hash: 47
110
+ segments:
111
+ - 0
112
+ - 9
113
+ - 10
78
114
  version: 0.9.10
79
- type: :development
80
- prerelease: false
81
115
  version_requirements: *id006
82
116
  - !ruby/object:Gem::Dependency
83
117
  name: yard
118
+ prerelease: false
119
+ type: :development
84
120
  requirement: &id007 !ruby/object:Gem::Requirement
85
121
  none: false
86
122
  requirements:
87
123
  - - ~>
88
124
  - !ruby/object:Gem::Version
125
+ hash: 15
126
+ segments:
127
+ - 0
128
+ - 6
129
+ - 4
89
130
  version: 0.6.4
90
- type: :development
91
- prerelease: false
92
131
  version_requirements: *id007
93
132
  - !ruby/object:Gem::Dependency
94
133
  name: sqlite3-ruby
134
+ prerelease: false
135
+ type: :development
95
136
  requirement: &id008 !ruby/object:Gem::Requirement
96
137
  none: false
97
138
  requirements:
98
139
  - - ~>
99
140
  - !ruby/object:Gem::Version
141
+ hash: 25
142
+ segments:
143
+ - 1
144
+ - 3
145
+ - 1
100
146
  version: 1.3.1
101
- type: :development
102
- prerelease: false
103
147
  version_requirements: *id008
104
148
  - !ruby/object:Gem::Dependency
105
149
  name: activerecord
150
+ prerelease: false
151
+ type: :development
106
152
  requirement: &id009 !ruby/object:Gem::Requirement
107
153
  none: false
108
154
  requirements:
109
155
  - - ~>
110
156
  - !ruby/object:Gem::Version
157
+ hash: 7
158
+ segments:
159
+ - 3
160
+ - 0
161
+ - 0
111
162
  version: 3.0.0
112
- type: :development
113
- prerelease: false
114
163
  version_requirements: *id009
115
164
  - !ruby/object:Gem::Dependency
116
165
  name: datamapper
166
+ prerelease: false
167
+ type: :development
117
168
  requirement: &id010 !ruby/object:Gem::Requirement
118
169
  none: false
119
170
  requirements:
120
171
  - - ~>
121
172
  - !ruby/object:Gem::Version
173
+ hash: 19
174
+ segments:
175
+ - 1
176
+ - 0
177
+ - 2
122
178
  version: 1.0.2
123
- type: :development
124
- prerelease: false
125
179
  version_requirements: *id010
126
180
  - !ruby/object:Gem::Dependency
127
181
  name: dm-sqlite-adapter
182
+ prerelease: false
183
+ type: :development
128
184
  requirement: &id011 !ruby/object:Gem::Requirement
129
185
  none: false
130
186
  requirements:
131
187
  - - ~>
132
188
  - !ruby/object:Gem::Version
189
+ hash: 19
190
+ segments:
191
+ - 1
192
+ - 0
193
+ - 2
133
194
  version: 1.0.2
134
- type: :development
135
- prerelease: false
136
195
  version_requirements: *id011
137
196
  - !ruby/object:Gem::Dependency
138
197
  name: sequel
198
+ prerelease: false
199
+ type: :development
139
200
  requirement: &id012 !ruby/object:Gem::Requirement
140
201
  none: false
141
202
  requirements:
142
203
  - - ~>
143
204
  - !ruby/object:Gem::Version
205
+ hash: 75
206
+ segments:
207
+ - 3
208
+ - 19
209
+ - 0
144
210
  version: 3.19.0
145
- type: :development
146
- prerelease: false
147
211
  version_requirements: *id012
148
212
  - !ruby/object:Gem::Dependency
149
213
  name: mongo_mapper
214
+ prerelease: false
215
+ type: :development
150
216
  requirement: &id013 !ruby/object:Gem::Requirement
151
217
  none: false
152
218
  requirements:
153
219
  - - ~>
154
220
  - !ruby/object:Gem::Version
221
+ hash: 59
222
+ segments:
223
+ - 0
224
+ - 9
225
+ - 0
155
226
  version: 0.9.0
156
- type: :development
157
- prerelease: false
158
227
  version_requirements: *id013
159
228
  - !ruby/object:Gem::Dependency
160
229
  name: bson_ext
230
+ prerelease: false
231
+ type: :development
161
232
  requirement: &id014 !ruby/object:Gem::Requirement
162
233
  none: false
163
234
  requirements:
164
235
  - - ~>
165
236
  - !ruby/object:Gem::Version
237
+ hash: 27
238
+ segments:
239
+ - 1
240
+ - 3
241
+ - 0
166
242
  version: 1.3.0
167
- type: :development
168
- prerelease: false
169
243
  version_requirements: *id014
170
244
  - !ruby/object:Gem::Dependency
171
245
  name: mongoid
246
+ prerelease: false
247
+ type: :development
172
248
  requirement: &id015 !ruby/object:Gem::Requirement
173
249
  none: false
174
250
  requirements:
175
251
  - - ~>
176
252
  - !ruby/object:Gem::Version
253
+ hash: 15
254
+ segments:
255
+ - 2
256
+ - 0
257
+ - 0
177
258
  version: 2.0.0
178
- type: :development
179
- prerelease: false
180
259
  version_requirements: *id015
181
260
  - !ruby/object:Gem::Dependency
182
261
  name: couchrest
262
+ prerelease: false
263
+ type: :development
183
264
  requirement: &id016 !ruby/object:Gem::Requirement
184
265
  none: false
185
266
  requirements:
186
267
  - - ~>
187
268
  - !ruby/object:Gem::Version
269
+ hash: 23
270
+ segments:
271
+ - 1
272
+ - 0
273
+ - 0
188
274
  version: 1.0.0
189
- type: :development
190
- prerelease: false
191
275
  version_requirements: *id016
192
276
  - !ruby/object:Gem::Dependency
193
277
  name: couchrest_model
278
+ prerelease: false
279
+ type: :development
194
280
  requirement: &id017 !ruby/object:Gem::Requirement
195
281
  none: false
196
282
  requirements:
197
283
  - - ~>
198
284
  - !ruby/object:Gem::Version
285
+ hash: 23
286
+ segments:
287
+ - 1
288
+ - 0
289
+ - 0
199
290
  version: 1.0.0
200
- type: :development
201
- prerelease: false
202
291
  version_requirements: *id017
203
292
  - !ruby/object:Gem::Dependency
204
293
  name: ripple
294
+ prerelease: false
295
+ type: :development
205
296
  requirement: &id018 !ruby/object:Gem::Requirement
206
297
  none: false
207
298
  requirements:
208
299
  - - ~>
209
300
  - !ruby/object:Gem::Version
301
+ hash: 63
302
+ segments:
303
+ - 0
304
+ - 9
305
+ - 2
210
306
  version: 0.9.2
211
- type: :development
212
- prerelease: false
213
307
  version_requirements: *id018
214
308
  - !ruby/object:Gem::Dependency
215
309
  name: toystore
310
+ prerelease: false
311
+ type: :development
216
312
  requirement: &id019 !ruby/object:Gem::Requirement
217
313
  none: false
218
314
  requirements:
219
315
  - - ~>
220
316
  - !ruby/object:Gem::Version
317
+ hash: 63
318
+ segments:
319
+ - 0
320
+ - 8
321
+ - 0
221
322
  version: 0.8.0
222
- type: :development
223
- prerelease: false
224
323
  version_requirements: *id019
225
324
  - !ruby/object:Gem::Dependency
226
325
  name: adapter-mongo
326
+ prerelease: false
327
+ type: :development
227
328
  requirement: &id020 !ruby/object:Gem::Requirement
228
329
  none: false
229
330
  requirements:
230
331
  - - ~>
231
332
  - !ruby/object:Gem::Version
333
+ hash: 15
334
+ segments:
335
+ - 0
336
+ - 5
337
+ - 2
232
338
  version: 0.5.2
233
- type: :development
234
- prerelease: false
235
339
  version_requirements: *id020
236
340
  description: Tenacity provides a database client independent way of specifying simple relationships between models backed by different databases.
237
341
  email:
@@ -352,7 +456,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
352
456
  requirements:
353
457
  - - ">="
354
458
  - !ruby/object:Gem::Version
355
- hash: -1447988484574051328
459
+ hash: 3
356
460
  segments:
357
461
  - 0
358
462
  version: "0"
@@ -361,6 +465,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
361
465
  requirements:
362
466
  - - ">="
363
467
  - !ruby/object:Gem::Version
468
+ hash: 23
469
+ segments:
470
+ - 1
471
+ - 3
472
+ - 6
364
473
  version: 1.3.6
365
474
  requirements: []
366
475