module Puma
Constants
- HAS_SSL
at present, MiniSSL::Engine is only defined in extension code, not in minissl.rb
- 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
- IS_WINDOWS
- Plugins
- STATUS_WITH_NO_ENTITY_BODY
For some HTTP status codes the client only expects headers.
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
forkable?()
click to toggle source
@version 5.0.0
# File lib/puma/detect.rb, line 28 def self.forkable? ::Process.respond_to?(:fork) end
jruby?()
click to toggle source
# File lib/puma/detect.rb, line 12 def self.jruby? IS_JRUBY end
mri?()
click to toggle source
@version 5.0.0
# File lib/puma/detect.rb, line 23 def self.mri? RUBY_ENGINE == 'ruby' || RUBY_ENGINE.nil? end
set_thread_name(name)
click to toggle source
Thread name is new in Ruby 2.3
# File lib/puma.rb, line 38 def self.set_thread_name(name) return unless Thread.current.respond_to?(:name=) Thread.current.name = "puma #{name}" end
ssl?()
click to toggle source
# File lib/puma/detect.rb, line 6 def self.ssl? HAS_SSL end
stats()
click to toggle source
@!attribute [rw] stats_object
# File lib/puma.rb, line 27 def self.stats Puma::JSON.generate @get_stats.stats end
stats_hash()
click to toggle source
@!attribute [r] ::stats_hash @version 5.0.0
# File lib/puma.rb, line 33 def self.stats_hash @get_stats.stats end
stats_object=(val)
click to toggle source
@!attribute [rw] stats_object=
# File lib/puma.rb, line 22 def self.stats_object=(val) @get_stats = val end
windows?()
click to toggle source
# File lib/puma/detect.rb, line 18 def self.windows? IS_WINDOWS end