Class: Popper::Action::ExecCmd

Inherits:
Base
  • Object
show all
Defined in:
lib/popper/action/exec_cmd.rb

Class Method Summary collapse

Methods inherited from Base

do_action?, next_action, next_run, run

Class Method Details

.action_nameObject



15
16
17
# File 'lib/popper/action/exec_cmd.rb', line 15

def self.action_name
  :exec_cmd
end

.check_paramsObject



11
12
13
# File 'lib/popper/action/exec_cmd.rb', line 11

def self.check_params
  @action_config.respond_to?(:cmd)
end

.task(mail, params = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/popper/action/exec_cmd.rb', line 4

def self.task(mail, params={})
  ::Bundler.with_clean_env do
    system("#{@action_config.cmd} '#{mail.subject}' '#{mail.utf_body}' '#{mail.from.join(";")}' '#{mail.to.join(";")}'")
  end
  params
end