diff options
Diffstat (limited to 'lib/chef/util/diff.rb')
-rw-r--r-- | lib/chef/util/diff.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/util/diff.rb b/lib/chef/util/diff.rb index b8336b5135..3b42f576c0 100644 --- a/lib/chef/util/diff.rb +++ b/lib/chef/util/diff.rb @@ -40,8 +40,8 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OF OTHER DEALINGS IN THE # SOFTWARE. -require 'diff/lcs' -require 'diff/lcs/hunk' +require "diff/lcs" +require "diff/lcs/hunk" class Chef class Util @@ -97,9 +97,9 @@ class Chef return "No differences encountered\n" if diff_data.empty? # write diff header (standard unified format) - ft = File.stat(old_file).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.%N %z') + ft = File.stat(old_file).mtime.localtime.strftime("%Y-%m-%d %H:%M:%S.%N %z") diff_str << "--- #{old_file}\t#{ft}\n" - ft = File.stat(new_file).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.%N %z') + ft = File.stat(new_file).mtime.localtime.strftime("%Y-%m-%d %H:%M:%S.%N %z") diff_str << "+++ #{new_file}\t#{ft}\n" # loop over diff hunks. if a hunk overlaps with the last hunk, @@ -176,7 +176,7 @@ class Chef end def encode_diff_for_json(diff_str) - diff_str.encode!('UTF-8', :invalid => :replace, :undef => :replace, :replace => '?') + diff_str.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => "?") end end |