module Puma

Conservative native JRuby/Java implementation of IOBuffer backed by a ByteArrayOutputStream and conversion between Ruby String and Java bytes

Constants

HTTP_STATUS_CODES

Every standard HTTP code mapped to the appropriate message. Generated with: curl -s www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \

ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
          puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
IS_JRUBY
Plugins
STATUS_WITH_NO_ENTITY_BODY
SYMBOL_TO_STATUS_CODE

Attributes

cli_config[RW]

The CLI exports its Puma::Configuration object here to allow apps to pick it up. An app needs to use it conditionally though since it is not set if the app is launched via another mechanism than the CLI class.

Public Class Methods

jruby?() click to toggle source
# File lib/puma/detect.rb, line 4
def self.jruby?
  IS_JRUBY
end
run(opts={}) { |c| ... } click to toggle source
# File lib/puma/convenient.rb, line 5
def self.run(opts={})
  cfg = Puma::Configuration.new do |c|
    if port = opts[:port]
      c.port port
    end

    c.quiet

    yield c
  end

  cfg.clamp

  events = Puma::Events.null

  launcher = Puma::Launcher.new cfg, :events => events
  launcher.run
end
windows?() click to toggle source
# File lib/puma/detect.rb, line 8
def self.windows?
  RUBY_PLATFORM =~ /mswin|ming|cygwin/
end