dynarex 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dynarex.rb +5 -2
- metadata +2 -2
data/lib/dynarex.rb
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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-
|
|
13
|
+
date: 2012-11-24 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rexle
|