rdiff-simple 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d970e3aa2acff1a199aae08d11ecbbbef78cd396
4
- data.tar.gz: 4ca3e46b6106f5cabc1fcce4e5fa07652ae39ef3
3
+ metadata.gz: 5c825887d493c7851822dffc3b6bfa3a43a154de
4
+ data.tar.gz: 70a97690e5c7269f0ecd545c7f79cf83e1488208
5
5
  SHA512:
6
- metadata.gz: 6628d830fe10b8065ce6ce9b070caae379365ad425e12e4d28faa25dd0717f4a5f54c8fa5c401841a734f488c39944087a8e61b97c93cbf9771d86fa7483f592
7
- data.tar.gz: 4fc368e8ea6c7805d2ca1f7faef5b882ffad3ea0576aeafab6d123086826db1c017ea5239c751590199d3ceb32e6d871e9c3ac5279f6ff2d4e3a277cc18eae79
6
+ metadata.gz: e3fec5ba89ca40b6feb9410b3115f880e0fc2d7674c27dfbe8593aa122fb4e12d241dd31bb4d4fce5319f16b2976688e422deb33409385dc9d2a400edebd3b9a
7
+ data.tar.gz: 6696fcfa338d681185b0abbac97e252137c8375bfd94453ccf4c8c7af7eb6bb2cb5eec9507271abc36d9267207c854574c0f707d49708c79e0e114ba7b9c0d63
@@ -1,11 +1,10 @@
1
1
  module RdiffSimple
2
2
  class RdiffBackup
3
- attr_accessor :logger, :open3
3
+ attr_accessor :logger
4
4
 
5
5
  def initialize
6
6
  yield self if block_given?
7
7
 
8
- @open3 ||= Open3
9
8
  @logger ||= Logger.new(STDOUT)
10
9
  end
11
10
 
@@ -24,7 +23,7 @@ module RdiffSimple
24
23
 
25
24
  private
26
25
  def execute(command)
27
- output, error, result = open3.capture3 "rdiff-backup #{command}"
26
+ output, error, result = Open3.capture3 "rdiff-backup #{command}"
28
27
 
29
28
  logger.info output unless output.empty?
30
29
  logger.error error unless error.empty?
@@ -1,3 +1,3 @@
1
1
  module RdiffSimple
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -4,17 +4,15 @@ describe RdiffSimple::RdiffBackup do
4
4
  let(:source) { '~/Documents' }
5
5
  let(:destination) { '~/Test' }
6
6
  let(:status) { double('status', exitstatus: Random.rand(100)) }
7
- let(:open3) { double('open3') }
8
7
  let(:file) { StringIO.new }
9
8
  let(:rdiff) do
10
9
  RdiffSimple::RdiffBackup.new do |r|
11
10
  r.logger = Logger.new file
12
- r.open3 = open3
13
11
  end
14
12
  end
15
13
 
16
14
  before do
17
- open3.stub(:capture3).with(args) { ['output', 'error', status] }
15
+ Open3.stub(:capture3).with(args) { ['output', 'error', status] }
18
16
  end
19
17
 
20
18
  shared_examples "a command" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdiff-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hansen