Sha256: 2089115f9dec38100bc8bc2fafcdf9c80737c19a92d838b9d1b7b8b38f7fc3b3

Contents?: true

Size: 834 Bytes

Versions: 8

Compression:

Stored size: 834 Bytes

Contents

require 'swiftcore/evented_mongrel'
require 'merb-core/rack/handler/mongrel'
module Merb
  module Rack

    class EventedMongrel < Mongrel
      # Starts Mongrel as evented.
      #
      # ==== Parameters
      # opts<Hash>:: Options for Mongrel (see below).
      #
      # ==== Options (opts)
      # :host<String>:: The hostname that Mongrel should serve.
      # :port<Fixnum>:: The port Mongrel should bind to.
      # :app<String>>:: The application name.
      def self.start(opts={})
        Merb.logger.warn!("Using EventedMongrel adapter")
        Merb::Dispatcher.use_mutex = false
        server = ::Mongrel::HttpServer.new(opts[:host], opts[:port].to_i)
        Merb::Server.change_privilege
        server.register('/', ::Merb::Rack::Handler::Mongrel.new(opts[:app]))
        server.run.join
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
wycats-merb-core-0.9.8 lib/merb-core/rack/adapter/evented_mongrel.rb
thorero-0.9.4.5 lib/merb-core/rack/adapter/evented_mongrel.rb
merb-core-0.9.3 lib/merb-core/rack/adapter/evented_mongrel.rb
merb-core-0.9.5 lib/merb-core/rack/adapter/evented_mongrel.rb
merb-core-0.9.4 lib/merb-core/rack/adapter/evented_mongrel.rb
merb-core-0.9.6 lib/merb-core/rack/adapter/evented_mongrel.rb
merb-core-0.9.7 lib/merb-core/rack/adapter/evented_mongrel.rb
thorero-core-0.9.4.6 lib/merb-core/rack/adapter/evented_mongrel.rb