1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
module Thin
# Raised when a feature is not supported on the
# current platform.
class PlatformNotSupported < RuntimeError; end
module VERSION #:nodoc:
MAJOR = 1
MINOR = 2
TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
CODENAME = "Flaming Astroboy".freeze
RACK = [1, 0].freeze # Rack protocol version
end
NAME = 'thin'.freeze
SERVER = "#{NAME} #{VERSION::STRING} codename #{VERSION::CODENAME}".freeze
def self.win?
RUBY_PLATFORM =~ /mswin|mingw/
end
def self.linux?
RUBY_PLATFORM =~ /linux/
end
def self.ruby_18?
RUBY_VERSION =~ /^1\.8/
end
end
|