dynarex 0.6.4 → 0.6.5

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
@@ -66,13 +66,13 @@ EOF
66
66
  format_mask = XPath.first(@doc.root, 'summary/format_mask/text()').to_s
67
67
  t = format_mask.to_s.gsub(/\[!(\w+)\]/, '(.*)').sub(/\[/,'\[').sub(/\]/,'\]')
68
68
  lines = buffer.split(/\r?\n|\r(?!\n)/).map {|x|x.match(/#{t}/).captures}
69
- fields = format_mask.scan(/\[!(\w+)\]/).flatten.map(&:to_sym)
69
+ fields = format_mask.scan(/\[!(\w+)\]/).flatten.map(&:to_sym)
70
70
 
71
71
  a = lines.map do|x|
72
72
  created = Time.now.to_s
73
73
 
74
74
  h = Hash[fields.zip(x)]
75
- [h[@default_key], {id: '', created: created, last_modified: '', body: h}]
75
+ [h[@default_key.to_s.to_sym], {id: '', created: created, last_modified: '', body: h}]
76
76
  end
77
77
 
78
78
  h2 = Hash[a]
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.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors: []
7
7