Permalink
Browse files

Compatible with Ruby 1.9.1, updated README

  • Loading branch information...
1 parent c738450 commit 04b00ed73f29f932bfeae75a0974dfbb2b8bf06e @winton committed Nov 29, 2009
Showing with 10 additions and 6 deletions.
  1. +6 −2 README.markdown
  2. +4 −4 lib/rbackup.rb
View
@@ -3,12 +3,16 @@ rbackup
Backup your stuff with Ruby and Rsync.
+Compatibility
+-------------
+
+Tested with Ruby 1.8.6, 1.8.7, and 1.9.1.
+
Setup
-----
<pre>
-gem sources -a http://gems.github.com
-sudo gem install winton-rbackup
+sudo gem install rbackup --source http://gemcutter.org
</pre>
Create ~/.rbackup.yml
View
@@ -54,7 +54,7 @@ def error(e)
end
def esc(paths)
- paths = paths.to_a
+ paths = [ paths ].flatten
paths.collect! { |path| path.gsub('SPEC', SPEC) } if $TESTING
paths.collect { |path| path.gsub(' ', '\ ') }.join(' ')
end
@@ -63,7 +63,7 @@ def rsync(profile)
inc1ude = []
exclude = []
destination = profile['destination']
- source = profile['source'].to_a
+ source = [ profile['source'] ].flatten
options = "--delete --numeric-ids --safe-links -axzSvL"
# --delete delete extraneous files from dest dirs
@@ -86,11 +86,11 @@ def rsync(profile)
if profile['include']
exclude = %w(*) unless profile['exclude']
- inc1ude = profile['include'].to_a
+ inc1ude = [ profile['include'] ].flatten
end
if profile['exclude']
- exclude += profile['exclude'].to_a
+ exclude += [ profile['exclude'] ].flatten
end
inc1ude = inc1ude.collect { |i| "--include='#{i}'" }.join(' ')

0 comments on commit 04b00ed

Please sign in to comment.