summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_loader.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-17 13:34:18 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-01-17 13:34:18 -0800
commit746562d6358c27b838c95ea27b2a2bd82c03cefe (patch)
treebaa587f091d06c1385543bbde818970e5fee7b75 /lib/chef/cookbook_loader.rb
parentfcd8d778baeeb990a64fe9042164bbd3e1dd5269 (diff)
downloadchef-746562d6358c27b838c95ea27b2a2bd82c03cefe.tar.gz
prepping for rubocop 0.52.1lcg/rubocop-0.52.1
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/cookbook_loader.rb')
-rw-r--r--lib/chef/cookbook_loader.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb
index a965b43c61..1cd498496a 100644
--- a/lib/chef/cookbook_loader.rb
+++ b/lib/chef/cookbook_loader.rb
@@ -2,7 +2,7 @@
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: Christopher Walters (<cw@chef.io>)
# Author:: Daniel DeLeo (<dan@kallistec.com>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2018, Chef Software Inc.
# Copyright:: Copyright 2009-2016, Daniel DeLeo
# License:: Apache License, Version 2.0
#
@@ -78,7 +78,7 @@ class Chef
# @api private
def load_cookbooks_without_shadow_warning
preload_cookbooks
- @loaders_by_name.each do |cookbook_name, _loaders|
+ @loaders_by_name.each_key do |cookbook_name|
load_cookbook(cookbook_name)
end
@cookbooks_by_name
@@ -142,6 +142,14 @@ class Chef
end
end
+ def each_key(&block)
+ cookbook_names.each(&block)
+ end
+
+ def each_value(&block)
+ values.each(&block)
+ end
+
def cookbook_names
@cookbooks_by_name.keys.sort
end