polyrex-createobject 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/polyrex-createobject.rb +8 -6
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d96239f31ca767d2918a3b4e51cc8226d3a37fb
|
4
|
+
data.tar.gz: 033619c8b37010dba8e942f24ce2af43a4c824e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 162409886d4a29b01863f3526cc10843d6b709c415c004714d06f199e18657537896916f36a295ad50f9d027435d7d28a4b8d5088fd5d495f9a4b36c7c441287
|
7
|
+
data.tar.gz: 5c4fce288c1d697adfd43e82c38ee6a2a2e71f23afff68590576c55972db356ce2644ae5b09dcc9b3192d4c63f4a635be137b8da115f48bc25d162ba2efc8e5a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-createobject.rb
CHANGED
@@ -29,7 +29,7 @@ class PolyrexCreateObject
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
self.instance_eval " def #{@obj.name.downcase}(h, id=@@id, &blk)
|
32
|
+
self.instance_eval " def #{@obj.name.downcase}(h={}, id=@@id, &blk)
|
33
33
|
|
34
34
|
new_parent = create_node(@parent_node, @schema, h, id).element('records')
|
35
35
|
|
@@ -86,12 +86,14 @@ class PolyrexCreateObject
|
|
86
86
|
|
87
87
|
record.root.add_attribute({'id' => @@id.to_s.clone})
|
88
88
|
|
89
|
-
|
89
|
+
if params.length > 0 then
|
90
|
+
a = child_schema[/[^\[]+(?=\])/].split(',')
|
90
91
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
92
|
+
summary = record.root.element('summary')
|
93
|
+
a.each do |field_name|
|
94
|
+
field = summary.element(field_name.strip)
|
95
|
+
field.text = params[field_name.strip.to_sym]
|
96
|
+
end
|
95
97
|
end
|
96
98
|
|
97
99
|
parent_node.add record.root
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex-createobject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
f3O5lCaUfMDZbRHRyvXjy/4PFRQKLr6ZLbpQN+dWceS6/82/5xWEL/7Bo/86R5xN
|
32
32
|
JL6pGH//inbMWQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-06-
|
34
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: polyrex-schema
|
@@ -85,3 +85,4 @@ signing_key:
|
|
85
85
|
specification_version: 4
|
86
86
|
summary: polyrex-createobject
|
87
87
|
test_files: []
|
88
|
+
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|