class CommitLive::Sentry
Attributes
netrc[RW]
Public Class Methods
new()
click to toggle source
# File lib/commit-live/sentry.rb, line 8 def initialize() @netrc = CommitLive::NetrcInteractor.new() end
Public Instance Methods
log_exception(the_exception, other_args)
click to toggle source
# File lib/commit-live/sentry.rb, line 41 def log_exception(the_exception, other_args) Raven.capture_message(the_exception, :extra => merge_user_info_with_other_args(other_args) ) puts "Something went wrong. Commit.Live Admin has been notified about the issue. Please wait until further instructions." exit 1 end
log_message(message, other_args)
click to toggle source
# File lib/commit-live/sentry.rb, line 33 def log_message(message, other_args) Raven.capture_message("#{username} - #{message}", :extra => merge_user_info_with_other_args(other_args) ) puts "Something went wrong. Commit.Live Admin has been notified about the issue. Please wait until further instructions." exit 1 end
merge_user_info_with_other_args(other_args)
click to toggle source
# File lib/commit-live/sentry.rb, line 29 def merge_user_info_with_other_args(other_args) user_info.merge(other_args) end
token()
click to toggle source
# File lib/commit-live/sentry.rb, line 12 def token netrc.read netrc.password end
user_info()
click to toggle source
# File lib/commit-live/sentry.rb, line 22 def user_info { 'username' => username, 'token' => token } end
username()
click to toggle source
# File lib/commit-live/sentry.rb, line 17 def username netrc.read(machine: 'ga-extra') netrc.login end