winton-active_wrapper 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/active_wrapper.gemspec +1 -1
- data/gemspec.rb +1 -1
- data/lib/active_wrapper/db.rb +8 -1
- metadata +1 -1
data/active_wrapper.gemspec
CHANGED
data/gemspec.rb
CHANGED
data/lib/active_wrapper/db.rb
CHANGED
@@ -5,7 +5,7 @@ module ActiveWrapper
|
|
5
5
|
|
6
6
|
def initialize(options)
|
7
7
|
@base = options[:base]
|
8
|
-
@env = options[:env]
|
8
|
+
@env = options[:env].to_s
|
9
9
|
end
|
10
10
|
|
11
11
|
def establish_connection
|
@@ -21,8 +21,15 @@ module ActiveWrapper
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def migrate_reset
|
24
|
+
if @@env == 'test'
|
25
|
+
stdout = $stdout
|
26
|
+
$stdout = File.new('/dev/null', 'w')
|
27
|
+
end
|
24
28
|
migrate(0)
|
25
29
|
migrate
|
30
|
+
if @@env == 'test'
|
31
|
+
$stdout = stdout
|
32
|
+
end
|
26
33
|
end
|
27
34
|
|
28
35
|
def generate_migration(name=nil)
|