line-tree 0.4.4 → 0.4.5
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 +3 -2
- data.tar.gz.sig +0 -0
- data/lib/line-tree.rb +4 -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: 176cc7dca8380d6d8c186a9f54f59ce214f3afbd
|
4
|
+
data.tar.gz: ba91cd9e7df690b03aab22bf69de31c16279dfa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3407e7ef8d54f2a56e8c4557121315ae415919e947dc3bfd1ee82de1ea62e91079992ca8229aac2364afde02ab6e62dfee77d57c87419fd40d6f5960ea895a0b
|
7
|
+
data.tar.gz: 5a05e73f5c5fa0389415bb99bec40c5d48eb7ff66aa1864709286ea512551a3e90bb4054865f2cad4669419e9d9e1949919a55a71a37008dd75fc8bad73e8768
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
{���1�!�v*��цe��D�_�^�aiA�
|
2
|
+
��Y���-W@�����A7g<����fA٧���B�������-~(7�3w����l[������ܴ������,�Z��Y
|
3
|
+
��c l�2��"��� �J��Ȟ�o�$�n��3��2�P;�QHSN����Yq2�;�~4=9g��Pܒ���qc�ԓ�t���avT��T�Y�1�u�
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/line-tree.rb
CHANGED
@@ -8,9 +8,11 @@ class LineTree
|
|
8
8
|
|
9
9
|
attr_reader :to_a
|
10
10
|
|
11
|
-
def initialize(lines, level: nil, ignore_non_element: true
|
11
|
+
def initialize(lines, level: nil, ignore_non_element: true,
|
12
|
+
ignore_blank_lines: true)
|
12
13
|
|
13
14
|
@ignore_non_element = ignore_non_element
|
15
|
+
@ignore_blank_lines = ignore_blank_lines
|
14
16
|
@to_a = scan_shift(lines.strip, level)
|
15
17
|
end
|
16
18
|
|
@@ -31,7 +33,7 @@ class LineTree
|
|
31
33
|
|
32
34
|
unless x[/.*/][/^\s*\w+:\S+/] then
|
33
35
|
|
34
|
-
rlines = (x).split(/\n/,-1)
|
36
|
+
rlines = @ignore_blank_lines ? (x).split(/\n/) : (x).split(/\n/,-1)
|
35
37
|
rlines = [x] if level and level < 0
|
36
38
|
label = [rlines.shift]
|
37
39
|
new_lines = rlines.map{|x| x[2..-1]}
|
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.5
|
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: 2014-12-
|
34
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|