Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support both the ADAPTER and ADAPTERS environment variables.

  • Loading branch information...
commit 2be01b2b674d2fca68782b66aa345c7b00d04b65 1 parent 524637c
Postmodern postmodern authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/dm-core/spec/setup.rb
5 lib/dm-core/spec/setup.rb
View
@@ -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 }
Please sign in to comment.
Something went wrong with that request. Please try again.