puppetfiler 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00dccc7d68143e696a7314713198851263fee00e
4
- data.tar.gz: 76e038e1307597430b1cfe2f9ef75bf6b0a4f49e
3
+ metadata.gz: 7c1c257dcdc2214a28481fd05e14520dfcb4f802
4
+ data.tar.gz: c01f31d32b79d677bdc37cb28f073c64a187ced9
5
5
  SHA512:
6
- metadata.gz: e34855099378cabd5c06c897b228beaef766c695dd6daaf3502c08732715b8e49db85217a4f1db7baf88fe1422a53fac75bac44eb86f1df7d72a2f613f4bab12
7
- data.tar.gz: 806f538051bf95a4d4efcf4f9352f209e0ee5b59fa30638170e10d9a1e695ff1a78062e55691ffb411e757aea17750dcea4657535f8462fb5e04fb45c5484dab
6
+ metadata.gz: c66f4ad13a3d8677b0f245d22c7438f831ee98e9ee1522157b95e1529e182ce747c520da6fdfe5b5cbceb19ab0bcd362c25eb738c9a257a7f1d7272d824c7cb4
7
+ data.tar.gz: a92e7bf432ae3426bb28e3c159e7b2bdfa0b72c61800312623d7fe30e5928707fe67b0db4bc1d19e7700cd47a06a6889d846af89ced2f60ec41e75ebb7372156
data/CHANGELOG.rst CHANGED
@@ -1,3 +1,10 @@
1
+ v0.2.1
2
+ ------
3
+ Cosmetical release
4
+
5
+ ``puppetfiler check`` did not leave spaces between the titles of the
6
+ columns, resulting in unreadable output.
7
+
1
8
  v0.2.0
2
9
  ------
3
10
 
@@ -39,22 +39,22 @@ module Puppetfiler
39
39
  return
40
40
  end
41
41
 
42
+ titles = updates.first[1].keys
43
+
42
44
  maxlen_name = 0
43
- maxlen_val = 0
44
- val_count = 0
45
+ maxlen_val = titles.map { |t| t.length }.max
45
46
 
46
47
  updates.each do |name, hash|
47
48
  maxlen_name = name.length if name.length > maxlen_name
48
49
  hash.each do |k, v|
49
- val_count += 1
50
50
  maxlen_val = k.length if k.length > maxlen_val
51
51
  maxlen_val = v.length if v.length > maxlen_val
52
52
  end
53
53
  end
54
54
 
55
- format = "% -#{maxlen_name}s " + ( "% -#{maxlen_val}s" * val_count )
55
+ format = "% -#{maxlen_name}s " + ( "% -#{maxlen_val}s " * titles.count )
56
56
 
57
- puts sprintf(format, 'module', *updates.first[1].keys)
57
+ puts sprintf(format, 'module', *titles)
58
58
 
59
59
  updates.each do |name, hash|
60
60
  puts sprintf(format, name, *hash.values)
@@ -1,3 +1,3 @@
1
1
  module Puppetfiler
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetfiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nelo-T. Wallus