dbdump_command 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,8 +25,9 @@ module Rails
25
25
  abort opt.to_s unless (0..1).include?(ARGV.size)
26
26
  end
27
27
 
28
- unless config = YAML::load(ERB.new(IO.read("#{@app.root}/config/database.yml")).result)[Rails.env]
29
- abort "No database is configured for the environment '#{Rails.env}'"
28
+ env = ARGV.first || Rails.env
29
+ unless config = YAML::load(ERB.new(IO.read("#{@app.root}/config/database.yml")).result)[env]
30
+ abort "No database is configured for the environment '#{env}'"
30
31
  end
31
32
 
32
33
 
@@ -1,3 +1,3 @@
1
1
  module DbdumpCommand
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbdump_command
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Will Bryant