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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{active_wrapper}
5
- s.version = "0.1.3"
5
+ s.version = "0.1.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Winton Welsh"]
data/gemspec.rb CHANGED
@@ -15,5 +15,5 @@ GEM_SPEC = Gem::Specification.new do |s|
15
15
  s.name = GEM_NAME
16
16
  s.platform = Gem::Platform::RUBY
17
17
  s.require_path = "lib"
18
- s.version = "0.1.3"
18
+ s.version = "0.1.4"
19
19
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winton-active_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh