Permalink
Browse files

Merge pull request #298 from tpitale/handle-addressable-2.4

Restore addressable v2.4
  • Loading branch information...
2 parents fc68d0e + 4c24125 commit 226c5af8609a2e1da3bf3ee0b29a874401a49c0b @tpitale tpitale committed May 25, 2016
Showing with 11 additions and 4 deletions.
  1. +1 −1 dm-core.gemspec
  2. +8 −1 lib/dm-core/adapters.rb
  3. +2 −2 spec/public/setup_spec.rb
View
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
gem.test_files = `git ls-files -- spec/*`.split($/)
gem.extra_rdoc_files = %w[LICENSE README.md]
- gem.add_runtime_dependency('addressable', '~> 2.3.0', '>= 2.3.5')
+ gem.add_runtime_dependency('addressable', '~> 2.3', '>= 2.3.5')
gem.add_development_dependency('rake', '~> 10.0.3')
gem.add_development_dependency('rspec', '~> 1.3.2')
View
@@ -237,7 +237,14 @@ def legacy_path(name)
#
# @api private
def normalize_adapter_name(name)
- (original = name.to_s) == 'sqlite3' ? 'sqlite' : original
+ case (original = name.to_s)
+ when 'sqlite3'
+ 'sqlite'
+ when 'inmemory' # Addressable >= v2.4 does not support underscores in scheme
+ 'in_memory'
+ else
+ original
+ end
end
end
@@ -4,7 +4,7 @@
describe '.setup' do
describe 'using connection string' do
before :all do
- @return = DataMapper.setup(:setup_test, 'in_memory://user:pass@hostname:1234/path?foo=bar&baz=foo#fragment')
+ @return = DataMapper.setup(:setup_test, 'inmemory://user:pass@hostname:1234/path?foo=bar&baz=foo#fragment')
@options = @return.options
end
@@ -22,7 +22,7 @@
end
{
- :adapter => 'in_memory',
+ :adapter => 'inmemory',
:user => 'user',
:password => 'pass',
:host => 'hostname',

0 comments on commit 226c5af

Please sign in to comment.