lib/boned/cli.rb in boned-0.2.0 vs lib/boned/cli.rb in boned-0.2.1
- old
+ new
@@ -3,11 +3,10 @@
class Boned::CLI < Drydock::Command
attr_accessor :exit_code
def init
- Boned.load_config Dir.pwd, :development
Boned.connect
end
def start
if Boned.service_available?('127.0.0.1', server_opts[:port])
@@ -15,10 +14,11 @@
end
Boned::Controllers::Controller.new(server_opts).start
end
def stop
+ Boned.stop_redis
if not Boned.service_available?('127.0.0.1', server_opts[:port])
raise Boned::Server::ServerNotRunning, server_opts[:port]
end
Boned::Controllers::Controller.new(server_opts).stop
end
@@ -35,10 +35,10 @@
private
def server_opts
port = @global.port || Boned::Server::DEFAULT_PORT
- config = @global.rackup || File.join(Dir.pwd, "config.ru")
+ config = @global.rackup || File.join(BONED_HOME, "config.ru")
@server_opts ||= {
:chdir => Dir.pwd,
:environment => @global.environment || 'development',
:address => '0.0.0.0',
:port => port,
\ No newline at end of file