Skip to content

Commit

Permalink
fix(que): handle change in capitalisation of framework version consta…
Browse files Browse the repository at this point in the history
…nt for Que in v1.x

re #570
  • Loading branch information
tomlongridge committed Oct 23, 2019
1 parent b8acd9b commit 7cb2d1f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

## 6.12.2 (TBC)

### Fixes

* Handle change in capitalisation of framework version constant for Que in v1.x
| [#570](https://github.com/bugsnag/bugsnag-ruby/pull/570)
| [#572](https://github.com/bugsnag/bugsnag-ruby/pull/572)
| [tommeier](https://github.com/tommeier)

## 6.12.1 (05 Sep 2019)

### Fixes
Expand Down
11 changes: 7 additions & 4 deletions lib/bugsnag/integrations/que.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@
end
end

if Que.respond_to?(:error_notifier=)
Bugsnag.configuration.app_type ||= "que"
Bugsnag.configuration.app_type ||= "que"
if defined?(::Que::Version)
Bugsnag.configuration.runtime_versions["que"] = ::Que::Version
elsif defined?(::Que::VERSION)
Bugsnag.configuration.runtime_versions["que"] = ::Que::VERSION
end

if Que.respond_to?(:error_notifier=)
Que.error_notifier = handler
elsif Que.respond_to?(:error_handler=)
Bugsnag.configuration.app_type ||= "que"
Bugsnag.configuration.runtime_versions["que"] = ::Que::Version
Que.error_handler = handler
end
end

1 comment on commit 7cb2d1f

@tommeier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.