Class: RailsInstaller::WebServer

Inherits:
Object
  • Object
show all
Defined in:
lib/rails-installer/web-servers.rb

Overview

Parent class for webserver plugins for the installer. To create a new webserver handler, subclass this class and define a ‘start’ and ‘stop’ class method.

Direct Known Subclasses

External, Mongrel, MongrelCluster

Defined Under Namespace

Classes: External, Mongrel, MongrelCluster

Constant Summary collapse

@@server_map =
{}

Class Method Summary collapse

Class Method Details

.inherited(sub) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/rails-installer/web-servers.rb', line 19

def self.inherited(sub)
  name = sub.to_s.gsub(/^.*::/,'').gsub(/([A-Z])/) do |match|
    "_#{match.downcase}"
  end.gsub(/^_/,'')

  @@server_map[name] = sub
end

.serversObject



27
28
29
# File 'lib/rails-installer/web-servers.rb', line 27

def self.servers
  @@server_map
end

.start(installer, foreground) ⇒ Object

Start the server



10
11
12
# File 'lib/rails-installer/web-servers.rb', line 10

def self.start(installer, foreground)
  raise "Not Implemented"
end

.stop(installer, foreground) ⇒ Object

Stop the server



15
16
17
# File 'lib/rails-installer/web-servers.rb', line 15

def self.stop(installer, foreground)
  raise "Not Implemented"
end