hieracles 0.4.0 → 0.4.1

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: e1e246fada2e7e691f6a3c1f92ef9f3bae438ceb
4
- data.tar.gz: a69b8fcd3a63ecb3df2d6064068f6a747c9c65fd
3
+ metadata.gz: f4b9ac6ff91d8a0228d6d7c2fdb7756c66be8f3d
4
+ data.tar.gz: be3cda6a69b8f105b793e1e58996accb0ca3b394
5
5
  SHA512:
6
- metadata.gz: 041246165f6e2474bfc6a134a07553cf4b1ae588a8a7842de33e1eb728ec90742db7beb32762f65f2f3cc36cc9cd20e9704a623c280d022e599cfff3563a77b5
7
- data.tar.gz: 7f1ad137bf9f1c1c09f4bead0c8e9b8ae16ffca9668ca2ffd945d6ed38b237b3d6e0ac88d6bf18d3f74f673df2c8a73383c69e92d3247f036e724d21cffd98ed
6
+ metadata.gz: 11e891e7d308db8e833e9f2cf5152f52fc5fb402f71ab0cb7ccb80e6ffc4dd09667baeb443aa56cdd9b3dd5e4e3a93dc35b57f92f3b9dd2429abdeeb8eb8e79c
7
+ data.tar.gz: ed357c4061fa029c668597a893a35f8ec066e671255e1152a563e21b983c3ddbe7866baa1e43e326150c6435945661fb40d73676d502ba04eac2e2c5f352171a
@@ -1,6 +1,9 @@
1
1
  Hieracles Changelog
2
2
  =======================
3
3
 
4
+ ### 0.4.1 - 2017-01-05
5
+ - fix broken hc command
6
+
4
7
  ### 0.4.0 - 2016-12-30
5
8
  - prepare a new command `hieracles` for preparing version 1.0.0
6
9
  - refactoring of main lib to be less node-centric
data/bin/hc CHANGED
@@ -12,8 +12,6 @@ if opt.options.has_key? :version
12
12
  exit(0)
13
13
  end
14
14
 
15
- action = opt.payload.shift
16
-
17
15
  fqdn = opt.payload[0]
18
16
  command = opt.payload[1]
19
17
  args = opt.payload[2..-1]
@@ -75,31 +75,32 @@ module Hieracles
75
75
 
76
76
  def show_params(without_common, args)
77
77
  filter = args[0]
78
+ output = "[-] (merged)\n"
78
79
  @node.files(without_common).each_with_index do |f, i|
79
80
  output << format("#{COLORS[i]}\n", "[#{i}] #{f}")
80
81
  @colors[f] = i
81
82
  end
82
83
  @node.params(without_common).each do |key, v|
83
84
  if !filter || Regexp.new(filter).match(key)
85
+ filecolor_index = @colors[v[:file]]
84
86
  if v[:overriden]
85
87
  output << format(
86
88
  "%s #{COLORS[7]} %s\n", "[-]",
87
89
  key,
88
- sanitize(value[:value])
90
+ sanitize(v[:value])
89
91
  )
90
- value[:found_in].each do |val|
92
+ v[:found_in].each do |val|
91
93
  output << format(
92
94
  " #{COLORS[8]}\n",
93
95
  "[#{filecolor_index}] #{key} #{val[:value]}"
94
96
  )
95
97
  end
96
98
  else
97
- filecolor_index = @colors[value[:file]]
98
99
  filecolor = COLORS[filecolor_index]
99
100
  output << format(
100
101
  "#{filecolor} #{COLORS[7]} %s\n", "[#{filecolor_index}]",
101
102
  key,
102
- sanitize(value[:value])
103
+ sanitize(v[:value])
103
104
  )
104
105
  end
105
106
  end
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.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mose
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-30 00:00:00.000000000 Z
11
+ date: 2017-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -266,67 +266,67 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  version: '0'
267
267
  requirements: []
268
268
  rubyforge_project:
269
- rubygems_version: 2.5.2
269
+ rubygems_version: 2.5.1
270
270
  signing_key:
271
271
  specification_version: 4
272
272
  summary: CLI tool for Hiera parameters visualization.
273
273
  test_files:
274
- - spec/spec_helper.rb
275
- - spec/files/hiera_no_yamlbackend.yaml
274
+ - spec/files/hiera_deeper.yaml
276
275
  - spec/files/facts.json
277
- - spec/files/hiera_columns.yaml
278
- - spec/files/ssl/ca.crt
276
+ - spec/files/farm_modules/dev4/manifests/init.pp
277
+ - spec/files/farm_modules/dev2/manifests/init.pp
278
+ - spec/files/farm_modules/dev/manifests/init.pp
279
+ - spec/files/enc/server2.example.com.yaml
280
+ - spec/files/enc/server.example.com.yaml
281
+ - spec/files/enc/server3.example.com.yaml
282
+ - spec/files/enc/server4.example.com.yaml
283
+ - spec/files/config.yml
284
+ - spec/files/hiera_deep.yaml
285
+ - spec/files/params/nodes/server.example.com.yaml
286
+ - spec/files/params/farm/dev.yaml
287
+ - spec/files/params/common/common.yml
288
+ - spec/files/params/farm_datacenter/dev_dc1.yaml
289
+ - spec/files/params/farm_datacenter/dev_dc2.yaml
290
+ - spec/files/hiera_no_yamlbackend.yaml
291
+ - spec/files/ssl/key.pem
292
+ - spec/files/ssl/bad-cert.crt
279
293
  - spec/files/ssl/bad-ca.crt
280
294
  - spec/files/ssl/key-pass.pem
281
295
  - spec/files/ssl/cert.crt
282
- - spec/files/ssl/bad-cert.crt
296
+ - spec/files/ssl/ca.crt
283
297
  - spec/files/ssl/bad-key.pem
284
- - spec/files/ssl/key.pem
285
298
  - spec/files/config_withdb.yml
286
- - spec/files/params/common/common.yml
287
- - spec/files/params/farm_datacenter/dev_dc1.yaml
288
- - spec/files/params/farm_datacenter/dev_dc2.yaml
289
- - spec/files/params/farm/dev.yaml
290
- - spec/files/params/nodes/server.example.com.yaml
291
- - spec/files/enc/server2.example.com.yaml
292
- - spec/files/enc/server.example.com.yaml
293
- - spec/files/enc/server4.example.com.yaml
294
- - spec/files/enc/server3.example.com.yaml
295
- - spec/files/farm_modules/dev2/manifests/init.pp
296
- - spec/files/farm_modules/dev4/manifests/init.pp
297
- - spec/files/farm_modules/dev/manifests/init.pp
298
- - spec/files/hiera_yamlbackend_notfound.yaml
299
299
  - spec/files/hiera.yaml
300
- - spec/files/modules/fake_module3/manifests/init.pp
301
- - spec/files/modules/fake_module/manifests/init.pp
302
- - spec/files/modules/unused_module/manifests/init.pp
303
- - spec/files/modules/fake_module2/manifests/init.pp
300
+ - spec/files/hiera_yamlbackend_notfound.yaml
304
301
  - spec/files/modules/faux_module2/manifests/init.pp
302
+ - spec/files/modules/unused_module/manifests/init.pp
303
+ - spec/files/modules/fake_module/manifests/init.pp
304
+ - spec/files/modules/fake_module3/manifests/init.pp
305
305
  - spec/files/modules/faux_module1/manifests/init.pp
306
+ - spec/files/modules/fake_module2/manifests/init.pp
307
+ - spec/files/hiera_columns.yaml
306
308
  - spec/files/facts.yaml
307
- - spec/files/config.yml
308
- - spec/files/hiera_deep.yaml
309
- - spec/files/hiera_deeper.yaml
310
- - spec/lib/node_spec.rb
311
- - spec/lib/puppetdb/client_spec.rb
312
- - spec/lib/puppetdb/fixsslconnectionadapter_spec.rb
313
- - spec/lib/puppetdb/response_spec.rb
314
- - spec/lib/puppetdb/request_spec.rb
315
- - spec/lib/puppetdb/apierror_spec.rb
316
- - spec/lib/puppetdb/query_spec.rb
309
+ - spec/spec_helper.rb
317
310
  - spec/lib/hieracles_spec.rb
318
- - spec/lib/notification_spec.rb
319
311
  - spec/lib/utils_spec.rb
320
- - spec/lib/format_spec.rb
321
312
  - spec/lib/config_spec.rb
313
+ - spec/lib/registry_spec.rb
314
+ - spec/lib/notification_spec.rb
315
+ - spec/lib/puppetdb/fixsslconnectionadapter_spec.rb
316
+ - spec/lib/puppetdb/client_spec.rb
317
+ - spec/lib/puppetdb/apierror_spec.rb
318
+ - spec/lib/puppetdb/response_spec.rb
319
+ - spec/lib/puppetdb/query_spec.rb
320
+ - spec/lib/puppetdb/request_spec.rb
322
321
  - spec/lib/interpolate_spec.rb
322
+ - spec/lib/format_spec.rb
323
+ - spec/lib/optparse_spec.rb
324
+ - spec/lib/options/hc_spec.rb
325
+ - spec/lib/node_spec.rb
326
+ - spec/lib/hiera_spec.rb
327
+ - spec/lib/formats/csv_spec.rb
323
328
  - spec/lib/formats/rawyaml_spec.rb
324
329
  - spec/lib/formats/plain_spec.rb
325
- - spec/lib/formats/json_spec.rb
326
- - spec/lib/formats/yaml_spec.rb
327
- - spec/lib/formats/csv_spec.rb
328
330
  - spec/lib/formats/console_spec.rb
329
- - spec/lib/options/hc_spec.rb
330
- - spec/lib/optparse_spec.rb
331
- - spec/lib/registry_spec.rb
332
- - spec/lib/hiera_spec.rb
331
+ - spec/lib/formats/yaml_spec.rb
332
+ - spec/lib/formats/json_spec.rb