Class: GerritEventRouter::Gerrit::Config

Inherits:
Config::Base show all
Defined in:
lib/ger/gerrit.rb

Constant Summary collapse

DEFAULT_PORT =
29418
COMMAND =
'gerrit stream-events'
VERSION =
'gerrit version'

Instance Attribute Summary collapse

Attributes inherited from Config::Base

#name, #uri

Instance Method Summary collapse

Methods inherited from Config::Base

#initiallize

Constructor Details

#initialize(name, uri, weburl, ssh_keys, broker, routing_key) ⇒ Config

Returns a new instance of Config.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ger/gerrit.rb', line 11

def initialize(name, uri, weburl, ssh_keys, broker, routing_key)
  super(name, uri)
  if ssh_keys.kind_of? Array then
    @ssh_keys = ssh_keys
  elsif ssh_keys.kind_of? String then
    @ssh_keys= [ ssh_keys ]
  end
  @weburl = weburl
  @broker = broker
  @routing_key = routing_key
end

Instance Attribute Details

#brokerObject (readonly)

Returns the value of attribute broker.



39
40
41
# File 'lib/ger/gerrit.rb', line 39

def broker
  @broker
end

#routing_keyObject (readonly)

Returns the value of attribute routing_key.



39
40
41
# File 'lib/ger/gerrit.rb', line 39

def routing_key
  @routing_key
end

#ssh_keysObject (readonly)

Returns the value of attribute ssh_keys.



39
40
41
# File 'lib/ger/gerrit.rb', line 39

def ssh_keys
  @ssh_keys
end

#weburlObject (readonly)

Returns the value of attribute weburl.



39
40
41
# File 'lib/ger/gerrit.rb', line 39

def weburl
  @weburl
end

Instance Method Details

#commandObject



27
28
29
# File 'lib/ger/gerrit.rb', line 27

def command
  COMMAND
end

#default_portObject



23
24
25
# File 'lib/ger/gerrit.rb', line 23

def default_port
  DEFAULT_PORT
end

#headerObject



35
36
37
# File 'lib/ger/gerrit.rb', line 35

def header
  Gerrit::HEADER
end

#versionObject



31
32
33
# File 'lib/ger/gerrit.rb', line 31

def version
  VERSION
end