egregious 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTgxOGU3ZjYwMjEzMDAwNWNhZTZjYjZlOWMxYWJlZTk1NWQ5YTU5Yg==
4
+ NmNkZmVlODMzN2NkOWI1NWZhMGU5ZTNmYTgwNDQzMjQ5YTY2NWI1Nw==
5
5
  data.tar.gz: !binary |-
6
- NjcyMzA1YmY2YTkwYmFlNDc0NDMxMThjZTdjOTUxMWE0ODA1NzZkYg==
6
+ NWE3YjNjY2JiYjY5NGRmMjlkNTA2NDRkMzllOGRjMzFhMTRhZTYyMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGM0OWM4MWU4OGI5NmY0ZDJkYjIyNGQzNWE4YjhlYWRlYzFkNTNjZThkMGI0
10
- MGExNGM4YzAyMzViOWJhZmMzZjE3NmQzMDJmZDdlMmE5NDAyNTBkMzcwMTE3
11
- ZTY3MTk2ZDRlMTQ3NWYyODU3ZmRjNjFkZjU2ODQ3ZDIwZjNjNDY=
9
+ NDMwZjgwOGY3MzM4YzM4Y2I5MWEzM2NlYTkyZDA2ZDMxNDY4MGYxMDE3NjNj
10
+ MjYwNjA1NjA5NjFjMGE2ZWE0ZDg5NzczNTE5ODhlYzhkNjY0NDczMzMzN2Q2
11
+ NDBjMDg2MWIzY2U2MzBjZGE4NjQ1MTZkNjI0MTAzNTQ2NzNjODk=
12
12
  data.tar.gz: !binary |-
13
- N2FlM2VmMTlkMGI1MjEwNjQ0YWRmZmFiNmI1ZmNiYmNiNzgyODA2YTFhMTE1
14
- YThkOWVjYWJhYTMwZmI3OWQ1OGNlN2UxN2ExMGUwODM2OGRlY2ZmNDEwNzdl
15
- ZWJlYWE5MzYwMjFhMTgyODZiNzA1OTkzM2Q2ODk2OTk2OWZjYjE=
13
+ MDY5ODUwNzc1MjdmZjFkMDY0M2E0YWY2ZmUyNTEyNGM4MTc4MThlNTc3NzNk
14
+ MWQ1Y2QzZDczOTZmZGI1YjNhZWZmYjFjYmEzMTYzMGRkMDNmNDdjZDFhOWFi
15
+ NDdjMTRmOGVlNTA1NjA1OGQzOTA4ZmU4ZjBkNjk4MjI3ZDY2Y2U=
data/README CHANGED
@@ -1,4 +1,8 @@
1
1
  Update Log:
2
+
3
+ Version 0.2.8 released to https://rubygems.org/gems/egregious on 6.5.2015
4
+ Added Airbrake notifications. If this is too chatty, you can configure it by overriding: notify_airbrake
5
+
2
6
  Version 0.2.7 released to https://rubygems.org/gems/egregious on 5.28.2015
3
7
  Merged pull request:
4
8
  Compatibility with Rails 4.2 #13
@@ -109,10 +113,21 @@ def egregious_respond_to(exception)
109
113
  end
110
114
  end
111
115
 
116
+
117
+
112
118
  # override this if you want to change what html static file gets returned.
113
119
  def build_html_file_path(status)
114
120
  File.expand_path(Rails.root, 'public', status + '.html')
115
121
  end
116
122
 
123
+ # override this if you want to control what gets sent to airbrake
124
+ # optionally you can configure the airbrake ignore list
125
+ def notify_airbrake(exception)
126
+ # for ancient clients - can probably remove
127
+ HoptoadNotifier.notify(exception) if defined?(HoptoadNotifier)
128
+ # tested with airbrake 3.1.15 and 4.2.1
129
+ env['airbrake.error_id'] = Airbrake.notify_or_ignore(exception) if defined?(Airbrake)
130
+ end
131
+
117
132
  KNOWN ISSUES:
118
133
  * If you use Mongoid, CanCan or Devise you must have Egregious after CanCan/Devise in your Gemfile, if not it will not handle those errors correctly.
@@ -193,7 +193,15 @@ module Egregious
193
193
  "\n\n" + exception.class.to_s + ' (' + exception.message.to_s + '):\n ' +
194
194
  clean_backtrace(exception).join("\n ") +
195
195
  "\n\n")
196
+ notify_airbrake(exception)
197
+ end
198
+
199
+ # override this if you want to control what gets sent to airbrake
200
+ def notify_airbrake(exception)
201
+ # for ancient clients - can probably remove
196
202
  HoptoadNotifier.notify(exception) if defined?(HoptoadNotifier)
203
+ # tested with airbrake 3.1.15 and 4.2.1
204
+ env['airbrake.error_id'] = Airbrake.notify_or_ignore(exception) if defined?(Airbrake)
197
205
  end
198
206
 
199
207
  # override this if you want to change your respond_to behavior
@@ -1,3 +1,3 @@
1
1
  module Egregious
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egregious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Edens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails