Sha256: 9301014c3cceadf4565798a69ceb4e07a72763dded0f831ad79dff9caa5ae2f1

Contents?: true

Size: 479 Bytes

Versions: 4

Compression:

Stored size: 479 Bytes

Contents

require 'thor'
require 'thin'

module Firehose
  class CLI < Thor
    desc "server", "starts the firehose server"
    method_option :port, :type => :numeric, :default => 7474, :required => true, :aliases => '-p'
    method_option :host, :type => :string, :default => '0.0.0.0', :required => true, :aliases => '-h'
    def server
      server = Thin::Server.new(options[:host], options[:port]) do
        run Firehose::Rack::App.new
      end
      server.start!
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
firehose-0.0.12 lib/firehose/cli.rb
firehose-0.0.11 lib/firehose/cli.rb
firehose-0.0.10 lib/firehose/cli.rb
firehose-0.0.9 lib/firehose/cli.rb