rbackup 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.markdown +8 -2
  2. data/Rakefile +0 -1
  3. data/gemspec.rb +1 -1
  4. data/lib/rbackup.rb +6 -4
  5. metadata +2 -2
@@ -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 sources -a http://gems.github.com
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
@@ -48,7 +48,6 @@ end
48
48
 
49
49
  desc "Run specs"
50
50
  Spec::Rake::SpecTask.new do |t|
51
- t.rcov = true
52
51
  t.spec_opts = ["--format", "specdoc", "--colour"]
53
52
  t.spec_files = FileList["spec/**/*_spec.rb"]
54
53
  end
data/gemspec.rb CHANGED
@@ -16,5 +16,5 @@ GEM_SPEC = Gem::Specification.new do |s|
16
16
  s.name = GEM_NAME
17
17
  s.platform = Gem::Platform::RUBY
18
18
  s.require_path = "lib"
19
- s.version = "0.1.5"
19
+ s.version = "0.1.6"
20
20
  end
@@ -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.to_a
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'].to_a
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'].to_a
91
+ inc1ude = [ profile['include'] ].flatten
90
92
  end
91
93
 
92
94
  if profile['exclude']
93
- exclude += profile['exclude'].to_a
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.5
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-27 00:00:00 -08:00
12
+ date: 2009-11-29 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15