summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2018-06-14 19:23:51 -0700
committerNoah Kantrowitz <noah@coderanger.net>2018-06-14 19:23:51 -0700
commit631d79e736ee5ab7001dbbbfcc1a3ffc8f96b052 (patch)
treeada3bf6a50baef8632096fe7d03077b99341e67f
parent14d8a56a18a41c89a78d249b13979c848bf08044 (diff)
downloadchef-631d79e736ee5ab7001dbbbfcc1a3ffc8f96b052.tar.gz
Feed the Rubocop.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
-rw-r--r--lib/chef/node_map.rb6
-rw-r--r--spec/unit/deprecated_spec.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb
index 0a79563929..c0066bfce5 100644
--- a/lib/chef/node_map.rb
+++ b/lib/chef/node_map.rb
@@ -37,7 +37,7 @@
#
class Chef
class NodeMap
- COLLISION_WARNING_14 = <<-EOH.gsub(/\s+/, ' ').strip
+ COLLISION_WARNING_14 = <<-EOH.gsub(/\s+/, " ").strip
%{type_caps} %{key} has been loaded from a cookbook. The %{type} %{key} is now
included in Chef and will take precedence over the existing cookbook %{type} in the
next major release of Chef (15.0, April 2019). You may be able to remove this cookbook dependency from
@@ -45,7 +45,7 @@ your runlist if you do not use other recipes/resources/libraries from the cookbo
Alternatively there may be a newer version of this cookbook without the %{key} %{type}.
EOH
- COLLISION_WARNING_15 = <<-EOH.gsub(/\s+/, ' ').strip
+ COLLISION_WARNING_15 = <<-EOH.gsub(/\s+/, " ").strip
%{type_caps} %{key} attempted to load from a cookbook. The %{type} %{key} is now
included in Chef and takes precedence over the existing cookbook %{type}
which will be ignored. You may be able to remove this cookbook dependency from
@@ -100,7 +100,7 @@ EOH
klass.superclass.to_s
end
# For now, only log the warning.
- Chef.deprecated(:map_collision, COLLISION_WARNING_14 % {type: type_of_thing, key: key, type_caps: type_of_thing.capitalize})
+ Chef.deprecated(:map_collision, COLLISION_WARNING_14 % { type: type_of_thing, key: key, type_caps: type_of_thing.capitalize })
# In 15.0, uncomment this and remove the log above.
# Chef.deprecated(:map_collision, COLLISION_WARNING_15 % {type: type_of_thing, key: key, type_caps: type_of_thing.capitalize}))
# return
diff --git a/spec/unit/deprecated_spec.rb b/spec/unit/deprecated_spec.rb
index fa4e70299b..0876b73dce 100644
--- a/spec/unit/deprecated_spec.rb
+++ b/spec/unit/deprecated_spec.rb
@@ -57,9 +57,9 @@ describe Chef::Deprecated do
ObjectSpace.each_object(Class).select { |cls| cls < Chef::Deprecated::Base }.each do |cls|
(id_map[cls.deprecation_id] ||= []) << cls
end
- collisions = id_map.select {|k, v| v.size != 1 }
+ collisions = id_map.select { |k, v| v.size != 1 }
unless collisions.empty?
- raise "Found deprecation ID collisions:\n#{collisions.map {|k, v| "* #{k} #{v.map(&:name).join(', ')}"}.join("\n")}"
+ raise "Found deprecation ID collisions:\n#{collisions.map { |k, v| "* #{k} #{v.map(&:name).join(', ')}" }.join("\n")}"
end
end
end