knife-inspect 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/HISTORY.md +8 -0
- data/README.md +1 -0
- data/knife-inspect.gemspec +1 -0
- data/lib/health_inspector/checklists/base.rb +6 -8
- data/lib/health_inspector/checklists/cookbooks.rb +7 -10
- data/lib/health_inspector/version.rb +1 -1
- data/spec/chef-repo/cookbooks/cookbook_two/metadata.json +4 -0
- metadata +18 -5
- data/spec/chef-repo/cookbooks/cookbook_two/metadata.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e648a13d315a3c1c9da0ec48d1560d7c4a4dabd
|
4
|
+
data.tar.gz: 9ef1e150143ffff406ba9d667b01791215d91bb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0db7de2d55926ada9f92bc65571f8fa31310389d88abee342bec923f8b4545324a5b4a8b80ca997cb2ff96993259ecc7a5e60dda06a45369d6d912edf8ec248d
|
7
|
+
data.tar.gz: 8c9a7d1fe7166a465b741e729c740da9bb4c761fcd2fb0dd681b2da2b7120ce9402c41984f41a4f4036226a8ee6a0d9b4b2fbf5bce77f9e69e2ba3653733fead
|
data/.travis.yml
CHANGED
data/HISTORY.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.10.0 ( 2014-10-13 )
|
2
|
+
|
3
|
+
* Feature: Support cookbooks that only have a `metadata.json` file but no
|
4
|
+
`metadata.rb` (Berkshelf does that) ([#5][#5])
|
5
|
+
* Feature: Use parallel lib to speed up REST API operations ([#27][#27])
|
6
|
+
|
1
7
|
## 0.9.2 ( 2014-08-11 )
|
2
8
|
|
3
9
|
* Bug fix: Fixed regression in the regression fix for Chef 10 that broke
|
@@ -149,3 +155,5 @@ instead.
|
|
149
155
|
[#22]: https://github.com/bmarini/knife-inspect/issues/22
|
150
156
|
[#7]: https://github.com/bmarini/knife-inspect/issues/7
|
151
157
|
[#25]: https://github.com/bmarini/knife-inspect/issues/25
|
158
|
+
[#5]: https://github.com/bmarini/knife-inspect/issues/5
|
159
|
+
[#27]: https://github.com/bmarini/knife-inspect/issues/27
|
data/README.md
CHANGED
@@ -66,6 +66,7 @@ when everything is in sync or 1 if it's not.
|
|
66
66
|
* Dan Buch ([@meatballhat](@https://github.com/meatballhat))
|
67
67
|
* Kirt Fitzpatrick ([@kirtfitzpatrick](https://github.com/kirtfitzpatrick))
|
68
68
|
* Ben Hughes ([@barn](https://github.com/barn))
|
69
|
+
* Grégoire Seux ([@kamaradclimber](https://github.com/kamaradclimber))
|
69
70
|
|
70
71
|
## Contributing
|
71
72
|
|
data/knife-inspect.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require 'pathname'
|
3
|
+
require 'parallel'
|
3
4
|
|
4
5
|
module HealthInspector
|
5
6
|
module Checklists
|
@@ -38,19 +39,16 @@ module HealthInspector
|
|
38
39
|
(server_items + local_items).uniq.sort
|
39
40
|
end
|
40
41
|
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
end
|
42
|
+
def load_validate(name)
|
43
|
+
item = load_item(name)
|
44
|
+
validate_item(item)
|
45
45
|
end
|
46
46
|
|
47
47
|
def run
|
48
48
|
banner "Inspecting #{self.class.title}"
|
49
49
|
|
50
|
-
results =
|
51
|
-
|
52
|
-
each_item do |item|
|
53
|
-
results << validate_item(item)
|
50
|
+
results = Parallel.map(all_item_names) do |name|
|
51
|
+
load_validate(name)
|
54
52
|
end
|
55
53
|
|
56
54
|
!results.include?(false)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'chef/version'
|
2
2
|
require 'chef/cookbook_version'
|
3
|
+
require 'chef/cookbook_loader'
|
3
4
|
require 'chef/checksum_cache' if Chef::Version.new(Chef::VERSION) < Chef::Version.new('11.0.0')
|
4
5
|
|
5
6
|
module HealthInspector
|
@@ -104,18 +105,14 @@ module HealthInspector
|
|
104
105
|
end
|
105
106
|
|
106
107
|
def local_items
|
107
|
-
@context.cookbook_path
|
108
|
-
|
109
|
-
.flatten
|
110
|
-
.select { |path| File.exist?("#{path}/metadata.rb") }
|
111
|
-
.reduce({}) do |hsh, path|
|
108
|
+
cl = Chef::CookbookLoader.new(@context.cookbook_path)
|
109
|
+
cl.load_cookbooks
|
112
110
|
|
113
|
-
|
114
|
-
|
111
|
+
cl.inject({}) do |hash, (name, cookbook_version)|
|
112
|
+
hash[name] = Chef::Version.new(cookbook_version.version)
|
115
113
|
|
116
|
-
|
117
|
-
|
118
|
-
end
|
114
|
+
hash
|
115
|
+
end
|
119
116
|
end
|
120
117
|
|
121
118
|
def all_item_names
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-inspect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Karékinian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -101,6 +101,20 @@ dependencies:
|
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '1.2'
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: parallel
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.3'
|
111
|
+
type: :runtime
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.3'
|
104
118
|
description: knife-inspect is a knife plugin to compare the content of your Chef repository
|
105
119
|
and Chef server
|
106
120
|
email:
|
@@ -136,7 +150,7 @@ files:
|
|
136
150
|
- lib/health_inspector/runner.rb
|
137
151
|
- lib/health_inspector/version.rb
|
138
152
|
- spec/chef-repo/cookbooks/cookbook_one/metadata.rb
|
139
|
-
- spec/chef-repo/cookbooks/cookbook_two/metadata.
|
153
|
+
- spec/chef-repo/cookbooks/cookbook_two/metadata.json
|
140
154
|
- spec/chef-repo/data_bags/data_bag_one/one.json
|
141
155
|
- spec/chef-repo/data_bags/data_bag_two/two.json
|
142
156
|
- spec/chef-repo/data_bags/subdir/data_bag_from_subdir/three.json
|
@@ -188,7 +202,7 @@ specification_version: 4
|
|
188
202
|
summary: Inspect your chef repo as it is compared to what is on your chef server
|
189
203
|
test_files:
|
190
204
|
- spec/chef-repo/cookbooks/cookbook_one/metadata.rb
|
191
|
-
- spec/chef-repo/cookbooks/cookbook_two/metadata.
|
205
|
+
- spec/chef-repo/cookbooks/cookbook_two/metadata.json
|
192
206
|
- spec/chef-repo/data_bags/data_bag_one/one.json
|
193
207
|
- spec/chef-repo/data_bags/data_bag_two/two.json
|
194
208
|
- spec/chef-repo/data_bags/subdir/data_bag_from_subdir/three.json
|
@@ -214,4 +228,3 @@ test_files:
|
|
214
228
|
- spec/health_inspector/checklists/role_spec.rb
|
215
229
|
- spec/health_inspector/checklists/roles_spec.rb
|
216
230
|
- spec/spec_helper.rb
|
217
|
-
has_rdoc:
|