Class: CapistranoAutoMultiInstall::ConfigureWebServer
- Defined in:
- lib/capistrano_auto_multi_install/configure_web_server.rb
Instance Attribute Summary collapse
-
#server ⇒ Object
Returns the value of attribute server.
-
#server_conf_dir ⇒ Object
Returns the value of attribute server_conf_dir.
-
#server_name ⇒ Object
Returns the value of attribute server_name.
-
#server_type ⇒ Object
Returns the value of attribute server_type.
Instance Method Summary collapse
Methods inherited from Handlers
#capistrano_instance, #capture, #exists?, #fetch, #initialize, #logger, #put, #put_with_power, #run, #run_with_power, #sudo
Constructor Details
This class inherits a constructor from CapistranoAutoMultiInstall::Handlers
Instance Attribute Details
#server ⇒ Object
Returns the value of attribute server.
4 5 6 |
# File 'lib/capistrano_auto_multi_install/configure_web_server.rb', line 4 def server @server end |
#server_conf_dir ⇒ Object
Returns the value of attribute server_conf_dir.
4 5 6 |
# File 'lib/capistrano_auto_multi_install/configure_web_server.rb', line 4 def server_conf_dir @server_conf_dir end |
#server_name ⇒ Object
Returns the value of attribute server_name.
4 5 6 |
# File 'lib/capistrano_auto_multi_install/configure_web_server.rb', line 4 def server_name @server_name end |
#server_type ⇒ Object
Returns the value of attribute server_type.
4 5 6 |
# File 'lib/capistrano_auto_multi_install/configure_web_server.rb', line 4 def server_type @server_type end |
Instance Method Details
#generate_conf_files ⇒ Object
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 |
# File 'lib/capistrano_auto_multi_install/configure_web_server.rb', line 6 def generate_conf_files log I18n.t :apache_only_supported @server_name = fetch(:application_url) @server_conf_dir = fetch(:apache_conf_directory) @server_type = fetch(:passenger_or_mongrel) if server_type == 'passenger' @server = CapistranoAutoMultiInstall::Passenger.new(capistrano_instance,:logger=>logger) else server_local_conf = fetch(:mongrel_local_conf) @server.port = fetch(:mongrel_port) if fetch(:mongrel_cluster) == "no" log I18n.t :single_mongrel_selected @server = CapistranoAutoMultiInstall::Mongrel.new(capistrano_instance,:logger=>logger) else log I18n.t :cluster_mongrel_selected @server = CapistranoAutoMultiInstall::MongrelCluster.new(capistrano_instance,:logger=>logger) @server.number_instances = fetch(:number_of_mongrel_instance) end @server.local_conf_dir = server_local_conf end @server.conf_dir = @server_conf_dir @server.name = @server_name @server.generate_conf_files end |
#write ⇒ Object
33 34 35 |
# File 'lib/capistrano_auto_multi_install/configure_web_server.rb', line 33 def write @server.write end |