sequel-rails 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,13 +47,15 @@ module Rails
47
47
  setup_controller_runtime(app)
48
48
  end
49
49
 
50
+ initializer "sequel.connect" do |app|
51
+ Rails::Sequel.setup(Rails.env)
52
+ end
53
+
50
54
  # Run setup code after_initialize to make sure all config/initializers
51
55
  # are in effect once we setup the connection. This is especially necessary
52
56
  # for the cascaded adapter wrappers that need to be declared before setup.
53
57
 
54
58
  config.after_initialize do |app|
55
- Rails::Sequel.setup(Rails.env)
56
-
57
59
  ::Sequel::Model.plugin :active_model
58
60
  ::Sequel::Model.plugin :validation_helpers
59
61
 
@@ -138,6 +138,9 @@ namespace :db do
138
138
  task :prepare do
139
139
  Rails.env = 'test'
140
140
  Rake::Task['db:reset'].invoke()
141
+ Sequel::DATABASES.each do |db|
142
+ db.disconnect
143
+ end
141
144
  end
142
145
  end
143
146
  end
data/sequel-rails.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sequel-rails}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brasten Sager (brasten)"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brasten Sager (brasten)