Class: Thin::Commands::Server::Start
- Inherits:
-
Base
- Object
- Thin::Command
- Base
- Thin::Commands::Server::Start
- Defined in:
- lib/thin/commands/server/start.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#daemonize ⇒ Object
Returns the value of attribute daemonize.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#group ⇒ Object
Returns the value of attribute group.
-
#log_file ⇒ Object
Returns the value of attribute log_file.
-
#pid_file ⇒ Object
Returns the value of attribute pid_file.
-
#port ⇒ Object
Returns the value of attribute port.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#trace ⇒ Object
Returns the value of attribute trace.
-
#user ⇒ Object
Returns the value of attribute user.
Attributes inherited from Thin::Command
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from Thin::Command
Constructor Details
This class inherits a constructor from Thin::Command
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def address @address end |
#daemonize ⇒ Object
Returns the value of attribute daemonize.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def daemonize @daemonize end |
#environment ⇒ Object
Returns the value of attribute environment.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def environment @environment end |
#group ⇒ Object
Returns the value of attribute group.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def group @group end |
#log_file ⇒ Object
Returns the value of attribute log_file.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def log_file @log_file end |
#pid_file ⇒ Object
Returns the value of attribute pid_file.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def pid_file @pid_file end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def port @port end |
#timeout ⇒ Object
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def timeout @timeout end |
#trace ⇒ Object
Returns the value of attribute trace.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def trace @trace end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/thin/commands/server/start.rb', line 3 def user @user end |
Class Method Details
.detailed_help ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/thin/commands/server/start.rb', line 24 def self.detailed_help <<-EOF usage: thin start [PATH] [options] Starts a new Thin web server for the Rails application in PATH (default to current directory). EOF end |
.help ⇒ Object
20 21 22 |
# File 'lib/thin/commands/server/start.rb', line 20 def self.help "Starts a new Thin web server for a Rails application." end |
Instance Method Details
#run ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/thin/commands/server/start.rb', line 5 def run Dir.chdir cwd server = Thin::RailsServer.new(address, port) server.log_file = log_file server.pid_file = pid_file server.trace = trace server.timeout = timeout.to_i server.change_privilege user, group || user if user server.start server.daemonize if daemonize server.listen! end |