Module: Octogate

Defined in:
lib/octogate.rb,
lib/octogate/gh.rb,
lib/octogate/events.rb,
lib/octogate/target.rb,
lib/octogate/gh/user.rb,
lib/octogate/version.rb,
lib/octogate/gh/issue.rb,
lib/octogate/gh/label.rb,
lib/octogate/gh/commit.rb,
lib/octogate/sent_event.rb,
lib/octogate/events/base.rb,
lib/octogate/events/push.rb,
lib/octogate/events/issue.rb,
lib/octogate/config_loader.rb,
lib/octogate/configuration.rb,
lib/octogate/gh/repository.rb,
lib/octogate/target_builder.rb,
lib/octogate/gh/pull_request.rb,
lib/octogate/gh/issue_comment.rb,
lib/octogate/transfer_request.rb,
lib/octogate/gh/review_comment.rb,
lib/octogate/events/pull_request.rb,
lib/octogate/events/issue_comment.rb,
lib/octogate/events/pull_request_review_comment.rb

Defined Under Namespace

Modules: Event, GH, TransferRequest Classes: Client, ConfigLoader, Configuration, Model, NotRegisteredEvent, SentEvent, Server, Target, TargetBuilder

Constant Summary collapse

REC_LIMIT =
100
VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.add_received(event) ⇒ Object



37
38
39
40
# File 'lib/octogate.rb', line 37

def add_received(event)
  received.pop if received.length > REC_LIMIT
  received.unshift event
end

.add_sent(target) ⇒ Object



32
33
34
35
# File 'lib/octogate.rb', line 32

def add_sent(target)
  sent.pop if sent.length > REC_LIMIT
  sent.unshift target
end

.configObject



16
17
18
# File 'lib/octogate.rb', line 16

def config
  @config ||= Configuration.instance
end

.find_target(key) ⇒ Object



20
21
22
# File 'lib/octogate.rb', line 20

def find_target(key)
  @config.targets.fetch(key)
end

.receivedObject



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

def received
  @received ||= []
end

.sentObject



24
25
26
# File 'lib/octogate.rb', line 24

def sent
  @sent ||= []
end