Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in minor fixes/additions missing from current release #396

Merged
merged 3 commits into from
Nov 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ If you're a member of the core team, follow these instructions for releasing bug
* Release to rubygems

```
bundle exec rake release
gem build bugsnag.gemspec
gem push bugsnag-[version].gem
```

* Update the version running in the bugsnag-website project
Expand Down
2 changes: 1 addition & 1 deletion lib/bugsnag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
require "bugsnag/delivery/thread_queue"

require "bugsnag/integrations/rack"
require "bugsnag/integrations/railtie" if defined?(Rails::Railtie)

require "bugsnag/middleware/rack_request"
require "bugsnag/middleware/warden_user"
Expand Down Expand Up @@ -127,6 +126,7 @@ def before_notify_callbacks
end
end

require "bugsnag/integrations/railtie" if defined?(Rails::Railtie)
[:resque, :sidekiq, :mailman, :delayed_job, :shoryuken, :que].each do |integration|
begin
require "bugsnag/integrations/#{integration}"
Expand Down
8 changes: 4 additions & 4 deletions lib/bugsnag/middleware/clearance_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ def initialize(bugsnag)

def call(report)
if report.request_data[:rack_env] &&
report.request_data[:rack_env]["clearance"] &&
report.request_data[:rack_env]["clearance"].signed_in? &&
report.request_data[:rack_env]["clearance"].current_user
report.request_data[:rack_env][:clearance] &&
report.request_data[:rack_env][:clearance].signed_in? &&
report.request_data[:rack_env][:clearance].current_user

# Extract useful user information
user = {}
user_object = report.request_data[:rack_env]["clearance"].current_user
user_object = report.request_data[:rack_env][:clearance].current_user
if user_object
# Build the bugsnag user info from the current user record
COMMON_USER_FIELDS.each do |field|
Expand Down