Permalink
Browse files

Merge pull request #187 from postmodern/adapters

Support both the ADAPTER and ADAPTERS environment variables.
  • Loading branch information...
2 parents 4ffa674 + 2be01b2 commit 14246fb8fe0a4485904b6a71e1a21a13160d1570 @solnic solnic committed Feb 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/dm-core/spec/setup.rb
@@ -42,7 +42,7 @@ def setup_logger
end
def require_spec_adapter
- desired_adapter = ENV['ADAPTER']
+ desired_adapter = (ENV['ADAPTER'] || ENV['ADAPTERS'])
if desired_adapter.nil? || desired_adapter == 'in_memory'
ENV['ADAPTER_SUPPORTS'] = 'all'
Adapters.use(Adapters::InMemoryAdapter)
@@ -52,9 +52,10 @@ def require_spec_adapter
end
def require_plugins
+ adapter = (ENV['ADAPTER'] || ENV['ADAPTERS'])
plugins = ENV['PLUGINS'] || ENV['PLUGIN']
plugins = plugins.to_s.split(/[,\s]+/)
- unless ENV['ADAPTER'] == 'in_memory'
+ unless adapter == 'in_memory'
plugins.push('dm-migrations')
end
plugins.uniq.each { |plugin| require plugin }

0 comments on commit 14246fb

Please sign in to comment.