Class: Capistrano::Extensions::Server::Nginx
- Defined in:
- lib/capistrano-exts/servers/web_server/nginx.rb
Constant Summary collapse
- AVAILABLE_MODES =
[:passenger, :reverse_proxy, :php_fpm]
- NGINX_TEMPLATE_PATH =
ROOT_PATH + '/capistrano-exts/templates/web_servers/nginx.conf.erb'
Instance Method Summary collapse
-
#initialize(mode, template_path = NGINX_TEMPLATE_PATH) ⇒ Nginx
constructor
A new instance of Nginx.
Methods included from Variables
Methods included from Erb
Constructor Details
#initialize(mode, template_path = NGINX_TEMPLATE_PATH) ⇒ Nginx
Returns a new instance of Nginx.
11 12 13 14 15 16 |
# File 'lib/capistrano-exts/servers/web_server/nginx.rb', line 11 def initialize(mode, template_path = NGINX_TEMPLATE_PATH) raise ArgumentError, "The requested mode is not supported" unless AVAILABLE_MODES.include?(mode) raise ArgumentError, "The template file is not found or not readable" unless File.exists?(template_path) @mode = mode.to_sym @template = template_path end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Capistrano::Extensions::Variables