Sha256: b14ae19629afcdc65e0929b1b5c81702438c2a2ab2a5cdeaf5df444a379a38b1

Contents?: true

Size: 830 Bytes

Versions: 43

Compression:

Stored size: 830 Bytes

Contents

require 'rack'

module Dugway
  module Cli
    class Server < Thor::Group
      class_option :host,
        :type    => :string,
        :aliases => '-h',
        :default => '127.0.0.1',
        :desc    => 'The host address to bind to'

      class_option :port,
        :type    => :numeric,
        :aliases => '-p',
        :default => 9292,
        :desc    => "The port address to bind to"

      class_option :server,
        :type    => :string,
        :aliases => '-s',
        :default => 'thin',
        :desc    => "The server to run"

      def start
        Rack::Server.start({
          :config => File.join(Dir.pwd, 'config.ru'),
          :environment => 'none',
          :Host => options[:host],
          :Port => options[:port],
          :server => options[:server]
        })
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
dugway-1.0.8 lib/dugway/cli/server.rb
dugway-1.0.7 lib/dugway/cli/server.rb
dugway-1.0.6 lib/dugway/cli/server.rb
dugway-1.0.5 lib/dugway/cli/server.rb
dugway-1.0.4 lib/dugway/cli/server.rb
dugway-1.0.3 lib/dugway/cli/server.rb
dugway-1.0.2 lib/dugway/cli/server.rb
dugway-1.0.1 lib/dugway/cli/server.rb
dugway-1.0.0 lib/dugway/cli/server.rb
dugway-0.12.3 lib/dugway/cli/server.rb
dugway-0.12.2 lib/dugway/cli/server.rb
dugway-0.12.1 lib/dugway/cli/server.rb
dugway-0.12.0 lib/dugway/cli/server.rb
dugway-0.11.4 lib/dugway/cli/server.rb
dugway-0.11.3 lib/dugway/cli/server.rb
dugway-0.11.2 lib/dugway/cli/server.rb
dugway-0.11.1 lib/dugway/cli/server.rb
dugway-0.11.0 lib/dugway/cli/server.rb
dugway-0.10.5 lib/dugway/cli/server.rb
dugway-0.10.4 lib/dugway/cli/server.rb