class Vidar::SentryNotification
Attributes
connection[R]
revision[R]
webhook_url[R]
Public Class Methods
new(revision:, deploy_config:)
click to toggle source
# File lib/vidar/sentry_notification.rb, line 3 def initialize(revision:, deploy_config:) @revision = revision @webhook_url = deploy_config.sentry_webhook_url @connection = Faraday.new end
Public Instance Methods
call()
click to toggle source
# File lib/vidar/sentry_notification.rb, line 13 def call connection.post do |req| req.url webhook_url req.headers['Content-Type'] = 'application/json' req.body = data.to_json end end
configured?()
click to toggle source
# File lib/vidar/sentry_notification.rb, line 9 def configured? !webhook_url.to_s.empty? end
Private Instance Methods
data()
click to toggle source
# File lib/vidar/sentry_notification.rb, line 25 def data { "version": revision } end