dynarex 1.2.10 → 1.2.11

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 -3
  2. metadata +2 -2
@@ -18,7 +18,7 @@ class Dynarex
18
18
 
19
19
  attr_accessor :format_mask, :delimiter, :xslt_schema, :schema, :order
20
20
 
21
- def self.gem_url() 'http://www.jamesrobertson.eu/ruby/dynarex#1.2,3' end
21
+ def self.gem_url() 'http://www.jamesrobertson.eu/ruby/dynarex#1.2.11' end
22
22
 
23
23
  #Create a new dynarex document from 1 of the following options:
24
24
  #* a local file path
@@ -383,7 +383,6 @@ EOF
383
383
  attributes = {id: id.to_s, created: Time.now.to_s, last_modified: nil}
384
384
  attributes.each {|k,v| record.add_attribute(k, v)}
385
385
  if @order == 'descending' then
386
-
387
386
  element = @doc.root.element('records/.[1]')
388
387
  if element then
389
388
  element.insert_before record
@@ -428,8 +427,11 @@ EOF
428
427
  i = @doc.root.xpath('max(records/*/attribute::id)').to_i
429
428
 
430
429
  raw_summary = schema[/\[([^\]]+)/,1]
431
- raw_lines = buffer.gsub(/^\s*#[^\n]+/,'').gsub(/\n\n/,"\n")\
430
+ r = buffer[/--\+(.*)/m,1]
431
+ buffer = r if r
432
+ raw_lines = buffer[/(--\+)?(.*)/m,2].gsub(/^\s*#[^\n]+/,'').gsub(/\n\n/,"\n")\
432
433
  .strip.split(/\r?\n|\r(?!\n)/)
434
+
433
435
  raw_lines.reverse! if @order == 'descending'
434
436
 
435
437
  if raw_summary then
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.10
5
+ version: 1.2.11
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-24 00:00:00 Z
13
+ date: 2013-01-05 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rexle