lib/firehose/cli.rb in firehose-0.1.0 vs lib/firehose/cli.rb in firehose-0.1.1

- old
+ new

@@ -1,10 +1,15 @@ require 'thor' require 'thin' module Firehose class CLI < Thor + desc "version", "display the current version" + def version + puts %[Firehose #{Firehose::VERSION} "#{Firehose::CODENAME}"] + end + desc "server", "starts the firehose server" method_option :port, :type => :numeric, :default => Firehose::Default::URI.port, :required => true, :aliases => '-p' method_option :host, :type => :string, :default => '0.0.0.0', :required => true, :aliases => '-h' def server @@ -12,11 +17,11 @@ run Firehose::Rack::App.new end begin server.start! - rescue RuntimeError - Firehose.logger.error "Unable to connect to Redis, are you sure it's running?" + rescue + Firehose.logger.error "#{e.message}: #{e.backtrace}" raise end end end end \ No newline at end of file