Skip to content

Commit

Permalink
Merge pull request #572 from bugsnag/tom/que-version-fix
Browse files Browse the repository at this point in the history
fix(que): handle change in capitalisation of framework version constant for Que in v1.x
  • Loading branch information
tomlongridge authored Oct 24, 2019
2 parents b8acd9b + 7cb2d1f commit 8568e17
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

0 comments on commit 8568e17

Please sign in to comment.