line-tree 0.4.6 → 0.4.7
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/lib/line-tree.rb +4 -3
- data.tar.gz.sig +2 -2
- metadata +2 -2
- 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: f83204981f5eb869747559800e7283417ae9a98c
|
4
|
+
data.tar.gz: 30a968cadfe3cdc596447118cdddb76ca4ea94d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f217d97c9a636f4e7e950bd1f569d6a889482f74d2760f4c4c89871976b6e65247994be39522e80ca8848fda9cea23909e84dfeaa1248e5761502873ba22638
|
7
|
+
data.tar.gz: fb631f5115bab54c0c8e24dec0cb3ad511f02fc87d832d6160a9e3bad27ec1b08ee7b1c4ef78129fb545cd1a21ec666a2212e431fb096569002f4e67518a1e98
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/line-tree.rb
CHANGED
@@ -9,10 +9,11 @@ class LineTree
|
|
9
9
|
attr_reader :to_a
|
10
10
|
|
11
11
|
def initialize(lines, level: nil, ignore_non_element: true,
|
12
|
-
|
12
|
+
ignore_blank_lines: true, ignore_label: false)
|
13
13
|
|
14
14
|
@ignore_non_element = ignore_non_element
|
15
15
|
@ignore_blank_lines = ignore_blank_lines
|
16
|
+
@ignore_label = ignore_label
|
16
17
|
@to_a = scan_shift(lines.strip, level)
|
17
18
|
end
|
18
19
|
|
@@ -30,8 +31,8 @@ class LineTree
|
|
30
31
|
a = lines.split(/(?=^\S+)/)
|
31
32
|
|
32
33
|
a.map do |x|
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
if @ignore_label == true or not x[/.*/][/^\s*\w+:\S+/] then
|
35
36
|
|
36
37
|
rlines = @ignore_blank_lines ? (x).split(/\n/) : (x).split(/\n/,-1)
|
37
38
|
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
G`R����b�eX�ٞ`Zƶ���[(橉���p%W�3��XIm���1eba�äN
|
2
|
+
lo�4i�v�w�,�\ ks���a��!������μј�t�~�6���J��U<�^�Z��F@���G�V�IBO��'�L�\��&8����e�D�$x�>e�Xǡ-�ʼ[�v�^U�����b^��w|������j��b�X<?�J��}F�� ���a��1�R� t�o�m�����q"���u
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: line-tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
ErtlSTAImlBCK8q5BS4jBBt8VAEpNdkWpWbtDtLPA639pW2QWIcPx13ObWJh7Ejk
|
32
32
|
THoVqqsHTfeg3g==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|