diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
commit | 686113531d23f30e9973d659c456ae33eb9cff1f (patch) | |
tree | f225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/resource/template.rb | |
parent | d1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff) | |
download | chef-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/template.rb')
-rw-r--r-- | lib/chef/resource/template.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/resource/template.rb b/lib/chef/resource/template.rb index 9a1a69120d..1570af2812 100644 --- a/lib/chef/resource/template.rb +++ b/lib/chef/resource/template.rb @@ -30,7 +30,7 @@ class Chef attr_reader :inline_helper_blocks attr_reader :inline_helper_modules - def initialize(name, run_context=nil) + def initialize(name, run_context = nil) super @source = "#{::File.basename(name)}.erb" @cookbook = nil @@ -41,7 +41,7 @@ class Chef @helper_modules = [] end - def source(file=nil) + def source(file = nil) set_or_return( :source, file, @@ -49,7 +49,7 @@ class Chef ) end - def variables(args=nil) + def variables(args = nil) set_or_return( :variables, args, @@ -57,7 +57,7 @@ class Chef ) end - def cookbook(args=nil) + def cookbook(args = nil) set_or_return( :cookbook, args, @@ -65,7 +65,7 @@ class Chef ) end - def local(args=nil) + def local(args = nil) set_or_return( :local, args, @@ -160,7 +160,7 @@ class Chef # And in the template resource: # helpers(MyTemplateHelper) # The template code in the above example will work unmodified. - def helpers(module_name=nil,&block) + def helpers(module_name = nil, &block) if block_given? and !module_name.nil? raise Exceptions::ValidationFailed, "Passing both a module and block to #helpers is not supported. Call #helpers multiple times instead" @@ -171,8 +171,8 @@ class Chef elsif module_name.nil? raise Exceptions::ValidationFailed, "#helpers requires either a module name or inline module code as a block.\n" + - "e.g.: helpers do; helper_code; end;\n" + - "OR: helpers(MyHelpersModule)" + "e.g.: helpers do; helper_code; end;\n" + + "OR: helpers(MyHelpersModule)" else raise Exceptions::ValidationFailed, "Argument to #helpers must be a module. You gave #{module_name.inspect} (#{module_name.class})" |