Class | PhusionPassenger::Standalone::ConfigFile
In: | lib/phusion_passenger/standalone/config_file.rb
Parent: | Object

### Methods

address analytics daemonize debugger domain_name domain_names env environment max_pool_size min_instances new nginx_bin port rack_env rails_env

### Classes and Modules

Class PhusionPassenger::Standalone::ConfigFile::DisallowedContextError

### Attributes

options | [R] |

### Public Class methods

new(context, filename)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 42
    42:         def initialize(context, filename)
    43:                 @options  = {}
    44:                 @context  = context
    45:                 @filename = filename
    46:                 File.open(filename, 'r') do |f|
    47:                         f.flock(File::LOCK_SH)
    48:                         instance_eval(f.read, filename)
    49:                 end
    50:         end

### Public Instance methods

address(addr)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 52
    52:         def address(addr)
    53:                 allowed_contexts(:port, :global_config)
    54:                 @options[:address] = addr
    55:                 @options[:tcp_explicitly_given] = true
    56:         end

analytics(value)

[Source]

         # File lib/phusion_passenger/standalone/config_file.rb, line 101
    101:         def analytics(value)
    102:                 @options[:analytics] = value
    103:         end

daemonize(on)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 81
    81:         def daemonize(on)
    82:                 allowed_contexts(:daemonize, :global_config)
    83:                 @options[:daemonize] = on
    84:         end

debugger(value)

[Source]

         # File lib/phusion_passenger/standalone/config_file.rb, line 105
    105:         def debugger(value)
    106:                 @options[:debugger] = value
    107:         end

domain_name(name)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 91
    91:         def domain_name(name)
    92:                 allowed_contexts(:domain_name, :local_config)
    93:                 @options[:server_names] = [name]
    94:         end

domain_names(*names)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 96
    96:         def domain_names(*names)
    97:                 allowed_contexts(:domain_names, :local_config)
    98:                 @options[:server_names] = names.to_a.flatten
    99:         end

env(name)

Alias for #environment

environment(name)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 64
    64:         def environment(name)
    65:                 @options[:env] = name
    66:         end

max_pool_size(number)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 72
    72:         def max_pool_size(number)
    73:                 allowed_contexts(:max_pool_size, :global_config)
    74:                 @options[:max_pool_size] = number
    75:         end

min_instances(number)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 77
    77:         def min_instances(number)
    78:                 @options[:min_instances] = number
    79:         end

nginx_bin(filename)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 86
    86:         def nginx_bin(filename)
    87:                 allowed_contexts(:nginx_bin, :global_config)
    88:                 @options[:nginx_bin] = filename
    89:         end

port(number)

[Source]

        # File lib/phusion_passenger/standalone/config_file.rb, line 58
    58:         def port(number)
    59:                 allowed_contexts(:port, :global_config)
    60:                 @options[:port] = number
    61:                 @options[:tcp_explicitly_given] = true
    62:         end

rack_env(name)

Alias for #environment

rails_env(name)

Alias for #environment

[Validate]