lib/honeybadger/plugins/warden.rb in honeybadger-5.2.0 vs lib/honeybadger/plugins/warden.rb in honeybadger-5.2.1

- old
+ new

@@ -1,19 +1,19 @@ -require 'honeybadger/plugin' -require 'honeybadger/ruby' - -module Honeybadger - Plugin.register do - requirement { defined?(::Warden::Manager.after_set_user) } - - execution do - ::Warden::Manager.after_set_user do |user, auth, opts| - if user.respond_to?(:id) - ::Honeybadger.context({ - :user_scope => opts[:scope].to_s, - :user_id => user.id.to_s - }) - end - end - end - end -end +require 'honeybadger/plugin' +require 'honeybadger/ruby' + +module Honeybadger + Plugin.register do + requirement { defined?(::Warden::Manager.after_set_user) } + + execution do + ::Warden::Manager.after_set_user do |user, auth, opts| + if user.respond_to?(:id) + ::Honeybadger.context({ + :user_scope => opts[:scope].to_s, + :user_id => user.id.to_s + }) + end + end + end + end +end