Class: EacRedmineBase0::Tasks::System

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_redmine_base0/tasks/system.rb

Instance Method Summary collapse

Instance Method Details



8
9
10
11
# File 'lib/eac_redmine_base0/tasks/system.rb', line 8

def banner
  ::Rails.logger.info("Command string: #{command_string}")
  ::Rails.logger.info("Command arguments: #{command_args}")
end

#commandEacRubyUtils::Envs::Command

Returns:

  • (EacRubyUtils::Envs::Command)


14
15
16
# File 'lib/eac_redmine_base0/tasks/system.rb', line 14

def command
  host_env.command(*command_args)
end

#command_argsArray<String>

Returns:

  • (Array<String>)


19
20
21
# File 'lib/eac_redmine_base0/tasks/system.rb', line 19

def command_args
  ::Shellwords.split(command_string)
end

#host_envEacRubyUtils::Envs::Local

Returns:

  • (EacRubyUtils::Envs::Local)


24
25
26
# File 'lib/eac_redmine_base0/tasks/system.rb', line 24

def host_env
  ::EacRubyUtils::Envs.local
end

#performObject



28
29
30
31
# File 'lib/eac_redmine_base0/tasks/system.rb', line 28

def perform
  banner
  command.system!
end