lib/rdiff_simple/rdiff_backup.rb in rdiff-simple-0.1.1 vs lib/rdiff_simple/rdiff_backup.rb in rdiff-simple-0.1.2
- old
+ new
@@ -1,13 +1,12 @@
module RdiffSimple
class RdiffBackup
- attr_accessor :logger, :open3
+ attr_accessor :logger
def initialize
yield self if block_given?
- @open3 ||= Open3
@logger ||= Logger.new(STDOUT)
end
def backup(source, destination, *args)
command_args = OptionsParser.parse *args
@@ -22,10 +21,10 @@
execute "--verify-at-time #{time} #{destination}"
end
private
def execute(command)
- output, error, result = open3.capture3 "rdiff-backup #{command}"
+ output, error, result = Open3.capture3 "rdiff-backup #{command}"
logger.info output unless output.empty?
logger.error error unless error.empty?
result.exitstatus