summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-01-15 13:07:58 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2019-01-15 13:07:58 -0800
commit990974ca5cd44df0c77bb6a12fc57a3c32b92e23 (patch)
tree5779719f58254764e57eb9cacde85837295fd2f6 /lib/chef/cookbook
parent4be1ebe66460efb0535e500d6ecb52a147346519 (diff)
downloadchef-990974ca5cd44df0c77bb6a12fc57a3c32b92e23.tar.gz
changes for rubocop engine upgrades.lcg/rubocop-upgrades
this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/cookbook')
-rw-r--r--lib/chef/cookbook/chefignore.rb2
-rw-r--r--lib/chef/cookbook/metadata.rb40
2 files changed, 21 insertions, 21 deletions
diff --git a/lib/chef/cookbook/chefignore.rb b/lib/chef/cookbook/chefignore.rb
index 00dc7c0939..27f0bcaadb 100644
--- a/lib/chef/cookbook/chefignore.rb
+++ b/lib/chef/cookbook/chefignore.rb
@@ -20,7 +20,7 @@ class Chef
class Cookbook
class Chefignore
- COMMENTS_AND_WHITESPACE = /^\s*(?:#.*)?$/
+ COMMENTS_AND_WHITESPACE = /^\s*(?:#.*)?$/.freeze
attr_reader :ignores
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index b4d6ab6936..a14518e2fb 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -467,24 +467,24 @@ class Chef
def to_h
{
- NAME => name,
- DESCRIPTION => description,
- LONG_DESCRIPTION => long_description,
- MAINTAINER => maintainer,
- MAINTAINER_EMAIL => maintainer_email,
- LICENSE => license,
- PLATFORMS => platforms,
- DEPENDENCIES => dependencies,
- PROVIDING => providing,
- ATTRIBUTES => attributes,
- RECIPES => recipes,
- VERSION => version,
- SOURCE_URL => source_url,
- ISSUES_URL => issues_url,
- PRIVACY => privacy,
- CHEF_VERSIONS => gem_requirements_to_array(*chef_versions),
- OHAI_VERSIONS => gem_requirements_to_array(*ohai_versions),
- GEMS => gems,
+ NAME => name,
+ DESCRIPTION => description,
+ LONG_DESCRIPTION => long_description,
+ MAINTAINER => maintainer,
+ MAINTAINER_EMAIL => maintainer_email,
+ LICENSE => license,
+ PLATFORMS => platforms,
+ DEPENDENCIES => dependencies,
+ PROVIDING => providing,
+ ATTRIBUTES => attributes,
+ RECIPES => recipes,
+ VERSION => version,
+ SOURCE_URL => source_url,
+ ISSUES_URL => issues_url,
+ PRIVACY => privacy,
+ CHEF_VERSIONS => gem_requirements_to_array(*chef_versions),
+ OHAI_VERSIONS => gem_requirements_to_array(*ohai_versions),
+ GEMS => gems,
}
end
@@ -659,7 +659,7 @@ class Chef
Called by: #{caller_name} '#{dep_name}', #{version_constraints.map { |vc| vc.inspect }.join(", ")}
Called from:
#{caller[0...5].map { |line| " " + line }.join("\n")}
-OBSOLETED
+ OBSOLETED
raise Exceptions::ObsoleteDependencySyntax, msg
end
end
@@ -678,7 +678,7 @@ OBSOLETED
Called by: #{caller_name} '#{dep_name}', '#{constraint_str}'
Called from:
#{caller[0...5].map { |line| " " + line }.join("\n")}
-INVALID
+ INVALID
raise Exceptions::InvalidVersionConstraint, msg
end