macournoyer / thin

A very fast & simple Ruby web server

This URL has Read+Write access

thin / lib / thin / version.rb
100644 33 lines (24 sloc) 0.658 kb
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
33
module Thin
  # Raised when a feature is not supported on the
  # current platform.
  class PlatformNotSupported < RuntimeError; end
  
  module VERSION #:nodoc:
    MAJOR = 0
    MINOR = 7
    TINY = 1
    
    STRING = [MAJOR, MINOR, TINY].join('.')
    
    CODENAME = 'Fancy Pants'
    
    RACK = [0, 3].freeze # Latest Rack version that was tested
  end
  
  NAME = 'thin'.freeze
  SERVER = "#{NAME} #{VERSION::STRING} codename #{VERSION::CODENAME}".freeze
  
  def self.win?
    RUBY_PLATFORM =~ /mswin/
  end
  
  def self.linux?
    RUBY_PLATFORM =~ /linux/
  end
  
  def self.ruby_18?
    RUBY_VERSION =~ /^1\.8/
  end
end