dynarex 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dynarex.rb +5 -2
  2. metadata +2 -2
@@ -639,10 +639,13 @@ EOF
639
639
 
640
640
  created = row.attributes[:created] if row.attributes[:created]
641
641
  last_modified = row.attributes[:last_modified] if row.attributes[:last_modified]
642
- body = row.xpath('*').inject({}) do |r,node|
642
+
643
+ fields = @doc.root.text('summary/schema')[/\(.*\)/].scan(/\w+/)
644
+ body = fields.inject({}) do |r,field|
645
+ node = row.element field
643
646
  text = node.text.unescape
644
647
  r.merge node.name.to_sym => (text[/^--- |^\[/] ? YAML.load(text) : text)
645
- end
648
+ end
646
649
 
647
650
  result.merge body[@default_key.to_sym] => {id: id, created: created, last_modified: last_modified, body: body}
648
651
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.6
5
+ version: 1.2.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-11-15 00:00:00 Z
13
+ date: 2012-11-24 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rexle