File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44class Chef
55 class Knife
66 class CookbookInspect < Knife
7- include HealthInspector ::Runner
7+ include :: HealthInspector ::Runner
88
9- checklist HealthInspector ::Checklists ::Cookbooks
9+ checklist :: HealthInspector ::Checklists ::Cookbooks
1010 banner 'knife cookbook inspect [COOKBOOK] (options)'
1111 end
1212 end
Original file line number Diff line number Diff line change 11require 'chef/knife'
2+ require 'health_inspector'
23
34class Chef
45 class Knife
56 class DataBagInspect < Knife
6- # :nocov:
7- deps do
8- require 'health_inspector'
9- end
10- # :nocov:
11-
127 banner 'knife data bag inspect [BAG] [ITEM] (options)'
138
149 def run
@@ -17,20 +12,20 @@ def run
1712 bag_name = @name_args [ 0 ]
1813 item_name = @name_args [ 1 ]
1914
20- validator = HealthInspector ::Checklists ::DataBagItems . new ( self )
15+ validator = :: HealthInspector ::Checklists ::DataBagItems . new ( self )
2116 item = validator . load_item ( "#{ bag_name } /#{ item_name } " )
2217 exit validator . validate_item item
2318
2419 when 1 # We are inspecting a data bag
2520 bag_name = @name_args [ 0 ]
2621
27- validator = HealthInspector ::Checklists ::DataBags . new ( self )
22+ validator = :: HealthInspector ::Checklists ::DataBags . new ( self )
2823 item = validator . load_item ( bag_name )
2924 exit validator . validate_item item
3025
3126 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 )
3429 end
3530 end
3631 end
Original file line number Diff line number Diff line change 44class Chef
55 class Knife
66 class EnvironmentInspect < Knife
7- include HealthInspector ::Runner
7+ include :: HealthInspector ::Runner
88
9- checklist HealthInspector ::Checklists ::Environments
9+ checklist :: HealthInspector ::Checklists ::Environments
1010 banner 'knife environment inspect [ENVIRONMENT] (options)'
1111 end
1212 end
Original file line number Diff line number Diff line change 11require 'chef/knife'
2+ require 'health_inspector'
23
34class Chef
45 class Knife
56 class Inspect < Knife
67 CHECKLISTS = %w( Cookbooks DataBags DataBagItems Environments Roles )
78
8- # :nocov:
9- deps do
10- require 'health_inspector'
11- end
12- # :nocov:
13-
149 banner 'knife inspect'
1510
1611 CHECKLISTS . each do |checklist |
17- checklist = HealthInspector ::Checklists . const_get ( checklist )
12+ checklist = :: HealthInspector ::Checklists . const_get ( checklist )
1813
1914 option checklist . option ,
2015 :long => "--[no-]#{ checklist . option } " ,
@@ -25,7 +20,7 @@ class Inspect < Knife
2520
2621 def run
2722 results = checklists_to_run . map do |checklist |
28- HealthInspector ::Checklists . const_get ( checklist ) . run ( self )
23+ :: HealthInspector ::Checklists . const_get ( checklist ) . run ( self )
2924 end
3025
3126 exit !results . include? ( false )
@@ -35,7 +30,7 @@ def run
3530
3631 def checklists_to_run
3732 CHECKLISTS . select do |checklist |
38- checklist = HealthInspector ::Checklists . const_get ( checklist )
33+ checklist = :: HealthInspector ::Checklists . const_get ( checklist )
3934
4035 config [ checklist . option ]
4136 end
Original file line number Diff line number Diff line change 44class Chef
55 class Knife
66 class RoleInspect < Knife
7- include HealthInspector ::Runner
7+ include :: HealthInspector ::Runner
88
9- checklist HealthInspector ::Checklists ::Roles
9+ checklist :: HealthInspector ::Checklists ::Roles
1010 banner 'knife role inspect [ROLE] (options)'
1111 end
1212 end
You can’t perform that action at this time.
0 commit comments