sequel-rails 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -32,8 +32,6 @@ module Rails
32
32
 
33
33
  initializer 'sequel.configuration' do |app|
34
34
  configure_sequel(app)
35
-
36
- Rails::Sequel.setup(Rails.env)
37
35
  end
38
36
 
39
37
  initializer 'sequel.logger' do |app|
@@ -54,6 +52,8 @@ module Rails
54
52
  # for the cascaded adapter wrappers that need to be declared before setup.
55
53
 
56
54
  config.after_initialize do |app|
55
+ Rails::Sequel.setup(Rails.env)
56
+
57
57
  ::Sequel::Model.plugin :active_model
58
58
  ::Sequel::Model.plugin :validation_helpers
59
59
 
@@ -115,7 +115,7 @@ module Rails
115
115
 
116
116
  class Mysql < Storage
117
117
  def _create
118
- execute("CREATE DATABASE `#{database}` DEFAULT CHARACTER SET #{charset} DEFAULT COLLATE #{collation}")
118
+ execute("CREATE DATABASE IF NOT EXISTS `#{database}` DEFAULT CHARACTER SET #{charset} DEFAULT COLLATE #{collation}")
119
119
  end
120
120
 
121
121
  def _drop
@@ -183,7 +183,7 @@ module Rails
183
183
  def _create
184
184
  if _is_mysql?
185
185
  ::Sequel.connect("#{_root_url}#{_params}") do |db|
186
- db.execute("CREATE DATABASE `#{db_name}` DEFAULT CHARACTER SET #{charset} DEFAULT COLLATE #{collation}")
186
+ db.execute("CREATE DATABASE IF NOT EXISTS `#{db_name}` DEFAULT CHARACTER SET #{charset} DEFAULT COLLATE #{collation}")
187
187
  end
188
188
  end
189
189
  end
data/sequel-rails.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sequel-rails}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
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)"]
12
- s.date = %q{2010-08-05}
12
+ s.date = %q{2010-08-11}
13
13
  s.description = %q{Integrate Sequel with Rails 3}
14
14
  s.email = %q{brasten@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brasten Sager (brasten)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-05 00:00:00 -07:00
17
+ date: 2010-08-11 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency