dynarex 0.2.7 → 0.2.8

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 +2 -2
  2. metadata +1 -1
@@ -75,8 +75,8 @@ class Dynarex
75
75
  end
76
76
 
77
77
  def records_to_h(default_key)
78
- ah = XPath.match(@doc.root, 'records/*').map do |row|
79
- timestamp = Time.now.to_s; id = ''
78
+ ah = XPath.match(@doc.root, 'records/*').each_with_index.map do |row,i|
79
+ timestamp = Time.now.to_s; id = Time.now.strftime("%Y%m%I%H%M%S") + i.to_s
80
80
  id = row.attribute('id').value.to_s if row.attribute('id')
81
81
  timestamp = row.attribute('timestamp').value.to_s if row.attribute('timestamp')
82
82
  body = XPath.match(row, '*').inject({}) do |r,node|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors: []
7
7