rbackup 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +8 -2
- data/Rakefile +0 -1
- data/gemspec.rb +1 -1
- data/lib/rbackup.rb +6 -4
- metadata +2 -2
data/README.markdown
CHANGED
@@ -3,12 +3,16 @@ rbackup
|
|
3
3
|
|
4
4
|
Backup your stuff with Ruby and Rsync.
|
5
5
|
|
6
|
+
Compatibility
|
7
|
+
-------------
|
8
|
+
|
9
|
+
Tested with Ruby 1.8.6, 1.8.7, and 1.9.1.
|
10
|
+
|
6
11
|
Setup
|
7
12
|
-----
|
8
13
|
|
9
14
|
<pre>
|
10
|
-
gem
|
11
|
-
sudo gem install winton-rbackup
|
15
|
+
sudo gem install rbackup --source http://gemcutter.org
|
12
16
|
</pre>
|
13
17
|
|
14
18
|
Create ~/.rbackup.yml
|
@@ -32,6 +36,8 @@ usb:
|
|
32
36
|
pictures:
|
33
37
|
source: ~/Pictures
|
34
38
|
destination: /Volumes/USB Key
|
39
|
+
include:
|
40
|
+
- Favorites
|
35
41
|
</pre>
|
36
42
|
|
37
43
|
Backup
|
data/Rakefile
CHANGED
data/gemspec.rb
CHANGED
data/lib/rbackup.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
1
3
|
class RBackup
|
2
4
|
|
3
5
|
@@usage = <<-USAGE
|
@@ -54,7 +56,7 @@ class RBackup
|
|
54
56
|
end
|
55
57
|
|
56
58
|
def esc(paths)
|
57
|
-
paths = paths.
|
59
|
+
paths = [ paths ].flatten
|
58
60
|
paths.collect! { |path| path.gsub('SPEC', SPEC) } if $TESTING
|
59
61
|
paths.collect { |path| path.gsub(' ', '\ ') }.join(' ')
|
60
62
|
end
|
@@ -63,7 +65,7 @@ class RBackup
|
|
63
65
|
inc1ude = []
|
64
66
|
exclude = []
|
65
67
|
destination = profile['destination']
|
66
|
-
source = profile['source'].
|
68
|
+
source = [ profile['source'] ].flatten
|
67
69
|
|
68
70
|
options = "--delete --numeric-ids --safe-links -axzSvL"
|
69
71
|
# --delete delete extraneous files from dest dirs
|
@@ -86,11 +88,11 @@ class RBackup
|
|
86
88
|
|
87
89
|
if profile['include']
|
88
90
|
exclude = %w(*) unless profile['exclude']
|
89
|
-
inc1ude = profile['include'].
|
91
|
+
inc1ude = [ profile['include'] ].flatten
|
90
92
|
end
|
91
93
|
|
92
94
|
if profile['exclude']
|
93
|
-
exclude += profile['exclude'].
|
95
|
+
exclude += [ profile['exclude'] ].flatten
|
94
96
|
end
|
95
97
|
|
96
98
|
inc1ude = inc1ude.collect { |i| "--include='#{i}'" }.join(' ')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbackup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winton Welsh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-29 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|