Module: Hubeye::Server
- Included in:
- Server
- Defined in:
- lib/hubeye/server/commit.rb,
lib/hubeye/server/server.rb,
lib/hubeye/server/session.rb
Defined Under Namespace
Classes: AddHook, AddRepo, Commit, Exit, ListHooks, ListTracking, LoadHook, LoadRepo, Next, RmRepo, SaveHook, SaveRepo, Server, Session, Shutdown, Strategy
Constant Summary collapse
- CONFIG_FILE =
File.join(ENV['HOME'], ".hubeye", "hubeyerc")
- CONFIG =
{}
Instance Attribute Summary collapse
-
#daemonized ⇒ Object
readonly
Returns the value of attribute daemonized.
-
#remote_connection ⇒ Object
Returns the value of attribute remote_connection.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#socket ⇒ Object
readonly
Returns the value of attribute socket.
-
#sockets ⇒ Object
readonly
Returns the value of attribute sockets.
Instance Method Summary collapse
Instance Attribute Details
#daemonized ⇒ Object (readonly)
Returns the value of attribute daemonized.
11 12 13 |
# File 'lib/hubeye/server/server.rb', line 11 def daemonized @daemonized end |
#remote_connection ⇒ Object
Returns the value of attribute remote_connection.
10 11 12 |
# File 'lib/hubeye/server/server.rb', line 10 def remote_connection @remote_connection end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
11 12 13 |
# File 'lib/hubeye/server/server.rb', line 11 def session @session end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
11 12 13 |
# File 'lib/hubeye/server/server.rb', line 11 def socket @socket end |
#sockets ⇒ Object (readonly)
Returns the value of attribute sockets.
11 12 13 |
# File 'lib/hubeye/server/server.rb', line 11 def sockets @sockets end |
Instance Method Details
#start(port, options = {}) ⇒ Object
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/hubeye/server/server.rb', line 459 def start(port, ={}) listen(port) setup_env() loop do waiting = catch(:connect) do look_for_changes unless @remote_connection end client_connect(@sockets) if waiting catch(:invalid_input) do strategy = Strategy.new(self) strategy.call end @session.cleanup end end |