summaryrefslogtreecommitdiff
path: root/lib/chef/resource_collection
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/resource_collection
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'lib/chef/resource_collection')
-rw-r--r--lib/chef/resource_collection/resource_collection_serialization.rb2
-rw-r--r--lib/chef/resource_collection/resource_set.rb4
-rw-r--r--lib/chef/resource_collection/stepable_iterator.rb6
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/resource_collection/resource_collection_serialization.rb b/lib/chef/resource_collection/resource_collection_serialization.rb
index b654644cd9..0e76296a4a 100644
--- a/lib/chef/resource_collection/resource_collection_serialization.rb
+++ b/lib/chef/resource_collection/resource_collection_serialization.rb
@@ -41,7 +41,7 @@ class Chef
module ClassMethods
def json_create(o)
collection = self.new()
- o["instance_vars"].each do |k,v|
+ o["instance_vars"].each do |k, v|
collection.instance_variable_set(k.to_sym, v)
end
collection
diff --git a/lib/chef/resource_collection/resource_set.rb b/lib/chef/resource_collection/resource_set.rb
index 7bc980b6db..2a653356dc 100644
--- a/lib/chef/resource_collection/resource_set.rb
+++ b/lib/chef/resource_collection/resource_set.rb
@@ -40,7 +40,7 @@ class Chef
@resources_by_key.keys
end
- def insert_as(resource, resource_type=nil, instance_name=nil)
+ def insert_as(resource, resource_type = nil, instance_name = nil)
is_chef_resource!(resource)
resource_type ||= resource.resource_name
instance_name ||= resource.name
@@ -124,7 +124,7 @@ class Chef
else
raise Chef::Exceptions::InvalidResourceSpecification,
"The object `#{query_object.inspect}' is not valid for resource collection lookup. " +
- "Use a String like `resource_type[resource_name]' or a Chef::Resource object"
+ "Use a String like `resource_type[resource_name]' or a Chef::Resource object"
end
end
diff --git a/lib/chef/resource_collection/stepable_iterator.rb b/lib/chef/resource_collection/stepable_iterator.rb
index c744ce7943..d1165764ca 100644
--- a/lib/chef/resource_collection/stepable_iterator.rb
+++ b/lib/chef/resource_collection/stepable_iterator.rb
@@ -27,7 +27,7 @@ class Chef
attr_accessor :collection
attr_reader :position
- def initialize(collection=[])
+ def initialize(collection = [])
@position = 0
@paused = false
@collection = collection
@@ -72,11 +72,11 @@ class Chef
@position = 0
end
- def skip_back(skips=1)
+ def skip_back(skips = 1)
@position -= skips
end
- def skip_forward(skips=1)
+ def skip_forward(skips = 1)
@position += skips
end