Module: EasyAppHelper
- Extended by:
- EasyAppHelper
- Included in:
- EasyAppHelper
- Defined in:
- lib/easy_app_helper.rb,
lib/easy_app_helper/config.rb,
lib/tasks/template_manager.rb,
lib/easy_app_helper/version.rb,
lib/easy_app_helper/logger/wrapper.rb,
lib/easy_app_helper/managed_logger.rb,
lib/easy_app_helper/processes/base.rb,
lib/easy_app_helper/processes/command.rb,
lib/easy_app_helper/config/initializer.rb,
lib/easy_app_helper/logger/initializer.rb,
lib/easy_app_helper/config/compatibility.rb,
lib/easy_app_helper/processes/synchronous.rb,
lib/easy_app_helper/processes/time_management.rb
Defined Under Namespace
Modules: Config, Logger, Processes, Tasks
Constant Summary
collapse
- ManagedConfig =
EasyAppHelper::Config::Initializer.build_config
- VERSION =
'3.0.9'
- ManagedLogger =
EasyAppHelper::Logger::Initializer.build_logger
Instance Method Summary
collapse
Instance Method Details
#puts_and_logs(*args) ⇒ Object
18
19
20
|
# File 'lib/easy_app_helper.rb', line 18
def puts_and_logs(*args)
logger.puts_and_logs *args
end
|
#safely_exec_code(message, *args, &block) ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'lib/easy_app_helper.rb', line 22
def safely_exec_code(message, *args, &block)
if self.config[:simulate]
puts_and_logs "[SIMULATION MODE]: #{message}" unless message.nil?
else
puts_and_logs message
block.call *args
end
end
|
#safely_exec_command(message, command, show_output = false, log_output = true) ⇒ Object
31
32
33
34
35
36
37
38
39
|
# File 'lib/easy_app_helper.rb', line 31
def safely_exec_command(message, command, show_output = false, log_output = true)
safely_exec_code message, command, show_output, log_output do |command, show_output, log_output|
process = EasyAppHelper::Processes::Base.new command
process.show_output = show_output
process.log_output = log_output
process.execute
process
end
end
|