rsyncbackup 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca708e9a4e9180bb52631cae7d9ea43e2265feab
4
- data.tar.gz: f1bcb41f5851da6868600aca8bc9593f86384c81
3
+ metadata.gz: cd638cd1c9f3af9ee9ede11eeb571413e570cb54
4
+ data.tar.gz: f51a1ae7ceb42660093230da4f1788e640da9d9a
5
5
  SHA512:
6
- metadata.gz: fc1bd8110cb49e093e54cbd85b6d537b6b1ee2330b1330c9a689ccefa102a543d97ef7e9f972e87aa04bf9777cb1d26ecab68a2b2155c2bd190f6f3bf7263b68
7
- data.tar.gz: ba50d29b51b6b14ab2f88a7a3d19012ac6ed7da4d69273bca05a0ad060efa921f3d7a32c4d54771c1c3cf8c95af8f57b5d8badf1ea9f1cc3ce267dc581f49143
6
+ metadata.gz: c925add59bf3076cfa7086ef9b9253765d73dfc5914291e2a8a4a1ba31b8034231012db5074f834a512171b20ee09dc00e95b20798f4ca5898c7ab50793043a9
7
+ data.tar.gz: d6bf332aa5e2b34f4c23d0aa5ac3a4b27a9e3dfdddbf5a3e6f30dfc3176c46e894e512f4e4ff71c0d261389c9702f805d1d371b4260d973ecae6e0357c2629a1
data/.bundle/config ADDED
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_BIN: exec
data/bin/rsyncbackup CHANGED
@@ -13,19 +13,19 @@ class App
13
13
  logger.error_level = Logger::DEBUG if options[:debug]
14
14
  begin
15
15
  syncer = Rsyncbackup.new(source, target, options)
16
- o, e, s = syncer.run
16
+ syncer.run
17
17
  syncer.finalize
18
- if s.success?
19
- info o
18
+ if syncer.status.success?
19
+ info syncer.output
20
20
  else
21
- error e
21
+ error syncer.error
22
22
  end
23
- rescue RuntimeError => e
23
+ rescue Exception => e
24
24
  error "Error occured in rsyncbackup: #{e.class} #{e}"
25
25
  debug "Backtrace:\n#{e.backtrace}"
26
26
  exit 127
27
27
  end
28
- s.exitstatus
28
+ syncer.status.exitstatus
29
29
  end
30
30
 
31
31
  description "Yet another rsync backup script, this time in ruby"
data/exec/autospec ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'autospec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'autospec')
data/exec/coderay ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'coderay' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('coderay', 'coderay')
data/exec/cucumber ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'cucumber' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('cucumber', 'cucumber')
data/exec/guard ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'guard' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('guard', 'guard')
data/exec/htmldiff ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'htmldiff' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('diff-lcs', 'htmldiff')
data/exec/ldiff ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'ldiff' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('diff-lcs', 'ldiff')
data/exec/methadone ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'methadone' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('methadone', 'methadone')
data/exec/pry ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'pry' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('pry', 'pry')
data/exec/rake ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rake', 'rake')
data/exec/rdoc ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rdoc' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rdoc', 'rdoc')
data/exec/ri ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'ri' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rdoc', 'ri')
data/exec/rspec ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rspec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'rspec')
data/exec/rsyncbackup ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rsyncbackup' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rsyncbackup', 'rsyncbackup')
data/exec/thor ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'thor' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('thor', 'thor')
data/lib/rsyncbackup.rb CHANGED
@@ -6,7 +6,7 @@ require 'methadone'
6
6
  class Rsyncbackup
7
7
  include Methadone::CLILogging
8
8
 
9
- attr_accessor :source, :target, :options
9
+ attr_accessor :source, :target, :options, :output, :error, :status
10
10
 
11
11
  def initialize(source, target, opts={})
12
12
  logger.level = Logger::WARN
@@ -55,9 +55,14 @@ class Rsyncbackup
55
55
 
56
56
  # the dry run option will be passed through to the rsync command,
57
57
  # so we still do want to run it.
58
- result = Open3.capture3(@cmd)
59
- raise "Rsync Error: exit status: #{s.exit_code}: error: #{e}" unless result[2].success?
60
- result
58
+ self.output, self.error, self.status = Open3.capture3(@cmd)
59
+ debug "#{caller(0,1).first} self.output.size: #{self.output.size} self.error.size: #{self.error.size} self.status #{self.status.inspect}"
60
+ raise "Rsync Error: exit status: #{self.status.exit_code}: error: #{e}" unless self.status.success?
61
+ self
62
+ end
63
+
64
+ def success?
65
+ (@status.nil?) ? nil : @status.success?
61
66
  end
62
67
 
63
68
  def finalize
@@ -1,5 +1,5 @@
1
1
  class Rsyncbackup
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  DEFAULT_EXCLUSIONS = File.expand_path('.rsyncbackup.exclusions', ENV['HOME'])
4
4
  DEFAULT_INCOMPLETE_DIR_NAME = '.incomplete'
5
5
  DEFAULT_LAST_FULL_DIR_NAME = '.lastfull'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsyncbackup
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tamara Temple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-04 00:00:00.000000000 Z
11
+ date: 2013-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -130,6 +130,7 @@ executables:
130
130
  extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
+ - .bundle/config
133
134
  - .gitignore
134
135
  - .rspec
135
136
  - Gemfile
@@ -139,6 +140,20 @@ files:
139
140
  - README.rdoc
140
141
  - Rakefile
141
142
  - bin/rsyncbackup
143
+ - exec/autospec
144
+ - exec/coderay
145
+ - exec/cucumber
146
+ - exec/guard
147
+ - exec/htmldiff
148
+ - exec/ldiff
149
+ - exec/methadone
150
+ - exec/pry
151
+ - exec/rake
152
+ - exec/rdoc
153
+ - exec/ri
154
+ - exec/rspec
155
+ - exec/rsyncbackup
156
+ - exec/thor
142
157
  - features/backup.feature
143
158
  - features/rsyncbackup.feature
144
159
  - features/spaced_file_names.feature