rowx 0.2.5 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rowx.rb +4 -4
- metadata +10 -10
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5192e7ed6e792d708cec04112252205c9b1bbd3
|
4
|
+
data.tar.gz: 6d1eb2fd146c22599436add0318d01332a22c5e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87399315019fd8e5157299609220e6a069bcbc730151d168be39e6ba898adbb3e1ae0d73f0edea4a79f598274e2ff82f9b9de280b657fe0b35d1146a08156f65
|
7
|
+
data.tar.gz: 85ac2bea5fb02442ce5b870b7acabfa60af725eb481733352f85b99750baeb8ae69c7b17cf995d1f50e5d1c7e3c3965855b5df6784827006969ad10beefd2c48
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rowx.rb
CHANGED
@@ -40,8 +40,8 @@ class RowX
|
|
40
40
|
summary = scan_a a.slice!(0,i)
|
41
41
|
|
42
42
|
summary[0] = 'summary'
|
43
|
-
@to_a = ['root',
|
44
|
-
|
43
|
+
@to_a = ['root', {}] + [summary] + scan_records(records, level)
|
44
|
+
|
45
45
|
@to_xml = Rexle.new(@to_a).xml pretty: true
|
46
46
|
|
47
47
|
end
|
@@ -60,12 +60,12 @@ class RowX
|
|
60
60
|
children = scan_a(field[1..-1]) if field[-1] .is_a?(Array)
|
61
61
|
value = value.to_s.strip.gsub('<','<').gsub('>','>')
|
62
62
|
|
63
|
-
result = [name,
|
63
|
+
result = [name, {}, value]
|
64
64
|
result << children if children
|
65
65
|
result
|
66
66
|
end
|
67
67
|
|
68
|
-
['item', ''
|
68
|
+
['item', {}, '' ] + a
|
69
69
|
end
|
70
70
|
|
71
71
|
def scan_records(row, 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.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
yaP43m5g1gqUfr6ys6w86uiM1Khmw6RXdAZBrQU+jmXYRU0OejB3+MdhPte5gP6n
|
32
32
|
k3UhzyiVjlkLhQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2015-02-02 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: line-tree
|
@@ -39,40 +39,40 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.5'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.5.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.5'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.5.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rexle
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1.
|
62
|
+
version: '1.2'
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 1.0
|
65
|
+
version: 1.2.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '1.
|
72
|
+
version: '1.2'
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0
|
75
|
+
version: 1.2.0
|
76
76
|
description: Generates XML from rows of labelled, nested, and plain text
|
77
77
|
email: james@r0bertson.co.uk
|
78
78
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|