Module: Hubeye::Server
- Included in:
- Server
- Defined in:
- lib/hubeye/server/commit.rb,
lib/hubeye/server/server.rb,
lib/hubeye/server/session.rb,
lib/hubeye/server/tracker.rb,
lib/hubeye/server/strategies/exit.rb,
lib/hubeye/server/strategies/next.rb,
lib/hubeye/server/strategies/rm_repo.rb,
lib/hubeye/server/strategies/add_hook.rb,
lib/hubeye/server/strategies/add_repo.rb,
lib/hubeye/server/strategies/decision.rb,
lib/hubeye/server/strategies/shutdown.rb,
lib/hubeye/server/strategies/load_hook.rb,
lib/hubeye/server/strategies/load_repo.rb,
lib/hubeye/server/strategies/save_hook.rb,
lib/hubeye/server/strategies/save_repo.rb,
lib/hubeye/server/strategies/list_hooks.rb,
lib/hubeye/server/strategies/list_tracking.rb
Defined Under Namespace
Modules: Strategies Classes: Commit, Server, Session, Tracker
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.
-
#tracker ⇒ Object
readonly
Returns the value of attribute tracker.
Instance Method Summary collapse
- #full_repo_name(repo) ⇒ Object
-
#start(port, options = {}) ⇒ Object
main server loop.
Instance Attribute Details
#daemonized ⇒ Object (readonly)
Returns the value of attribute daemonized.
19 20 21 |
# File 'lib/hubeye/server/server.rb', line 19 def daemonized @daemonized end |
#remote_connection ⇒ Object
Returns the value of attribute remote_connection.
18 19 20 |
# File 'lib/hubeye/server/server.rb', line 18 def remote_connection @remote_connection end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
19 20 21 |
# File 'lib/hubeye/server/server.rb', line 19 def session @session end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
19 20 21 |
# File 'lib/hubeye/server/server.rb', line 19 def socket @socket end |
#sockets ⇒ Object (readonly)
Returns the value of attribute sockets.
19 20 21 |
# File 'lib/hubeye/server/server.rb', line 19 def sockets @sockets end |
#tracker ⇒ Object (readonly)
Returns the value of attribute tracker.
19 20 21 |
# File 'lib/hubeye/server/server.rb', line 19 def tracker @tracker end |
Instance Method Details
#full_repo_name(repo) ⇒ Object
79 80 81 82 |
# File 'lib/hubeye/server/server.rb', line 79 def full_repo_name(repo) return repo if repo.include? '/' [@session.username, repo].join '/' end |
#start(port, options = {}) ⇒ Object
main server loop
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/hubeye/server/server.rb', line 63 def start(port, ={}) listen(port) setup_env() loop do unless @remote_connection look_for_changes client_connect(@sockets) end catch(:invalid_input) do decision = Strategies::Decision.new(self) decision.call_strategy end @session.cleanup! end end |