Class: Rmails::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/rmails/runner.rb

Instance Method Summary collapse

Constructor Details

#initializeRunner

Returns a new instance of Runner.



10
11
12
13
14
15
16
# File 'lib/rmails/runner.rb', line 10

def initialize
  @passwords = []
  @interpreter = AutomateIt.new(:project => "system")
  @interpreter.include_in(self)
  @interpreter.set :rake_task, Rake::Task
  @interpreter.set :rails_root, Rails.root
end

Instance Method Details

#startObject



18
19
20
# File 'lib/rmails/runner.rb', line 18

def start
  @interpreter.sh 'thin restart -C /etc/thin/rmails.yml'
end

#stopObject



22
23
24
# File 'lib/rmails/runner.rb', line 22

def stop
  @interpreter.sh 'thin stop -C /etc/thin/rmails.yml'
end