Module: InchCI::Gossip

Defined in:
lib/inch_ci/gossip.rb

Constant Summary collapse

GOSSIP_HOST =
load_config['server']
GOSSIP_ACTIVE =
GOSSIP_HOST.to_s != ""
GOSSIP_URL =
"http://#{GOSSIP_HOST}/projects/:event_name"

Class Method Summary collapse

Class Method Details

.load_configObject


6
7
8
9
10
11
12
13
# File 'lib/inch_ci/gossip.rb', line 6

def self.load_config
  filename = File.join(Rails.root, "config", "gossip.yml")
  if File.exist?(filename)
    YAML.load(File.read(filename))
  else
    {}
  end
end

.new_build(build, project, branch) ⇒ Object


20
21
22
23
# File 'lib/inch_ci/gossip.rb', line 20

def new_build(build, project, branch)
  return if inactive?
  post('new_build', build, project, branch)
end

.update_build(build, project, branch) ⇒ Object


25
26
27
28
# File 'lib/inch_ci/gossip.rb', line 25

def update_build(build, project, branch)
  return if inactive?
  post('update_build', build, project, branch)
end