Module: EasyAppHelper
- Extended by:
- EasyAppHelper
- Included in:
- EasyAppHelper, Scripts::Master, Scripts::SubCommandBase
- Defined in:
- lib/easy_app_helper.rb,
lib/easy_app_helper/input.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/scripts/common.rb,
lib/easy_app_helper/scripts/master.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/scripts/completion.rb,
lib/easy_app_helper/config/compatibility.rb,
lib/easy_app_helper/processes/synchronous.rb,
lib/easy_app_helper/scripts/sub_command_base.rb,
lib/easy_app_helper/processes/time_management.rb,
lib/easy_app_helper/scripts/parameters_helper.rb,
lib/easy_app_helper/scripts/sub_command_manager.rb
Defined Under Namespace
Modules: Config, Input, Logger, Processes, Scripts, Tasks
Constant Summary
collapse
- ManagedConfig =
EasyAppHelper::Config::Initializer.build_config
- VERSION =
'4.2.0'
- ManagedLogger =
EasyAppHelper::Logger::Initializer.build_logger
Instance Method Summary
collapse
Instance Method Details
#puts_and_logs(*args) ⇒ Object
19
20
21
|
# File 'lib/easy_app_helper.rb', line 19
def puts_and_logs(*args)
logger.puts_and_logs *args
end
|
#safely_exec_code(message, *args, &block) ⇒ Object
23
24
25
26
27
28
29
30
|
# File 'lib/easy_app_helper.rb', line 23
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, &log_processor) ⇒ Object
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/easy_app_helper.rb', line 32
def safely_exec_command(message, command, show_output = false, log_output = true, &log_processor)
message = command if message.nil? or message.empty?
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 &log_processor
process
end
end
|