lib/zold/commands/diff.rb in zold-0.31.5 vs lib/zold/commands/diff.rb in zold-0.31.6

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true -# Copyright (c) 2018-2023 Zerocracy, Inc. +# Copyright (c) 2018-2023 Zerocracy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -68,15 +68,15 @@ patch = Patch.new(@wallets, log: @log) cps.each do |c| patch.join(Wallet.new(c[:path])) end before = @wallets.acq(id) do |wallet| - IO.read(wallet.path) + File.read(wallet.path) end after = '' Tempfile.open(['', Wallet::EXT]) do |f| patch.save(f.path, overwrite: true) - after = IO.read(f) + after = File.read(f) end diff = Diffy::Diff.new(before, after, context: 0).to_s(:color) @log.info(diff) diff end