Module: HelloGoodbye

Defined in:
lib/hello_goodbye.rb,
lib/hello_goodbye/console.rb,
lib/hello_goodbye/foreman.rb,
lib/hello_goodbye/version.rb,
lib/hello_goodbye/json/request.rb,
lib/hello_goodbye/json/response.rb,
lib/hello_goodbye/foremen_manager.rb,
lib/hello_goodbye/consoles/foreman_console.rb,
lib/hello_goodbye/consoles/manager_console.rb

Defined Under Namespace

Classes: Console, Foreman, ForemanConsole, ForemenManager, ManagerConsole, Request, Response

Constant Summary collapse

VERSION =
File.read(File.dirname(__FILE__) + "/../../VERSION").chomp

Class Method Summary collapse

Class Method Details

.manager(port = ForemenManager.default_manager_port, server = Foreman.default_server) ⇒ Object

Create a new manager or use the existing manager. If an existing manager exists, port and server will be ignored. Parameters:

  • port: The port the manager should connect to.

  • server: The server the service will run from.



21
22
23
# File 'lib/hello_goodbye.rb', line 21

def self.manager(port=ForemenManager.default_manager_port,server=Foreman.default_server)
  @manager ||= ForemenManager.new(:port => port, :server => server)
end

.reset!Object

Resets the current foremen manager, so that the next time self.manager is called, a new ForemenManager instance will be created.



12
13
14
# File 'lib/hello_goodbye.rb', line 12

def self.reset!
  @manager = nil
end