Sha256: 4f43aed17ec3b8311daee014ba5c9f3c4652c83b842c74fde62ae80c3cdbb93a

Contents?: true

Size: 380 Bytes

Versions: 4

Compression:

Stored size: 380 Bytes

Contents

module NYNY
  module Runner
    def optimal_runner
      return Rack::Handler::WEBrick if RUBY_PLATFORM == 'java'

      begin
        Rack::Handler::Thin
      rescue LoadError
        Rack::Handler::WEBrick
      end
    end

    def run! port=9292
      middlewares.unshift Rack::ShowExceptions, Rack::CommonLogger
      optimal_runner.run new, :Port => port
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nyny-2.0.0 lib/nyny/core-ext/runner.rb
nyny-1.0.2 lib/nyny/runner.rb
nyny-1.0.1 lib/nyny/runner.rb
nyny-1.0.0 lib/nyny/runner.rb