errorkit 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97b4715d780a3ffc6e3186befefc072e3ffce3a6
4
- data.tar.gz: 0bbe8f60343cd4dc88e9ca87e92007a8b041f31c
3
+ metadata.gz: ce2c8c5509171fa93c7c686bad573c35bf3ee1d0
4
+ data.tar.gz: 29b719824efe6e058df1ad720e6a66dfb96f8659
5
5
  SHA512:
6
- metadata.gz: 3e6f2f292df3558d620ff00c858a3881143b7c4659b1bc4bb7cc216f2e5951b1005748e47259ad841a99a1868db523d2559ce5cf3be8d986ea6f95ba390f1870
7
- data.tar.gz: e22e48d66200ca73e86162ad3cb37784bfb8aeab63f1d62558f179b44a107d767912cd2fa383b02f72c930248ec7f467d485ff63dfc11e20363200d52f067ba8
6
+ metadata.gz: f138a0efc6f89eb18d7c2ea3d61c12d88466038dd12c50753833689ae62d4adeda1a033a92afeb01e8491585fa366f265fd7cf1ae1c45ac118848ecec5381b35
7
+ data.tar.gz: 09907f207a5475e18faea69d0f17eb49e0af667568f8679dc121362cbda0f8f0fdfabe9c81b2734e1a7188668d07bd630a9b394f2a1e906d7ed9ae8b03787d54
data/README.md CHANGED
@@ -1,23 +1,26 @@
1
1
  # Errorkit
2
2
 
3
- ErrorKit allows you to track errors within your application and generate a
3
+ Errorkit allows you to track errors within your application and generate a
4
4
  notification when they happen.
5
5
 
6
- ErrorKit is based on exception_notification and takes a similar approach. It allows
6
+ Errorkit is based on exception_notification and takes a similar approach. It allows
7
7
  you to install Rack middleware that catches exceptions and allows you to notify a
8
8
  list of recipients.
9
9
 
10
+ Errorkit also allows you to rescue errors in your Rails application (version 3.2+).
11
+ This behavior is very similar to Gaffe (https://github.com/mirego/gaffe).
12
+
10
13
  ErrorKit also allows you to record the errors to your database and resolve them
11
14
  as necessary. This allows error handling to become an application concern and expects
12
15
  that you will attach application specific information to the errors when possible
13
16
  (such as the user that performed the action or the priority level of the error).
14
17
 
15
- ErrorKit provides a generator to build the default Error model.
18
+ Errorkit provides a generator to build the default Error model.
16
19
 
17
20
  You can ignore specific exception classes and specific user agents. Additionally,
18
- ErrorKit can throttle error notifications to prevent overwhelming your inbox.
21
+ Errorkit can throttle error notifications to prevent overwhelming your inbox.
19
22
 
20
- Finally, ErrorKit keeps track of how many successful responses are made as well
23
+ Finally, Errorkit keeps track of how many successful responses are made as well
21
24
  so that it can track your error rate per server and per release.
22
25
 
23
26
  ## Installation
@@ -118,7 +121,7 @@ Once created, you must tell Errorkit to use this mailer in the initializer:
118
121
  4. Push to the branch (`git push origin my-new-feature`)
119
122
  5. Create new Pull Request
120
123
 
121
- ## Acknowledgements
124
+ ## References
122
125
 
123
126
  http://geekmonkey.org/articles/29-exception-applications-in-rails-3-2
124
127
  https://github.com/sheerun/rails4-bootstrap/issues/26
@@ -126,8 +129,6 @@ https://github.com/sheerun/rails4-bootstrap/commit/5c2df5a108ad204bc407183b959bb
126
129
  http://stackoverflow.com/questions/15459143/how-to-rescue-from-actiondispatchparamsparserparseerror-in-rails-4
127
130
  https://github.com/mirego/gaffe
128
131
  https://github.com/mirego/gaffe/blob/master/lib/gaffe/errors.rb
129
-
130
-
131
132
  https://github.com/rails/rails/blob/f886fe2d8ccc900cde2629577e5c0be8c7d4c67f/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
132
133
  https://github.com/rails/rails/blob/c2cb83b1447fee6cee496acd0816c0117b68b687/guides/source/layouts_and_rendering.md
133
134
  http://stackoverflow.com/questions/15459143/how-to-rescue-from-actiondispatchparamsparserparseerror-in-rails-4
@@ -1,7 +1,6 @@
1
1
  require "errorkit/version"
2
2
  require 'errorkit/config'
3
3
  require 'errorkit/ignorable_error'
4
- require 'errorkit/errors_controller'
5
4
  require 'errorkit/errors_mailer'
6
5
  require 'errorkit/sidekiq'
7
6
 
@@ -17,7 +17,6 @@ module Errorkit
17
17
 
18
18
  def initialize
19
19
  @errors_mailer = Errorkit::ErrorsMailer
20
- @errors_controller = Errorkit::ErrorsController
21
20
  @errors_layout = false
22
21
  @ignore_exceptions = []
23
22
  @ignore_exceptions << ::ActiveRecord::RecordNotFound if defined? ::ActiveRecord::RecordNotFound
@@ -44,5 +43,11 @@ module Errorkit
44
43
  @ignore_agent_re ||= /(#{@ignore_agents.join('|')})/i
45
44
  !!(agent =~ @ignore_agents_re)
46
45
  end
46
+
47
+ def errors_controller
48
+ return @errors_controller if defined?(@errors_controller)
49
+ require 'errorkit/errors_controller'
50
+ @errors_controller = Errorkit::ErrorsController
51
+ end
47
52
  end
48
53
  end
@@ -1,5 +1,5 @@
1
1
  module Errorkit
2
- class ErrorsController < ActionController::Base
2
+ class ErrorsController < ::ApplicationController
3
3
  before_filter :append_view_paths
4
4
 
5
5
  helper_method :error, :exception, :status_code, :status_text
@@ -1,3 +1,3 @@
1
1
  module Errorkit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errorkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Rafter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-05 00:00:00.000000000 Z
11
+ date: 2013-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler