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.4.0"
Class Method Summary
collapse
Class Method Details
.add_received(event) ⇒ Object
36
37
38
39
|
# File 'lib/octogate.rb', line 36
def add_received(event)
received.pop if received.length > REC_LIMIT
received.unshift event
end
|
.add_sent(target) ⇒ Object
31
32
33
34
|
# File 'lib/octogate.rb', line 31
def add_sent(target)
sent.pop if sent.length > REC_LIMIT
sent.unshift target
end
|
.config ⇒ Object
15
16
17
|
# File 'lib/octogate.rb', line 15
def config
@config ||= Configuration.instance
end
|
.find_target(key) ⇒ Object
19
20
21
|
# File 'lib/octogate.rb', line 19
def find_target(key)
@config.targets.fetch(key)
end
|
.received ⇒ Object
27
28
29
|
# File 'lib/octogate.rb', line 27
def received
@received ||= []
end
|
.sent ⇒ Object
23
24
25
|
# File 'lib/octogate.rb', line 23
def sent
@sent ||= []
end
|