benburkert-ey-backup 0.0.3.2 → 0.0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/bin/eybackup +8 -2
  3. metadata +1 -1
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'date'
5
5
  require 'spec/rake/spectask'
6
6
 
7
7
  GEM = "ey-backup"
8
- GEM_VERSION = "0.0.3.2"
8
+ GEM_VERSION = "0.0.3.3"
9
9
  AUTHOR = "Ezra Zygmuntowicz"
10
10
  EMAIL = "ezra@engineyard.com"
11
11
  HOMEPAGE = "http://example.com"
data/bin/eybackup CHANGED
@@ -5,8 +5,7 @@ require "optparse"
5
5
  require 'ey-backup/mysql_backup'
6
6
  require 'ey-backup/postgresql_backup'
7
7
 
8
- options = {:config => '/etc/.mysql.backups.yml',
9
- :command => :new_backup}
8
+ options = {:command => :new_backup}
10
9
 
11
10
  options[:config] = '/etc/.postgresql.backups.yml' if File.exists?('/etc/.postgresql.backups.yml')
12
11
 
@@ -54,6 +53,13 @@ end
54
53
 
55
54
  opts.parse!
56
55
 
56
+ options[:config] ||= (File.exists?('/etc/.postgresql.backups.yml') ? '/etc/.postgresql.backups.yml' : '/etc/.mysql.backups.yml')
57
+
58
+ options[:engine] ||= case
59
+ when File.exists?('/etc/.mysql.backups.yml') then 'mysql'
60
+ when File.exists?('/etc/.postgresql.backups.yml') then 'postgresql'
61
+ end
62
+
57
63
  eyb = nil
58
64
  if File.exist?(options[:config])
59
65
  eyb = case options[:engine]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benburkert-ey-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.2
4
+ version: 0.0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz