health_inspector 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.3 ( 2012-03-27)
2
+
3
+ * Read cookbook paths from knife config file instead of hardcoding /cookbooks
4
+
1
5
  ## 0.0.2 ( 2012-03-27)
2
6
 
3
7
  * Make sure we iterate over actual cookbooks in cookbooks folder
data/README.md CHANGED
@@ -7,4 +7,14 @@ A tool to inspect your chef repo as is compares to what is on your chef server
7
7
  $ gem install health_inspector
8
8
  $ cd [chef repo] && health_inspector inspect
9
9
 
10
- Run `health_inspector help` for more options
10
+ Run `health_inspector help` for more options
11
+
12
+ ## What is checks
13
+
14
+ So far it checks if...
15
+
16
+ * your chef server has cookbooks you don't have locally
17
+ * your chef server is missing cookbooks you have locally
18
+ * cookbook versions are not the same between server and local chef repo
19
+ * you have uncommitted changes in a cookbook (assuming your cookbook is a git repo)
20
+ * you have commits in a cookbook that haven't been pushed to your remote (assuming your cookbook is a git repo)
@@ -22,4 +22,5 @@ Gem::Specification.new do |s|
22
22
  # s.add_development_dependency "rspec"
23
23
  # s.add_runtime_dependency "rest-client"
24
24
  s.add_runtime_dependency "thor"
25
+ s.add_runtime_dependency "chef"
25
26
  end
@@ -1,12 +1,20 @@
1
+ require "chef/config"
2
+
1
3
  module HealthInspector
2
4
  class Context < Struct.new(:repo_path, :config_path)
3
5
  def knife_command(subcommnad)
4
6
  `cd #{repo_path} && knife #{subcommnad} -c #{config_path}`
5
7
  end
6
8
 
7
- # TODO: read from knife config
8
9
  def cookbook_path
9
- [ File.join(repo_path, "cookbooks") ]
10
+ Array( config.cookbook_path )
11
+ end
12
+
13
+ def config
14
+ @config ||= begin
15
+ Chef::Config.from_file(config_path)
16
+ Chef::Config
17
+ end
10
18
  end
11
19
  end
12
20
  end
@@ -1,3 +1,3 @@
1
1
  module HealthInspector
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health_inspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &2154186060 !ruby/object:Gem::Requirement
16
+ requirement: &2164944480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,18 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2154186060
24
+ version_requirements: *2164944480
25
+ - !ruby/object:Gem::Dependency
26
+ name: chef
27
+ requirement: &2164944060 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2164944060
25
36
  description: A tool to inspect your chef repo as is compares to what is on your chef
26
37
  server
27
38
  email: