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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4b9ac6ff91d8a0228d6d7c2fdb7756c66be8f3d
4
- data.tar.gz: be3cda6a69b8f105b793e1e58996accb0ca3b394
3
+ metadata.gz: cc9034c2ed0b87914df205df874f67153411ce54
4
+ data.tar.gz: cda348f9b31c3923507abe949f78fc64e7bc828c
5
5
  SHA512:
6
- metadata.gz: 11e891e7d308db8e833e9f2cf5152f52fc5fb402f71ab0cb7ccb80e6ffc4dd09667baeb443aa56cdd9b3dd5e4e3a93dc35b57f92f3b9dd2429abdeeb8eb8e79c
7
- data.tar.gz: ed357c4061fa029c668597a893a35f8ec066e671255e1152a563e21b983c3ddbe7866baa1e43e326150c6435945661fb40d73676d502ba04eac2e2c5f352171a
6
+ metadata.gz: b1dc3e0b7f3e0540c1bfa9085f4602d725dc9e6a6f25b134cd8f67bfab697be52555a96c076592b90c91b80ebf961fa11d0077b0bb9925f419a247d51aaef9f5
7
+ data.tar.gz: d7fcd74fc02cd7bcff51c94ab28dc638c2f4ece8574bc7cf86754b8971842ee8dbc8a61c2960edcf3bf6120476d772ce9d50bff42fe072a0e4827cae9fbb636b
@@ -1,6 +1,9 @@
1
1
  Hieracles Changelog
2
2
  =======================
3
3
 
4
+ ### 0.4.2 - 2017-03-17
5
+ - fix formatting for console on params
6
+
4
7
  ### 0.4.1 - 2017-01-05
5
8
  - fix broken hc command
6
9
 
@@ -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.1
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-01-05 00:00:00.000000000 Z
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