Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

sometimes normalized_uri was generating wrong uri #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/dm-do-adapter/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def normalized_uri
port = @options[:port].nil? ? nil : @options[:port].to_int

DataObjects::URI.new(
:scheme => @options[:adapter],
:scheme => @options[:scheme] || @options[:adapter],
:user => @options[:user] || @options[:username],
:password => @options[:password],
:host => @options[:host],
Expand Down Expand Up @@ -266,7 +266,7 @@ def initialize(name, uri_or_options)
super

# Default the driver-specific logger to DataMapper's logger
if driver_module = DataObjects.const_get(normalized_uri.scheme.capitalize)
if driver_module = DataObjects.adapter_name(normalized_uri)
driver_module.logger = DataMapper.logger if driver_module.respond_to?(:logger=)
end
end
Expand Down