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



10
11
12
13
# File 'lib/eac_redmine_base0/tasks/system.rb', line 10

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

#commandEacRubyUtils::Envs::Command

Returns:

  • (EacRubyUtils::Envs::Command)


16
17
18
# File 'lib/eac_redmine_base0/tasks/system.rb', line 16

def command
  host_env.command(*command_args)
end

#command_argsArray<String>

Returns:

  • (Array<String>)


21
22
23
# File 'lib/eac_redmine_base0/tasks/system.rb', line 21

def command_args
  ::Shellwords.split(command_string)
end

#host_envEacRubyUtils::Envs::Local

Returns:

  • (EacRubyUtils::Envs::Local)


26
27
28
# File 'lib/eac_redmine_base0/tasks/system.rb', line 26

def host_env
  ::EacRubyUtils::Envs.local
end

#performObject



30
31
32
33
# File 'lib/eac_redmine_base0/tasks/system.rb', line 30

def perform
  banner
  command.system!
end