dynarex 1.8.1 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 06c1e23c48201289a14cea8448084ffdc9489a03
4
- data.tar.gz: 2b8677c4b0400da378f9dedd5961f6d07f04f70a
2
+ SHA256:
3
+ metadata.gz: e08090973a91214fcbeb4a90a977d807df41aa8cb6a09a5e190a490755c13a9c
4
+ data.tar.gz: c5fbf4b0c7fc003735bedd57485e95eb877b2f1c22c7f2c5198baade4873ee26
5
5
  SHA512:
6
- metadata.gz: a48e9671628c3b2c747d79fa1f2886c3480ae1a3a694131b9563cb17b9b30c81a389b441954613662b22c8eeb50b5ea9df13dc4096782b6b6f7b7fa15ad25d10
7
- data.tar.gz: 240fdb59f2449ed06134a20b6561bcdf748c2d5bc99784d569f3af55ff81b06515f8dbc38c6ec2154906fc1765e0e303ae3bf6e115de35baea6ab498629d8da9
6
+ metadata.gz: cea2e080fc4911d1007bce2c97f4d21c7763be227d956a7816f527d2f4261bd6af7cc024a58a9ce895b68786544684cc73487f21ddf425cb698b4d33c7de48fd
7
+ data.tar.gz: 454ab3e2ab145a18177a6fb9b72add99706d8f9587c0a17a4e1a506afc96f9fc7ee97d18453c91c3835192ae3525d271b798584681f3570137fae28b008c1f6c
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -71,6 +71,7 @@ class Dynarex
71
71
  default_key: nil, json_out: true, debug: false, delimiter: ' # ')
72
72
 
73
73
 
74
+ puts 'inside Dynarex::initialize' if debug
74
75
  @username, @password, @schema, @default_key, @json_out, @debug = username,
75
76
  password, schema, default_key, json_out, debug
76
77
 
@@ -278,7 +279,7 @@ class Dynarex
278
279
 
279
280
  def to_json(pretty: false)
280
281
 
281
- records = self.to_h
282
+ records = self.to_a
282
283
  summary = self.summary.to_h
283
284
 
284
285
  h = {summary: summary, records: records}
@@ -365,7 +366,7 @@ EOF
365
366
 
366
367
  tfo = TableFormatter.new border: false, wrap: false, \
367
368
  divider: self.delimiter
368
- tfo.source = self.to_h.map{|x| x.values}
369
+ tfo.source = self.to_a.map{|x| x.values}
369
370
  docheader + tfo.display
370
371
 
371
372
  else
@@ -389,7 +390,7 @@ EOF
389
390
  def to_table(fields: nil, markdown: false, innermarkdown: false, heading: true)
390
391
 
391
392
  tfo = TableFormatter.new markdown: markdown, innermarkdown: innermarkdown
392
- tfo.source = self.to_h.map {|h| fields ? fields.map {|x| h[x]} : h.values }
393
+ tfo.source = self.to_a.map {|h| fields ? fields.map {|x| h[x]} : h.values }
393
394
 
394
395
  raw_headings = self.summary[:headings]
395
396
  fields = raw_headings.split(self.delimiter) if raw_headings and fields.nil?
@@ -434,7 +435,7 @@ EOF
434
435
  return self
435
436
 
436
437
  end
437
- raw_buffer, type = RXFHelper.read(x)
438
+ raw_buffer, type = RXFHelper.read(x, auto: false)
438
439
 
439
440
  if raw_buffer.is_a? String then
440
441
 
@@ -780,7 +781,7 @@ EOF
780
781
 
781
782
  raw_lines.map do |line|
782
783
 
783
- buffer = RXFHelper.read(line.chomp).first
784
+ buffer = RXFHelper.read(line.chomp, auto: false).first
784
785
 
785
786
  doc = Rexle.new buffer
786
787
 
@@ -1129,7 +1130,8 @@ EOF
1129
1130
  dynarex_new(s)
1130
1131
 
1131
1132
  elsif s[/^(?:http|df)s?:\/\//] then # url
1132
- buffer, _ = RXFHelper.read s, {username: @username, password: @password}
1133
+ buffer, _ = RXFHelper.read s, {username: @username,
1134
+ password: @password, auto: false}
1133
1135
  else # local file
1134
1136
  @local_filepath = s
1135
1137
 
@@ -1265,7 +1267,8 @@ EOF
1265
1267
  if node then
1266
1268
  text = node.text ? node.text.unescape : ''
1267
1269
 
1268
- r.merge node.name.to_sym => (text[/^---(?:\s|\n)/] ? YAML.load(text[/^---(?:\s|\n)(.*)/,1]) : text)
1270
+ r.merge node.name.to_sym => (text[/^---(?:\s|\n)/] ?
1271
+ YAML.load(text[/^---(?:\s|\n)(.*)/,1]) : text)
1269
1272
  else
1270
1273
  r
1271
1274
  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.1
4
+ version: 1.8.2
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-08-05 00:00:00.000000000 Z
33
+ date: 2018-08-11 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: dynarex-import
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: '0'
240
240
  requirements: []
241
241
  rubyforge_project:
242
- rubygems_version: 2.6.13
242
+ rubygems_version: 2.7.6
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: The Dynarex gem creates, reads, updates or delete rows of Dynarex flavoured
metadata.gz.sig CHANGED
Binary file