hieracles 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/hieracles/farm.rb +23 -0
- data/lib/hieracles/formats/console.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc9034c2ed0b87914df205df874f67153411ce54
|
4
|
+
data.tar.gz: cda348f9b31c3923507abe949f78fc64e7bc828c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1dc3e0b7f3e0540c1bfa9085f4602d725dc9e6a6f25b134cd8f67bfab697be52555a96c076592b90c91b80ebf961fa11d0077b0bb9925f419a247d51aaef9f5
|
7
|
+
data.tar.gz: d7fcd74fc02cd7bcff51c94ab28dc638c2f4ece8574bc7cf86754b8971842ee8dbc8a61c2960edcf3bf6120476d772ce9d50bff42fe072a0e4827cae9fbb636b
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Hieracles
|
2
|
+
class Farm
|
3
|
+
|
4
|
+
def initialize(name, config)
|
5
|
+
@name = name
|
6
|
+
@config = config
|
7
|
+
end
|
8
|
+
|
9
|
+
def nodes()
|
10
|
+
end
|
11
|
+
|
12
|
+
def modules()
|
13
|
+
regex = Regexp.new('\s*include\s*([-_a-z0-9]*)')
|
14
|
+
extract_path = Regexp.new(".*#{@config.classpath.sub(/%s/,'([^/]*)')}")
|
15
|
+
Dir.glob(format(@config.classpath, '*')).sort.reduce({}) do |a, f|
|
16
|
+
name = f.sub(extract_path, "\\1")
|
17
|
+
a[name] = find_item(f, regex)
|
18
|
+
a
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -80,6 +80,7 @@ module Hieracles
|
|
80
80
|
output << format("#{COLORS[i]}\n", "[#{i}] #{f}")
|
81
81
|
@colors[f] = i
|
82
82
|
end
|
83
|
+
output << "\n"
|
83
84
|
@node.params(without_common).each do |key, v|
|
84
85
|
if !filter || Regexp.new(filter).match(key)
|
85
86
|
filecolor_index = @colors[v[:file]]
|
@@ -90,6 +91,7 @@ module Hieracles
|
|
90
91
|
sanitize(v[:value])
|
91
92
|
)
|
92
93
|
v[:found_in].each do |val|
|
94
|
+
filecolor_index = @colors[val[:file]]
|
93
95
|
output << format(
|
94
96
|
" #{COLORS[8]}\n",
|
95
97
|
"[#{filecolor_index}] #{key} #{val[:value]}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hieracles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- lib/hieracles/actions/modules.rb
|
160
160
|
- lib/hieracles/commands.rb
|
161
161
|
- lib/hieracles/config.rb
|
162
|
+
- lib/hieracles/farm.rb
|
162
163
|
- lib/hieracles/format.rb
|
163
164
|
- lib/hieracles/formats/console.rb
|
164
165
|
- lib/hieracles/formats/csv.rb
|