Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 21 lines (15 sloc) 423 Bytes
#!/usr/bin/env ruby
require 'pomodoro'
require 'thin'
rackup_file = "#{File.dirname(__FILE__)}/../lib/pomodoro/config.ru"
Thread.new do
loop do
Pomodoro.work
sleep 300 # sleep for 5 minutes
end
end
argv = ARGV
argv << ["-R", rackup_file] unless ARGV.include?("-R")
argv << ["-p", "80"] unless ARGV.include?("-p")
argv << ["-e", "production"] unless ARGV.include?("-e")
Thin::Runner.new(argv.flatten).run!