Module: GerritEventRouter

Defined in:
lib/ger.rb,
lib/ger/broker.rb,
lib/ger/config.rb,
lib/ger/gerrit.rb,
lib/ger/router.rb,
lib/ger/version.rb,
lib/ger/constants.rb,
lib/ger/broker/amqp.rb

Defined Under Namespace

Modules: Broker Classes: Config, Gerrit, Router

Constant Summary collapse

VERSION =
"0.2.0"
NAME =
'GEROUTER'
ORIGIN =
'gerrit'
CONFIG_NAME =
'gerouter.conf'
LOG_NORMAL =
::Logger::INFO
LOG_DEBUG =
::Logger::DEBUG
SCHEMA_VERSION =
'1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.logger(level = ::Logger::INFO) ⇒ Object



19
20
21
# File 'lib/ger.rb', line 19

def logger(level = ::Logger::INFO)
  @logger ||= ::Logger.new(STDOUT).tap {|l| l.level = level }
end

Class Method Details

.load_config(path) ⇒ Object



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

def load_config(path)
  Config.new.load(path)
end

.start(name, appid, config) ⇒ Object



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

def start(name, appid, config)
  router = Router.new(name, appid, config)
  router.start
end