summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook
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
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')
-rw-r--r--lib/chef/cookbook/cookbook_collection.rb4
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb1
-rw-r--r--lib/chef/cookbook/gem_installer.rb4
-rw-r--r--lib/chef/cookbook/metadata.rb3
4 files changed, 5 insertions, 7 deletions
diff --git a/lib/chef/cookbook/cookbook_collection.rb b/lib/chef/cookbook/cookbook_collection.rb
index 997eb6de12..b2a4d5884a 100644
--- a/lib/chef/cookbook/cookbook_collection.rb
+++ b/lib/chef/cookbook/cookbook_collection.rb
@@ -1,7 +1,7 @@
#--
# Author:: Tim Hinderliter (<tim@chef.io>)
# Author:: Christopher Walters (<cw@chef.io>)
-# Copyright:: Copyright 2010-2016 Chef Software, Inc.
+# Copyright:: Copyright 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,7 +50,7 @@ class Chef
# @raise [Chef::Exceptions::CookbookChefVersionMismatch] if the Chef::VERSION fails validation
# @raise [Chef::Exceptions::CookbookOhaiVersionMismatch] if the Ohai::VERSION fails validation
def validate!
- each do |cookbook_name, cookbook_version|
+ each_value do |cookbook_version|
cookbook_version.metadata.validate_chef_version!
cookbook_version.metadata.validate_ohai_version!
end
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index 35dac27fa5..b139a8d489 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -13,7 +13,6 @@ class Chef
attr_reader :cookbook_settings
attr_reader :cookbook_paths
- attr_reader :metadata_filenames
attr_reader :frozen
attr_reader :uploaded_cookbook_version_file
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb
index 5b1426e4e8..0b64d3354f 100644
--- a/lib/chef/cookbook/gem_installer.rb
+++ b/lib/chef/cookbook/gem_installer.rb
@@ -1,5 +1,5 @@
#--
-# Copyright:: Copyright (c) 2010-2017, Chef Software Inc.
+# Copyright:: Copyright (c) 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,7 +38,7 @@ class Chef
def install
cookbook_gems = Hash.new { |h, k| h[k] = [] }
- cookbook_collection.each do |cookbook_name, cookbook_version|
+ cookbook_collection.each_value do |cookbook_version|
cookbook_version.metadata.gems.each do |args|
cookbook_gems[args.first] += args[1..-1]
end
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index a6bb3d079d..22f006640d 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -2,7 +2,7 @@
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: AJ Christensen (<aj@chef.io>)
# Author:: Seth Falcon (<seth@chef.io>)
-# Copyright:: Copyright 2008-2017, Chef Software Inc.
+# Copyright:: Copyright 2008-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -74,7 +74,6 @@ class Chef
attr_reader :providing
attr_reader :attributes
attr_reader :recipes
- attr_reader :version
# @return [Array<Gem::Dependency>] Array of supported Chef versions
attr_reader :chef_versions