knife-inspect 0.14.0 → 0.14.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: 08fcbef7a39b4537d36bedc38ac1fe729de18ff7
4
- data.tar.gz: 922b94ce6d628fd143f94bb10a1d45493575e742
3
+ metadata.gz: df44c7117866177d6763bb03b81eb95353af13fe
4
+ data.tar.gz: 540a14e765e9d18acb68050c1914c283b0a7fe8e
5
5
  SHA512:
6
- metadata.gz: 5ff1db43b22fa66ce529d32e73be5de237e32f20f14dba8e4530aa204d19c4d07f8a213ab718161dffe52800490978df78c3c1bc71e9e7dbee2d42758ef1314a
7
- data.tar.gz: 5902568d29aef45798d51fb1c8b2db44f958c616e3fb6a1a0249e9a2f547abad7e451cecc779364b68d4ac5bba81f3eda91fd2ea5871d83c72db755b8f7a930d
6
+ metadata.gz: 4d0f3b29557479ede0bed9e51bf3a800371ac235d1138a119743e34cd1c5602159a896d864998c3c2ef87f9be5fb232d2e9ded6dfa86ddea16001b94997da3d9
7
+ data.tar.gz: ba837b29eaf4bd6385d582a7e835939a4d89e413a41392d09dc085614abd4a7bff108f398ee6f20a1ff3a31425de80a53892c197d6c052f23c320b926844835d
data/HISTORY.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.14.1 ( 2016-07-22 )
2
+
3
+ * Bug fix: explicitly call the `HealthInspector` module with a root prefix
4
+ ([#46][#46]). This prevents a crash when running knife inspect in some cases
5
+
6
+
1
7
  ## 0.14.0 ( 2016-04-22 )
2
8
 
3
9
  * New feature: Allow to deactivate inspection by component ([#34][#34]). Thanks
@@ -200,3 +206,4 @@ instead.
200
206
  [#35]: https://github.com/bmarini/knife-inspect/issues/35
201
207
  [#42]: https://github.com/bmarini/knife-inspect/issues/42
202
208
  [#34]: https://github.com/bmarini/knife-inspect/pull/34
209
+ [#46]: https://github.com/bmarini/knife-inspect/pull/46
data/README.md CHANGED
@@ -68,8 +68,9 @@ when everything is in sync or 1 if it's not.
68
68
 
69
69
  ## Compatibility
70
70
 
71
- This gem is tested with Ruby 2.1 and 2.2 and should be compatible with Chef
72
- 10, 11 and 12.
71
+ This gem is tested with Ruby 2.1 and 2.2 and as of version 0.14.0 is only
72
+ compatible with Chef 12. For now use version 0.13.0 if you are still using Chef
73
+ 11.
73
74
 
74
75
  ## Contributors
75
76
 
@@ -6,7 +6,7 @@ require "health_inspector/version"
6
6
  chef_version = if ENV.key?('CHEF_VERSION')
7
7
  "= #{ENV['CHEF_VERSION']}"
8
8
  else
9
- '>= 10.0.0'
9
+ '>= 12.0.0'
10
10
  end
11
11
 
12
12
  Gem::Specification.new do |s|
@@ -4,9 +4,9 @@ require 'health_inspector'
4
4
  class Chef
5
5
  class Knife
6
6
  class CookbookInspect < Knife
7
- include HealthInspector::Runner
7
+ include ::HealthInspector::Runner
8
8
 
9
- checklist HealthInspector::Checklists::Cookbooks
9
+ checklist ::HealthInspector::Checklists::Cookbooks
10
10
  banner 'knife cookbook inspect [COOKBOOK] (options)'
11
11
  end
12
12
  end
@@ -1,14 +1,9 @@
1
1
  require 'chef/knife'
2
+ require 'health_inspector'
2
3
 
3
4
  class Chef
4
5
  class Knife
5
6
  class DataBagInspect < Knife
6
- # :nocov:
7
- deps do
8
- require 'health_inspector'
9
- end
10
- # :nocov:
11
-
12
7
  banner 'knife data bag inspect [BAG] [ITEM] (options)'
13
8
 
14
9
  def run
@@ -17,20 +12,20 @@ class Chef
17
12
  bag_name = @name_args[0]
18
13
  item_name = @name_args[1]
19
14
 
20
- validator = HealthInspector::Checklists::DataBagItems.new(self)
15
+ validator = ::HealthInspector::Checklists::DataBagItems.new(self)
21
16
  item = validator.load_item("#{bag_name}/#{item_name}")
22
17
  exit validator.validate_item item
23
18
 
24
19
  when 1 # We are inspecting a data bag
25
20
  bag_name = @name_args[0]
26
21
 
27
- validator = HealthInspector::Checklists::DataBags.new(self)
22
+ validator = ::HealthInspector::Checklists::DataBags.new(self)
28
23
  item = validator.load_item(bag_name)
29
24
  exit validator.validate_item item
30
25
 
31
26
  when 0 # We are inspecting all the data bags
32
- exit HealthInspector::Checklists::DataBags.run(self) &&
33
- HealthInspector::Checklists::DataBagItems.run(self)
27
+ exit ::HealthInspector::Checklists::DataBags.run(self) &&
28
+ ::HealthInspector::Checklists::DataBagItems.run(self)
34
29
  end
35
30
  end
36
31
  end
@@ -4,9 +4,9 @@ require 'health_inspector'
4
4
  class Chef
5
5
  class Knife
6
6
  class EnvironmentInspect < Knife
7
- include HealthInspector::Runner
7
+ include ::HealthInspector::Runner
8
8
 
9
- checklist HealthInspector::Checklists::Environments
9
+ checklist ::HealthInspector::Checklists::Environments
10
10
  banner 'knife environment inspect [ENVIRONMENT] (options)'
11
11
  end
12
12
  end
@@ -1,20 +1,15 @@
1
1
  require 'chef/knife'
2
+ require 'health_inspector'
2
3
 
3
4
  class Chef
4
5
  class Knife
5
6
  class Inspect < Knife
6
7
  CHECKLISTS = %w(Cookbooks DataBags DataBagItems Environments Roles)
7
8
 
8
- # :nocov:
9
- deps do
10
- require 'health_inspector'
11
- end
12
- # :nocov:
13
-
14
9
  banner 'knife inspect'
15
10
 
16
11
  CHECKLISTS.each do |checklist|
17
- checklist = HealthInspector::Checklists.const_get(checklist)
12
+ checklist = ::HealthInspector::Checklists.const_get(checklist)
18
13
 
19
14
  option checklist.option,
20
15
  :long => "--[no-]#{checklist.option}",
@@ -25,7 +20,7 @@ class Chef
25
20
 
26
21
  def run
27
22
  results = checklists_to_run.map do |checklist|
28
- HealthInspector::Checklists.const_get(checklist).run(self)
23
+ ::HealthInspector::Checklists.const_get(checklist).run(self)
29
24
  end
30
25
 
31
26
  exit !results.include?(false)
@@ -35,7 +30,7 @@ class Chef
35
30
 
36
31
  def checklists_to_run
37
32
  CHECKLISTS.select do |checklist|
38
- checklist = HealthInspector::Checklists.const_get(checklist)
33
+ checklist = ::HealthInspector::Checklists.const_get(checklist)
39
34
 
40
35
  config[checklist.option]
41
36
  end
@@ -4,9 +4,9 @@ require 'health_inspector'
4
4
  class Chef
5
5
  class Knife
6
6
  class RoleInspect < Knife
7
- include HealthInspector::Runner
7
+ include ::HealthInspector::Runner
8
8
 
9
- checklist HealthInspector::Checklists::Roles
9
+ checklist ::HealthInspector::Checklists::Roles
10
10
  banner 'knife role inspect [ROLE] (options)'
11
11
  end
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module HealthInspector
2
- VERSION = '0.14.0'
2
+ VERSION = '0.14.1'
3
3
  end
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.14.0
4
+ version: 0.14.1
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: 2016-04-22 00:00:00.000000000 Z
12
+ date: 2016-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -73,14 +73,14 @@ dependencies:
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 10.0.0
76
+ version: 12.0.0
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 10.0.0
83
+ version: 12.0.0
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: yajl-ruby
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.4.5.1
207
+ rubygems_version: 2.6.6
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: Inspect your chef repo as it is compared to what is on your chef server