rowx 0.6.0 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/rowx.rb +13 -7
  5. metadata +32 -29
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c98d55480e2c1881ea9bbba3a02a8d3955ea923c
4
- data.tar.gz: cf37cbdd69dc054aca697d0ee8a7439f9ffc6fc6
2
+ SHA256:
3
+ metadata.gz: 1105fda5cd1829ebba2275b56a3b04937d5e4c0db109f113a40c2162e106a1e1
4
+ data.tar.gz: 72874acc3709cd44d95a43078fbc93db94934ba876fd9376aced5b3124fa7e55
5
5
  SHA512:
6
- metadata.gz: f023f8b760eea3396f9fd0ecdf9a3347fecd8139842d109f4be8ea3456ab81db76483144284d671b9554ec04e30f61ac633468d21c5362958f197c5f96aa64dd
7
- data.tar.gz: cdc5d79e8041f3763c878c00ba84f229732287fb07d5576ef0566834478fb1d9912d089f1805f4f4479ce957bf90dd0b8716f785aabb6198397c7ad137dca922
6
+ metadata.gz: 1bedd7f84e21df706e34a2da9c14bdc8f098930d9f00fa8355390111b76d7a26ea232bfdb036646e6e049ce05c6e972ea97a821be05e60b881b56230e2b7b456
7
+ data.tar.gz: 1e64d2a2d93cfb5976abdacbea272cb3cc7c52110d2a56a7fcad488a7ad818a8120fba021cae272d06185722d68202f928e5dafa7338fd089941d97046b14121
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -31,11 +31,14 @@ end
31
31
  class RowX
32
32
 
33
33
  using ArrayCollate
34
+ using ColouredText
34
35
 
35
36
  attr_reader :to_a, :to_xml, :to_lines
36
37
 
37
38
  def initialize(txt, level: nil, ignore_blank_lines: false,
38
- abort_1_row: false)
39
+ abort_1_row: false, debug: false, name: 'item')
40
+
41
+ @name, @debug = name, debug
39
42
 
40
43
  # auto indent any multiline values
41
44
 
@@ -51,10 +54,12 @@ class RowX
51
54
  end
52
55
 
53
56
  end
57
+
58
+ puts 'lines: ' + lines.inspect if @debug
54
59
 
55
60
  a = LineTree.new(lines.join, level: level,
56
- ignore_blank_lines: ignore_blank_lines).to_a
57
-
61
+ ignore_blank_lines: ignore_blank_lines, debug: debug).to_a
62
+ puts ('a: ' + a.inspect).debug if @debug
58
63
 
59
64
  keyfield = a[0][0][/\w+:/]; i = 0
60
65
 
@@ -96,12 +101,13 @@ class RowX
96
101
  def scan_a(row)
97
102
 
98
103
  a = row.map do |field|
99
-
104
+
105
+ puts 'field: ' + field.inspect if @debug
100
106
  s = field.is_a?(Array) ? field[0] : field
101
107
 
102
108
  return if s.empty?
103
-
104
- found = s.match(/^(\w+):\s*(.*)/m)
109
+ puts 's: ' + s.inspect if @debug
110
+ found = s.match(/^(\w+)(?:\:$|\:\s+)(.*)/m)
105
111
 
106
112
  value, name = found ? found.captures.reverse : s
107
113
  name ||= 'description'
@@ -120,7 +126,7 @@ class RowX
120
126
  result
121
127
  end
122
128
 
123
- ['item', {}, '' ] + a
129
+ [@name, {}, '' ] + a
124
130
  end
125
131
 
126
132
  def scan_records(rows, level)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rowx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,28 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE3MDEwODE3MTM0MloXDTE4MDEwODE3MTM0MlowSDESMBAG
16
- A1UEAwwJZ2VtbWFzd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
+ BgkqhkiG9w0BAQsFAAOCAYEAamu6TUzgQljUfB2b/5AQ4uSX9hLSuABIaaOCp7dC
29
+ 6+50s7KPGO8OnFMg4dNh9owERjwy05ad5UditqQssYn4v3i7rAgGFMpajgV85fIu
30
+ Yk4HeZpwGT0Rh0puJX+lVcY4H+/0v/ilv6PQN1mnB+wdHp/wh4DcAbKoVntrVMKY
31
+ uSD00z/OGvu8Wt8cDoKKsvRx/M8+BA8Jh0d9rAbbD1wJxdO3dhr+xPe69rpzVQ0k
32
+ hHrQ2eQ6j5QceP2EbQAME42Sd+CIP8xT4HeAsUJWTqHGs0kiJvomHUTGe+JzBfke
33
+ CiKEYV1eq9T4rPX7hh9g+fvj66W5e/gJ6O+3fskNhzvP/lrnXPVs8ourOYI7Uoml
34
+ rP6fc4AahiTW5g9Yd93IIwivGQ1oRMfU15qn8AbxqV8hfbg8l8TqvJlh2vzyXZNb
35
+ 800/1OqpheFJ2kxsgvkGfxh/3RV+ObACeZ/HSFCxStB23EvqS8umVWDkXA3qr3RB
36
+ yuZ4lODk6vzJbiDVh0MAHLnZ
33
37
  -----END CERTIFICATE-----
34
- date: 2017-09-07 00:00:00.000000000 Z
38
+ date: 2020-10-02 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
41
  name: line-tree
@@ -39,21 +43,21 @@ dependencies:
39
43
  requirements:
40
44
  - - "~>"
41
45
  - !ruby/object:Gem::Version
42
- version: '0.5'
46
+ version: '0.9'
43
47
  - - ">="
44
48
  - !ruby/object:Gem::Version
45
- version: 0.5.8
49
+ version: 0.9.1
46
50
  type: :runtime
47
51
  prerelease: false
48
52
  version_requirements: !ruby/object:Gem::Requirement
49
53
  requirements:
50
54
  - - "~>"
51
55
  - !ruby/object:Gem::Version
52
- version: '0.5'
56
+ version: '0.9'
53
57
  - - ">="
54
58
  - !ruby/object:Gem::Version
55
- version: 0.5.8
56
- description: Generates XML from rows of labelled text, nested text, and plain text
59
+ version: 0.9.1
60
+ description: Generates XML from rows of labelled text, nested text, and plain text
57
61
  email: james@jamesrobertson.eu
58
62
  executables: []
59
63
  extensions: []
@@ -79,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
83
  - !ruby/object:Gem::Version
80
84
  version: '0'
81
85
  requirements: []
82
- rubyforge_project:
83
- rubygems_version: 2.6.8
86
+ rubygems_version: 3.0.3
84
87
  signing_key:
85
88
  specification_version: 4
86
89
  summary: rowx
metadata.gz.sig CHANGED
Binary file