Class: JiraCache::WebhookApp
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- JiraCache::WebhookApp
- Defined in:
- lib/jira_cache/webhook_app.rb
Overview
A Sinatra::Base application to process JIRA webhooks.
Defines 2 routes:
- GET /: provides a basic JSON status,
- POST /: which processes a webhook.
Instance Method Summary collapse
-
#client ⇒ Object
Returns the client (‘JiraCache::Client`) defined on the class (see `JiraCache.webhook_app(…)`).
- #default_response ⇒ Object
Instance Method Details
#client ⇒ Object
Returns the client (‘JiraCache::Client`) defined on the class (see `JiraCache.webhook_app(…)`).
43 44 45 |
# File 'lib/jira_cache/webhook_app.rb', line 43 def client self.class.client end |
#default_response ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/jira_cache/webhook_app.rb', line 47 def default_response { app: "jira_cache/webhook_app", status: "ok", client: client.info }.to_json end |