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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e20a75456b2321ccb733f539cefc23d9c84952c
4
- data.tar.gz: b9324027feb7cb1721163f4d922b906302c4b6c7
3
+ metadata.gz: 0d96239f31ca767d2918a3b4e51cc8226d3a37fb
4
+ data.tar.gz: 033619c8b37010dba8e942f24ce2af43a4c824e4
5
5
  SHA512:
6
- metadata.gz: f65b8663f71586026030076b26c40916bf44e52bf3b0c51fb546c0388808696496cd8b4a904d733a889fcfff90daa081dd772c932b65e28e2b343607fa8f3375
7
- data.tar.gz: 5df50d34eb25ac11fcf1072c62208927361ae2be1085d4d0031c77f0509f8f77f18db1e9dc5637d477246d41bc4100ee9ea1a6821455067c7c29439792d0efb0
6
+ metadata.gz: 162409886d4a29b01863f3526cc10843d6b709c415c004714d06f199e18657537896916f36a295ad50f9d027435d7d28a4b8d5088fd5d495f9a4b36c7c441287
7
+ data.tar.gz: 5c4fce288c1d697adfd43e82c38ee6a2a2e71f23afff68590576c55972db356ce2644ae5b09dcc9b3192d4c63f4a635be137b8da115f48bc25d162ba2efc8e5a
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
- a = child_schema[/[^\[]+(?=\])/].split(',')
89
+ if params.length > 0 then
90
+ a = child_schema[/[^\[]+(?=\])/].split(',')
90
91
 
91
- summary = record.root.element('summary')
92
- a.each do |field_name|
93
- field = summary.element(field_name.strip)
94
- field.text = params[field_name.strip.to_sym]
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.1
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-22 00:00:00.000000000 Z
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