rhubarb 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rhubarb/classmixins.rb +36 -24
- data/ruby-rhubarb.spec.in +4 -1
- metadata +6 -6
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/lib/rhubarb/classmixins.rb
CHANGED
@@ -213,42 +213,54 @@ module Rhubarb
|
|
213
213
|
|
214
214
|
out_xform = PCM_OUTPUT_TRANSFORMERS[kind]
|
215
215
|
# add accessors
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
216
|
+
|
217
|
+
getp = Proc.new do |cn, ox|
|
218
|
+
define_method get_method_name do
|
219
|
+
freshen
|
220
|
+
return nil unless @tuple
|
221
|
+
lookup_result = (@tuple[cn.to_s])
|
222
|
+
(ox != nil) ? ox.call(lookup_result) : lookup_result
|
223
|
+
end
|
221
224
|
end
|
222
225
|
|
226
|
+
getp.call(cname, out_xform)
|
227
|
+
|
223
228
|
if not rf
|
224
229
|
xform = nil
|
225
230
|
|
226
231
|
xform = PCM_INPUT_TRANSFORMERS[kind]
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
232
|
+
setp = Proc.new do |cn,xf|
|
233
|
+
define_method set_method_name do |arg|
|
234
|
+
new_val = xform ? xform.call(arg) : arg
|
235
|
+
@tuple["#{cn}"] = new_val
|
236
|
+
update cn, new_val
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
setp.call(cname,xform)
|
233
241
|
else
|
234
242
|
# this column references another table; create a set
|
235
243
|
# method that can handle either row objects or row IDs
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
244
|
+
setp = Proc.new do |cn, rf|
|
245
|
+
define_method set_method_name do |arg|
|
246
|
+
freshen
|
247
|
+
|
248
|
+
arg_id = nil
|
249
|
+
|
250
|
+
if arg.class == Fixnum
|
251
|
+
arg_id = arg
|
252
|
+
arg = rf.referent.find arg_id
|
253
|
+
else
|
254
|
+
arg_id = arg.row_id
|
255
|
+
end
|
256
|
+
@tuple["#{cn}"] = arg
|
257
|
+
|
258
|
+
update cn, arg_id
|
246
259
|
end
|
247
|
-
@tuple["#{cname}"] = arg
|
248
|
-
|
249
|
-
update cname, arg_id
|
250
260
|
end
|
251
261
|
|
262
|
+
setp.call(cname, rf)
|
263
|
+
|
252
264
|
# Finally, add appropriate triggers to ensure referential integrity.
|
253
265
|
# If rf has an on_delete trigger, also add the necessary
|
254
266
|
# triggers to cascade deletes.
|
data/ruby-rhubarb.spec.in
CHANGED
@@ -62,7 +62,10 @@ rm -rf %{buildroot}
|
|
62
62
|
|
63
63
|
%changelog
|
64
64
|
|
65
|
-
*
|
65
|
+
* Thu Feb 9 2012 willb <willb@redhat> - 0.4.3-1
|
66
|
+
- More fixes for running under Ruby 1.9
|
67
|
+
|
68
|
+
* Wed Feb 8 2012 willb <willb@redhat> - 0.4.2-1
|
66
69
|
- Fixes for running under Ruby 1.9
|
67
70
|
|
68
71
|
* Tue Oct 11 2011 willb <willb@redhat> - 0.4.1-1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhubarb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &9431840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.2.9
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *9431840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3-ruby
|
27
|
-
requirement: &
|
27
|
+
requirement: &9429080 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 1.2.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *9429080
|
36
36
|
description: Rhubarb is a simple object-graph persistence library implemented as a
|
37
37
|
mixin. It also works with the SPQR library for straightforward object publishing
|
38
38
|
over QMF.
|