Module: DatabaseCleaner
- Extended by:
- Forwardable
- Defined in:
- lib/database_cleaner.rb,
lib/database_cleaner/base.rb,
lib/database_cleaner/version.rb,
lib/database_cleaner/safeguard.rb,
lib/database_cleaner/deprecation.rb,
lib/database_cleaner/generic/base.rb,
lib/database_cleaner/configuration.rb,
lib/database_cleaner/null_strategy.rb,
lib/database_cleaner/orm_autodetector.rb,
lib/database_cleaner/generic/truncation.rb,
lib/database_cleaner/generic/transaction.rb,
lib/database_cleaner/spec/database_helper.rb
Defined Under Namespace
Modules: Generic, Spec Classes: Base, Cleaners, Configuration, Deprecator, NoORMDetected, NullStrategy, Safeguard, UnknownStrategySpecified
Constant Summary collapse
- VERSION =
"1.8.5"
Class Attribute Summary collapse
-
.allow_production ⇒ Object
Returns the value of attribute allow_production.
-
.allow_remote_database_url ⇒ Object
Returns the value of attribute allow_remote_database_url.
-
.url_whitelist ⇒ Object
Returns the value of attribute url_whitelist.
Class Method Summary collapse
Class Attribute Details
.allow_production ⇒ Object
Returns the value of attribute allow_production.
34 35 36 |
# File 'lib/database_cleaner.rb', line 34 def allow_production @allow_production end |
.allow_remote_database_url ⇒ Object
Returns the value of attribute allow_remote_database_url.
34 35 36 |
# File 'lib/database_cleaner.rb', line 34 def allow_remote_database_url @allow_remote_database_url end |
.url_whitelist ⇒ Object
Returns the value of attribute url_whitelist.
34 35 36 |
# File 'lib/database_cleaner.rb', line 34 def url_whitelist @url_whitelist end |
Class Method Details
.called_externally?(file, caller) ⇒ Boolean
9 10 11 |
# File 'lib/database_cleaner/deprecation.rb', line 9 def called_externally?(file, caller) file != caller.first[/^(.+\.rb):\d+/, 1] end |
.can_detect_orm? ⇒ Boolean
36 37 38 39 |
# File 'lib/database_cleaner.rb', line 36 def can_detect_orm? DatabaseCleaner.deprecate "Calling `DatabaseCleaner.can_detect_orm?` is deprecated, and will be removed in database_cleaner 2.0 with no replacement." DatabaseCleaner::Base.autodetect_orm end |
.deprecate(message) ⇒ Object
2 3 4 5 6 |
# File 'lib/database_cleaner/deprecation.rb', line 2 def deprecate method = caller.first[/\d+:in `(.*)'$/, 1].to_sym @@deprecator ||= Deprecator.new @@deprecator.deprecate method, end |