Sha256: 4b380a7d45d8d1eb1029d5e46cf4d207e308168783319fc09e4783dbee3f3380

Contents?: true

Size: 442 Bytes

Versions: 93

Compression:

Stored size: 442 Bytes

Contents

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

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
honeybadger-3.2.0.beta1 lib/honeybadger/plugins/warden.rb
honeybadger-3.1.2 lib/honeybadger/plugins/warden.rb
honeybadger-3.1.1 lib/honeybadger/plugins/warden.rb
honeybadger-3.1.0 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.2 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.1 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0.beta6 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0.beta5 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0.beta4 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0.beta3 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0.beta2 lib/honeybadger/plugins/warden.rb
honeybadger-3.0.0.beta1 lib/honeybadger/plugins/warden.rb