2009-03-01 03:45:58 -05:00
|
|
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
2020-01-20 19:43:01 -05:00
|
|
|
require 'database_cleaner/version'
|
2009-03-01 03:45:58 -05:00
|
|
|
require 'database_cleaner/configuration'
|
2019-12-12 01:44:51 -05:00
|
|
|
require 'database_cleaner/deprecation'
|
2018-05-04 15:18:12 -04:00
|
|
|
require 'forwardable'
|
2009-03-05 00:11:58 -05:00
|
|
|
|
2013-05-27 17:53:36 -04:00
|
|
|
module DatabaseCleaner
|
2018-03-24 11:13:50 -04:00
|
|
|
class << self
|
2018-05-04 15:18:12 -04:00
|
|
|
extend Forwardable
|
|
|
|
delegate [
|
|
|
|
:[],
|
|
|
|
:app_root=,
|
|
|
|
:app_root,
|
|
|
|
:logger=,
|
|
|
|
:logger,
|
2018-05-26 21:34:04 -04:00
|
|
|
:cleaners,
|
|
|
|
:cleaners=,
|
2018-05-04 15:18:12 -04:00
|
|
|
:strategy=,
|
|
|
|
:orm=,
|
|
|
|
:start,
|
|
|
|
:clean,
|
|
|
|
:clean_with,
|
|
|
|
:cleaning,
|
|
|
|
] => :configuration
|
|
|
|
|
2018-04-20 11:34:21 -04:00
|
|
|
attr_accessor :allow_remote_database_url, :allow_production, :url_whitelist
|
2018-03-24 11:13:50 -04:00
|
|
|
|
2018-05-04 15:18:12 -04:00
|
|
|
private
|
|
|
|
|
|
|
|
def configuration
|
|
|
|
@configuration ||= Configuration.new
|
|
|
|
end
|
2013-05-27 17:53:36 -04:00
|
|
|
end
|
|
|
|
end
|