Sha256: 72ad37ef3c05010ea8defc321401eda6f7aa1187177362e59690ef3ce6b6833b

Contents?: true

Size: 451 Bytes

Versions: 12

Compression:

Stored size: 451 Bytes

Contents

require 'kirk'
require 'rack'

module Rack
  module Handler
    class Kirk
      def self.run(app, options = {})
        options[:host] = options[:Host]
        options[:port] = options[:Port]

        options[:log_level] ||= "warning"

        server = ::Kirk::Server.new(app, options)

        yield server if block_given?

        # Tears :'(
        trap(:INT) { server.stop }

        server.start
        server.join
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kirk-0.2.0.beta.7-java lib/rack/handler/kirk.rb
kirk-0.2.0.beta.6-java lib/rack/handler/kirk.rb
kirk-0.2.0.beta.5-java lib/rack/handler/kirk.rb
kirk-0.2.0.beta.4-java lib/rack/handler/kirk.rb
kirk-0.2.0.beta.3-java lib/rack/handler/kirk.rb
kirk-0.2.0.beta.2-java lib/rack/handler/kirk.rb
kirk-0.2.0.beta.1-java lib/rack/handler/kirk.rb
kirk-0.1.8-java lib/rack/handler/kirk.rb
kirk-0.1.7-java lib/rack/handler/kirk.rb
kirk-0.1.6-java lib/rack/handler/kirk.rb
kirk-0.1.5-java lib/rack/handler/kirk.rb
kirk-0.1.0-java lib/rack/handler/kirk.rb