Class: Circus::BoothClient

Inherits:
Agents::Client show all
Defined in:
lib/circus/booth_client.rb

Instance Method Summary collapse

Methods inherited from Agents::Client

#call

Constructor Details

#initialize(connection, logger) ⇒ BoothClient

Returns a new instance of BoothClient.



6
7
8
9
10
# File 'lib/circus/booth_client.rb', line 6

def initialize(connection, logger)
  super(connection)
  
  @logger = logger
end

Instance Method Details

#admit(booth, booth_id, commit_id, patch_fn, acts) ⇒ Object



16
17
18
19
# File 'lib/circus/booth_client.rb', line 16

def admit(booth, booth_id, commit_id, patch_fn, acts)
  @connection.call(booth, 'Booth', 'Booth', 'admit', 
    {'app_id' => booth_id, 'commit_id' => commit_id, 'patch_fn' => patch_fn || '', 'acts' => acts.join(',')}, @logger)
end

#create_booth(booth, name, scm_type, scm_url) ⇒ Object



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

def create_booth(booth, name, scm_type, scm_url)
  @connection.call(booth, 'Booth', 'Booth', 'create', {'name' => name, 'scm' => scm_type, 'scm_url' => scm_url}, @logger)
end

#get_ssh_key(booth) ⇒ Object



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

def get_ssh_key(booth)
  @connection.call(booth, 'Booth', 'Booth', 'get_ssh_key', {}, @logger)
end