7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/everqueen/cli.rb', line 7
def execute(argv)
command = argv.shift
Everqueen.root = File.expand_path(argv.shift || '.', Dir.pwd)
if File.exist?(File.join(Everqueen.root, 'config/environment.rb'))
require File.join(Everqueen.root, 'config/environment.rb')
require 'everqueen/rails' if defined?(Rails)
end
case command
when "serve"
Everqueen::Server.new.serve
return true
when "run"
return Everqueen::Runner.new.run
else
puts "no such command '#{command}'"
return false
end
end
|