diff options
Diffstat (limited to 'lib/chef/mixin/template.rb')
-rw-r--r-- | lib/chef/mixin/template.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/chef/mixin/template.rb b/lib/chef/mixin/template.rb index be46f0cd2c..c423ccaa42 100644 --- a/lib/chef/mixin/template.rb +++ b/lib/chef/mixin/template.rb @@ -105,10 +105,9 @@ class Chef def node return @node if @node raise "Could not find a value for node. If you are explicitly setting variables in a template, " + - "include a node variable if you plan to use it." + "include a node variable if you plan to use it." end - # # Takes the name of the partial, plus a hash of options. Returns a # string that contains the result of the evaluation of the partial. @@ -177,7 +176,7 @@ class Chef # this template. if Chef::Platform.windows? - output = output.gsub(/\r?\n/,"\r\n") + output = output.gsub(/\r?\n/, "\r\n") end output @@ -225,7 +224,7 @@ class Chef end def line_number - @line_number ||= $1.to_i if original_exception.backtrace.find {|line| line =~ /\(erubis\):(\d+)/ } + @line_number ||= $1.to_i if original_exception.backtrace.find { |line| line =~ /\(erubis\):(\d+)/ } end def source_location @@ -246,7 +245,7 @@ class Chef contextual_lines = lines[beginning_line, source_size] output = [] contextual_lines.each_with_index do |line, index| - line_number = (index+beginning_line+1).to_s.rjust(3) + line_number = (index + beginning_line + 1).to_s.rjust(3) output << "#{line_number}: #{line}" end output.join("\n") |