Sha256: e4cc2f7a797291b15d6c8e668416f59577d963c4c264eedc89afabbaa7f4460e

Contents?: true

Size: 594 Bytes

Versions: 178

Compression:

Stored size: 594 Bytes

Contents

require "thin"
require "rack/content_length"
require "rack/chunked"

module Rack
  module Handler
    class Thin
      def self.run(app, options={})
        server = ::Thin::Server.new(options[:Host] || '0.0.0.0',
                                    options[:Port] || 8080,
                                    app)
        yield server if block_given?
        server.start
      end

      def self.valid_options
        {
          "Host=HOST" => "Hostname to listen on (default: localhost)",
          "Port=PORT" => "Port to listen on (default: 8080)",
        }
      end
    end
  end
end

Version data entries

178 entries across 152 versions & 26 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/rack-1.4.1/lib/rack/handler/thin.rb
classiccms-0.7.4 vendor/bundle/gems/rack-1.4.1/lib/rack/handler/thin.rb
classiccms-0.7.3 vendor/bundle/gems/rack-1.4.1/lib/rack/handler/thin.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb
rack-1.4.7 lib/rack/handler/thin.rb
rack-1.4.6 lib/rack/handler/thin.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/handler/thin.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/handler/thin.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/rack-1.3.5/lib/rack/handler/thin.rb
candlepin-api-0.4.0 bundle/ruby/gems/rack-1.3.5/lib/rack/handler/thin.rb
classiccms-0.7.2 vendor/bundle/gems/rack-1.4.1/lib/rack/handler/thin.rb
classiccms-0.7.1 vendor/bundle/gems/rack-1.4.1/lib/rack/handler/thin.rb
swipe-rails-0.0.5 vendor/bundle/gems/rack-1.4.5/lib/rack/handler/thin.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb
classiccms-0.7.0 vendor/bundle/gems/rack-1.4.1/lib/rack/handler/thin.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/thin.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/thin.rb