dynarex 1.0.10 → 1.0.11

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.
Files changed (2) hide show
  1. data/lib/dynarex.rb +2 -5
  2. metadata +1 -1
@@ -4,7 +4,6 @@
4
4
 
5
5
  require 'nokogiri'
6
6
  require 'open-uri'
7
- require 'builder'
8
7
  require 'ostruct'
9
8
  require 'dynarex-import'
10
9
  require 'rexle'
@@ -212,8 +211,6 @@ EOF
212
211
  load_records
213
212
  self
214
213
  end
215
-
216
-
217
214
 
218
215
  #Create a record from a string, given the dynarex document contains a format mask.
219
216
  # dynarex = Dynarex.new 'contacts/contact(name,age,dob)'
@@ -249,7 +246,7 @@ EOF
249
246
 
250
247
  def delete(x)
251
248
 
252
- if x.to_i.to_s.length == x.to_s.length and x[/[0-9]/] then
249
+ if x.to_i.to_s == x.to_s and x[/[0-9]/] then
253
250
  @doc.delete("records/*[@id='#{x}']")
254
251
  else
255
252
  @doc.delete x
@@ -450,7 +447,7 @@ end))
450
447
  i += 1; id = i.to_s
451
448
  end
452
449
  created = row.attributes['created'] if row.attributes['created']
453
- last_modified = row.attributes['last_modified'] if row.attributes['last_modified']
450
+ last_modified = row.attributes[:last_modified] if row.attributes[:last_modified]
454
451
  body = row.xpath('*').inject({}) do |r,node|
455
452
  r.merge node.name.to_sym => node.text
456
453
  end
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: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors: []
7
7