Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Sequel was holding open connection during "rake spec". Causes probl…

…ems with single-connection DBs. Fixed.
  • Loading branch information...
commit b2897ba34566570d5b12f892d7d413c1f90684be 1 parent f327d8e
Brasten Sager authored
6 lib/sequel-rails/railtie.rb
View
@@ -47,13 +47,15 @@ class Railtie < Rails::Railtie
setup_controller_runtime(app)
end
+ initializer "sequel.connect" do |app|
+ Rails::Sequel.setup(Rails.env)
+ end
+
# Run setup code after_initialize to make sure all config/initializers
# are in effect once we setup the connection. This is especially necessary
# for the cascaded adapter wrappers that need to be declared before setup.
config.after_initialize do |app|
- Rails::Sequel.setup(Rails.env)
-
::Sequel::Model.plugin :active_model
::Sequel::Model.plugin :validation_helpers
3  lib/sequel-rails/railties/database.rake
View
@@ -138,6 +138,9 @@ namespace :db do
task :prepare do
Rails.env = 'test'
Rake::Task['db:reset'].invoke()
+ Sequel::DATABASES.each do |db|
+ db.disconnect
+ end
end
end
end
2  sequel-rails.gemspec
View
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{sequel-rails}
- s.version = "0.1.6"
+ s.version = "0.1.7"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Brasten Sager (brasten)"]
Please sign in to comment.
Something went wrong with that request. Please try again.