lib/dbcp/environment.rb in dbcp-0.1.0 vs lib/dbcp/environment.rb in dbcp-0.2.0
- old
+ new
@@ -3,11 +3,12 @@
class ExecutionError < StandardError; end
class Environment
ENVIRONMENT_PROVIDERS = [
DatabaseYamlEnvironmentProvider.new('config/database.yml'),
- UriEnvironmentProvider.new
- ]
+ UriEnvironmentProvider.new,
+ (Capistrano3EnvironmentProvider.new if defined?(Capistrano3EnvironmentProvider.new))
+ ].compact
class << self
def find(environment_name)
ENVIRONMENT_PROVIDERS.each do |provider|
environment = provider.find environment_name