dynarex 1.8.5 → 1.8.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b490ec6437795cbd03aa1225879d2d71cb52fcf962fd85050ab455b27a16642
4
- data.tar.gz: d58c100605804bc1fd0426330d64988997e93793614a24f7de6f123b1a159041
3
+ metadata.gz: 29632731eacb614ba94dc1fd198865a01344c75be0ee0169de847fb7ed15e0f5
4
+ data.tar.gz: 11c06f7af76a634697ec1f3f97f63e0e27a9c91205bf90d535cf40e517202366
5
5
  SHA512:
6
- metadata.gz: 72e6e915b63d03cd0e27f6451f9ae840524565b1155306ed45273d392579a579ab6f9cf23653fbf698004132e04891d4c7961a26795485ec588f0e7acd44187e
7
- data.tar.gz: 8378cd095e160cea18e196818229081e0906b675d1ceb24b9a295429d146aa8600ea21fd4e58846ab0bbee890b17963070533e99cb9cadff7cb34d53e56d157a
6
+ metadata.gz: e8bd194ffd87d3b7f6fc547e1f81eb6c08d8a412796ff5d09079f6028578334ba74842954e4275eb7ea6481a7fadbbe7e4b8f4c4bc9df27c2b0f33c57775dbc4
7
+ data.tar.gz: a37bb80d1729a5fb9d19ae2ec9b213d5f0564c7aaf6fd115eb780df7efcfe004b2de3bcaea6351031845fb9eb399c9dc159147a2ee5d717ebb7360a861bcfe7e
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -20,6 +20,21 @@ require 'kvx'
20
20
  require 'json'
21
21
 
22
22
 
23
+ module RegGem
24
+
25
+ def self.register()
26
+ '
27
+ hkey_gems
28
+ doctype
29
+ dynarex
30
+ require dynarex
31
+ class Dynarex
32
+ media_type dynarex
33
+ '
34
+ end
35
+ end
36
+
37
+
23
38
  class DynarexException < Exception
24
39
  end
25
40
 
@@ -68,12 +83,15 @@ class Dynarex
68
83
  # Dynarex.new '<contacts><summary><schema>contacts/contact(name,age,dob)</schema></summary><records/></contacts>'
69
84
 
70
85
  def initialize(rawx=nil, username: nil, password: nil, schema: nil,
71
- default_key: nil, json_out: true, debug: false, delimiter: ' # ')
86
+ default_key: nil, json_out: true, debug: false,
87
+ delimiter: ' # ', autosave: false)
72
88
 
73
89
 
74
90
  puts 'inside Dynarex::initialize' if debug
75
91
  @username, @password, @schema, @default_key, @json_out, @debug = username,
76
92
  password, schema, default_key, json_out, debug
93
+ @autosave = autosave
94
+
77
95
  puts '@debug: ' + @debug.inspect if debug
78
96
  @delimiter = delimiter
79
97
  @spaces_delimited = false
@@ -155,7 +173,7 @@ class Dynarex
155
173
  @format_mask = s
156
174
  @summary[:format_mask] = @format_mask
157
175
  end
158
-
176
+
159
177
  def insert(raw_params)
160
178
  record = make_record(raw_params)
161
179
  @doc.root.element('records/*').insert_before record
@@ -416,12 +434,12 @@ EOF
416
434
 
417
435
  # Save the document to a file.
418
436
 
419
- def save(filepath=nil, options={})
437
+ def save(filepath=@local_filepath, options={})
420
438
 
421
439
  puts 'inside Dynarex::save' if @debug
422
440
 
423
441
  opt = {pretty: true}.merge options
424
- filepath ||= @local_filepath
442
+
425
443
  @local_filepath = filepath
426
444
  xml = display_xml(opt)
427
445
  buffer = block_given? ? yield(xml) : xml
@@ -489,6 +507,8 @@ EOF
489
507
  end
490
508
 
491
509
  @dirty_flag = true
510
+
511
+ save() if @autosave
492
512
 
493
513
  self
494
514
  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.8.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -30,7 +30,7 @@ cert_chain:
30
30
  +2pKHQJfU1lEmVoo4afsLMvmq/CZPJba1LR3Z1QJXYCWt9IEZTECStKlK7H6RiIx
31
31
  gRA=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-10-08 00:00:00.000000000 Z
33
+ date: 2018-10-31 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: dynarex-import
metadata.gz.sig CHANGED
Binary file