rowx 0.4.3 → 0.5.0
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 +1 -3
- data.tar.gz.sig +0 -0
- data/lib/rowx.rb +26 -14
- metadata +5 -5
- 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: fcc3c6b542ab686d3e607840f58519d753cc0baf
|
4
|
+
data.tar.gz: e0e93f028cc9a300d6c999730f487a09c295ea00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5935c2e5be8f4d7b55a7adb0d4c867f3cdb730c43355c10f3b6f5fff10a79264b43f9ca51cb2147988658a8bbe9a4094d1e0a8f1a174d4d4dba8118ea6e9a27f
|
7
|
+
data.tar.gz: 79231dd66abcecfed13beba1d24745d7c28611898e3b98a8657365807c64be604b29fe39d769ff64dadc5b55c8d9f9c89890bec7aeeb531439d53b52fe5ff052
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
|
2
|
-
���dQt2��>XF�ݿP�xk�ֆ�U .�4�ե�Ϻ
|
3
|
-
�aP�� i����t/��@$�=����W��Ya+�����v�a/����]D+V&�h=�ϡ�,S�d�Iƕ�L�!���`Q��@����k�u��"V��#MQ�[��H?�nK`#��#��N�g��:I �����2s�LjcM\C������x؟��������k2��
|
1
|
+
�t�o�lv5��"��}���i�#ֈ&n!������d��z�K�-�+*S�(�q�L/�o��������rؓ�\ą��}W�G�6|�ЍF�ѡ7c�2
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rowx.rb
CHANGED
@@ -1,19 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: rowx.rb
|
4
|
+
|
5
|
+
require 'line-tree'
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
module ArrayCollate
|
10
|
+
refine Array do
|
11
|
+
def collate(pattern=nil)
|
12
|
+
a = self.inject([[]]) do |r,x|
|
13
|
+
if block_given? then
|
14
|
+
yield(x) ? r << [x] : r[-1] << x
|
15
|
+
else
|
16
|
+
x =~ pattern ? r << [x] : r[-1] << x
|
17
|
+
end # block
|
18
|
+
r
|
19
|
+
end
|
20
|
+
a.shift if a.first.empty?
|
21
|
+
a
|
22
|
+
end
|
23
|
+
end
|
14
24
|
end
|
15
25
|
|
16
26
|
class RowX
|
27
|
+
|
28
|
+
using ArrayCollate
|
17
29
|
|
18
30
|
attr_reader :to_a, :to_xml
|
19
31
|
|
@@ -84,4 +96,4 @@ class RowX
|
|
84
96
|
|
85
97
|
end
|
86
98
|
|
87
|
-
end
|
99
|
+
end
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
zfHbPJGx3yldVRmxXp8GGIPagWAvf45DNXXjpQB0mqgcuusndaC2We8vbzzjGzQO
|
32
32
|
UbqEI1/DbMhxRA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: line-tree
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version: '0.5'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.5.
|
45
|
+
version: 0.5.6
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
version: '0.5'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.5.
|
56
|
-
description: Generates XML from rows of labelled, nested, and plain text
|
55
|
+
version: 0.5.6
|
56
|
+
description: Generates XML from rows of labelled text, nested text, and plain text
|
57
57
|
email: james@r0bertson.co.uk
|
58
58
|
executables: []
|
59
59
|
extensions: []
|
metadata.gz.sig
CHANGED
Binary file
|