Module: DTR::Agent::RailsExt::WorkingEnvExt
Class Method Summary
collapse
Instance Method Summary
collapse
#preparing_database_command
Class Method Details
.included(base) ⇒ Object
43
44
45
|
# File 'lib/dtr/agent/rails_ext.rb', line 43
def self.included(base)
base.alias_method_chain :setup_environment, :preparing_database
end
|
Instance Method Details
#setup_environment_with_preparing_database ⇒ Object
47
48
49
50
51
52
53
|
# File 'lib/dtr/agent/rails_ext.rb', line 47
def setup_environment_with_preparing_database
if setup_environment_command.blank? && File.directory?('config')
DTR.debug("No setup environment command found but found 'config' directory, try default preparing database command")
self[:agent_env_setup_cmd] = preparing_database_command
end
setup_environment_without_preparing_database
end
|