lib/sequel_rails/configuration.rb in sequel-rails-0.9.11 vs lib/sequel_rails/configuration.rb in sequel-rails-0.9.12
- old
+ new
@@ -20,11 +20,11 @@
def initialize(*)
super
self.root = Rails.root
self.raw = nil
- self.logger = Rails.logger
+ self.logger = nil
self.migration_dir = nil
self.schema_dump = default_schema_dump
self.load_database_tasks = true
self.after_connect = nil
self.skip_connect = nil
@@ -37,11 +37,12 @@
def environments
@environments ||= raw.reduce(
# default config - use just the environment variable
Hash.new normalize_repository_config({})
) do |normalized, environment|
- name, config = environment.first, environment.last
+ name = environment.first
+ config = environment.last
normalized[name] = normalize_repository_config(config)
normalized
end
end
@@ -52,12 +53,12 @@
fail "Database not configured.\n" \
'Please create config/database.yml or set DATABASE_URL in environment.'
end
if normalized_config['url']
- ::Sequel.connect normalized_config['url'], normalized_config
+ ::Sequel.connect normalized_config['url'], SequelRails.deep_symbolize_keys(normalized_config)
else
- ::Sequel.connect normalized_config
+ ::Sequel.connect SequelRails.deep_symbolize_keys(normalized_config)
end.tap { after_connect.call if after_connect.respond_to?(:call) }
end
private