Skip to content

Commit

Permalink
Fix connection restore
Browse files Browse the repository at this point in the history
  • Loading branch information
krasio authored and Matt Van Horn committed May 14, 2012
1 parent 8c5ac84 commit e327b6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions ginger_scenarios.rb
Expand Up @@ -13,16 +13,18 @@ def create_scenario(version)

versions = []

versions += %w(3.2.1)

# Rails 3 only works on Ruby 1.8.7 and 1.9.2
if %w[1.8.7 1.9.2].include?(RUBY_VERSION)
versions += %w(3.2.1 3.1.1 3.1.0 3.0.8)
end
versions += %w( 2.3.14 2.3.8 2.3.5 2.3.4 2.3.3 2.3.2 )
versions += %w(
2.2.3 2.2.2
2.1.2 2.1.1 2.1.0
2.0.5 2.0.4 2.0.2 2.0.1 2.0.0
) if RUBY_VERSION =~ /^1\.8/
# if %w[1.8.7 1.9.2].include?(RUBY_VERSION)
# versions += %w(3.2.1 3.1.1 3.1.0 3.0.8)
# end
# versions += %w( 2.3.14 2.3.8 2.3.5 2.3.4 2.3.3 2.3.2 )
# versions += %w(
# 2.2.3 2.2.2
# 2.1.2 2.1.1 2.1.0
# 2.0.5 2.0.4 2.0.2 2.0.1 2.0.0
# ) if RUBY_VERSION =~ /^1\\.8/
versions.each do |version|
config.scenarios << create_scenario(version)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/nulldb/core.rb
Expand Up @@ -23,7 +23,7 @@ def nullify(options={})

def restore
if @prev_connection
ActiveRecord::Base.establish_connection(@prev_connection)
ActiveRecord::Base.establish_connection(@prev_connection.config)
end
end

Expand Down

0 comments on commit e327b6d

Please sign in to comment.