rayback 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/db2fog.rb +6 -3
  2. metadata +3 -3
@@ -10,9 +10,11 @@ require 'db2fog/railtie'
10
10
  class DB2Fog
11
11
  cattr_accessor :config
12
12
 
13
- def backup
13
+ def backup *args
14
+ options = args.extract_options!
14
15
  file_name = "dump-#{db_credentials[:database]}-#{Time.now.utc.strftime("%Y%m%d%H%M")}.sql.gz"
15
- store.store(file_name, open(database.dump))
16
+ Kernel.p options
17
+ store.store(file_name, open(database.dump(options)))
16
18
  store.store(most_recent_dump_file_name, file_name)
17
19
  end
18
20
 
@@ -91,8 +93,9 @@ class DB2Fog
91
93
  flags = "--quick --single-transaction --create-options"
92
94
  cmd = "mysqldump #{flags} #{mysql_options} #{options[:database]} " + options[:tables].join(" ")
93
95
  cmd += " | gzip -9 > #{dump_file.path}"
96
+ puts cmd
94
97
  run(cmd)
95
-
98
+ Kernel.p dump_file.path
96
99
  dump_file.path
97
100
  end
98
101
 
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rayback
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- version: "0.1"
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sasan Padidar