boost_info 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/boost_info/generator.rb +9 -1
- data/lib/boost_info/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cffceb241116406690e2c464bcb09148f51f3c7
|
4
|
+
data.tar.gz: 7015bcb66989f77e30701f30d53b2c09a4737793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 556ffe4650c8aad4eb2e5cf1d0f90a5c0cd4bbd71a5605a78a7994bf50b87829c8c18e58d74c9decc616c62934f7c5818b2aac7122edbe0c26a6f8166c6ce792
|
7
|
+
data.tar.gz: 8273df261f7327e6eebdb0bd7ded4b081d9b5cd060ded79eef9850d72bfc4d9fae0f6e185393110c3417ae1051a88001cc03c74c950098e52e1f444fc9256766
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# BoostInfo [](https://travis-ci.org/zenbro/boost_info)
|
1
|
+
# BoostInfo [](https://github.com/zenbro/boost_info/releases) [](https://travis-ci.org/zenbro/boost_info) [](https://github.com/zenbro/boost_info/issues)
|
2
2
|
|
3
3
|
Simple parser for [Boost INFO format](http://www.boost.org/doc/libs/1_42_0/doc/html/boost_propertytree/parsers.html#boost_propertytree.parsers.info_parser).
|
4
4
|
|
data/lib/boost_info/generator.rb
CHANGED
@@ -11,12 +11,19 @@ module BoostInfo
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def to_info
|
14
|
-
build_info(@root_node, 0)
|
14
|
+
lines = build_info(@root_node, 0)
|
15
|
+
if lines.empty?
|
16
|
+
''
|
17
|
+
else
|
18
|
+
lines.join("\n") + "\n"
|
19
|
+
end
|
15
20
|
end
|
16
21
|
|
17
22
|
private
|
18
23
|
|
19
24
|
def build_hash(parent_node)
|
25
|
+
return {} unless parent_node.childrens
|
26
|
+
|
20
27
|
hash = {}
|
21
28
|
parent_node.childrens.each do |node|
|
22
29
|
key = @opts[:symbolize_keys] ? node.key.to_sym : node.key
|
@@ -30,6 +37,7 @@ module BoostInfo
|
|
30
37
|
end
|
31
38
|
|
32
39
|
def build_info(parent_node, level)
|
40
|
+
return [] unless parent_node.childrens
|
33
41
|
lines = []
|
34
42
|
last_node_index = parent_node.childrens.size - 1
|
35
43
|
parent_node.childrens.each_with_index do |node,index|
|
data/lib/boost_info/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boost_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Vetrov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|