rehabilitate 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
data/bin/rehabilitate CHANGED
@@ -127,6 +127,7 @@ command :restore do |c|
127
127
  c.option '--steps STRING', String, "A comma separated list of steps to perform"
128
128
  c.option '--file FILE', String, "The filename to use when we skip backing up and just upload"
129
129
  c.option '--tmp STRING', String, "Where to store temporary files. Default: #{Dir.tmpdir}"
130
+ c.option '--post-hook STRING', String, "A bash command to run after the restore is done"
130
131
  c.option '--number INTEGER', Integer, "The backup number to restore (taken from 'backup list')"
131
132
  c.action do |args, options|
132
133
  options.default :steps => %w{ download uncompress restore },
@@ -149,6 +150,10 @@ command :restore do |c|
149
150
  Rehabilitate.send(cmd, options)
150
151
  end
151
152
  end
153
+ if options.post_hook
154
+ log "Running post-hook: #{options.post_hook}"
155
+ %x[ #{options.post_hook} ]
156
+ end
152
157
  cleanup(options._tmp_files) unless options.file or options.skip_cleanup
153
158
  end
154
159
  end
data/lib/rehabilitate.rb CHANGED
@@ -2,7 +2,7 @@ require 'rehabilitate/plugin'
2
2
  require 'rehabilitate/plugins/splitter'
3
3
 
4
4
  class Rehabilitate
5
- VERSION = "0.3.13"
5
+ VERSION = "0.3.14"
6
6
 
7
7
  def self.backup(options)
8
8
  driver = Plugin::create( options.driver )
data/rehabilitate.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rehabilitate}
5
- s.version = "0.3.13"
5
+ s.version = "0.3.14"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jamie van Dyke"]
9
- s.date = %q{2011-01-13}
9
+ s.date = %q{2011-01-24}
10
10
  s.default_executable = %q{rehabilitate}
11
11
  s.description = %q{Backup stuff}
12
12
  s.email = %q{jamie@fearoffish.com}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rehabilitate
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 13
10
- version: 0.3.13
9
+ - 14
10
+ version: 0.3.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jamie van Dyke
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-13 00:00:00 +00:00
18
+ date: 2011-01-24 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency