snitch_reporting 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 6e965004438aae664e6f6be5804b3acd7d323dd89f783ee2653cc5430cf61bf0
4
- data.tar.gz: e3f025872529d46fcffa7125e9db3558865de3f845fa8420c33bd2fed99726e6
3
+ metadata.gz: a378afd285e3d04001fcefd7e4782f410ffbd0cb7cfd19430c97fac7a56f99bd
4
+ data.tar.gz: 3e70eec20386c0efce472c340b0a2b221be59edde1e99abd0f29346160d1bf52
5
5
  SHA512:
6
- metadata.gz: 77d1632dd5b318b2528453a3b61ad6a245f193a4e86f96c55f976d1221508b1540c3619e3520d720846ed53a22b9601bc02bd586762574fb6a6a42c77f8e4ae7
7
- data.tar.gz: 17bc5ca841a7e858a6e2149160d8ceb83c5c3fa07b5406716063a9f828c88c050e118f3e1a7dc25d1893a4fdfad0b55483e1eccc7cf1e1ee167f7524c266cfbb
6
+ metadata.gz: cc59994c9b2e6015ce5d47098ed12b7258be0e5b0981d84bf5c77fabd76a610a717f762e897daf06b9e95ee0dd3ad6264eb5ff282c9ca72b5c5b49eb17aba1dc
7
+ data.tar.gz: bf33d23beaae10b1b7bb7e07a34e40babe04f585d6359498d963648ee971cf80bd73bc80fb57557ea287f828d6a958398861d874fc72ceacf6e9833a6d6152c2
data/README.md CHANGED
@@ -2,9 +2,6 @@
2
2
  Snitch Reporting adds middleware to your Rails app to automatically track errors.
3
3
  This is a self-hosted gem that plugs directly into your app.
4
4
 
5
- ## Usage
6
- Install the gem, run the migrations, add to your middleware, then mount the route to view. Let the gem find and track your bugs for you!
7
-
8
5
  ## Installation
9
6
  Add this line to your application's Gemfile:
10
7
 
@@ -22,6 +19,20 @@ Or install it yourself as:
22
19
  $ gem install snitch_reporting
23
20
  ```
24
21
 
22
+ Include assets:
23
+
24
+ application.js
25
+ ```js
26
+ //= require snitch_reporting/snitch_report
27
+ ```
28
+
29
+ application.css
30
+ ```css
31
+ /*
32
+ *= require snitch_reporting/snitch_report
33
+ /*
34
+ ```
35
+
25
36
  Add the migrations to your app with
26
37
  ```bash
27
38
  rails g snitch_reporting:install
@@ -35,6 +46,11 @@ Rails.application.config.middleware.use SnitchReporting::Rack, ->(occurrence) {
35
46
  }
36
47
  ```
37
48
 
49
+ Finally, mount the routes within your route file to give you access to the report pages.
50
+ ```ruby
51
+ mount SnitchReporting::Engine, at: "/snitches"
52
+ ```
53
+
38
54
  ## Contributing
39
55
  Lots of things to do, and would love some PRs! Feel free to pull the code down and submit a PR with some changes.
40
56
  A few things I'd like to do:
@@ -1,7 +1,5 @@
1
1
  module SnitchReporting
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace SnitchReporting
4
-
5
- # config.app_middleware.use ::SnitchReporting::Rack
6
4
  end
7
5
  end
@@ -11,11 +11,11 @@ class SnitchReporting::Rack
11
11
  response = @app.call(env)
12
12
  _, headers, = response
13
13
 
14
- if headers["X-Cascade"] == "pass"
15
- msg = "This exception means that the preceding Rack middleware set the 'X-Cascade' header to 'pass' -- in " \
16
- "Rails, this often means that the route was not found (404 error)."
17
- raise SnitchException, msg
18
- end
14
+ # if headers["X-Cascade"] == "pass"
15
+ # msg = "This exception means that the preceding Rack middleware set the 'X-Cascade' header to 'pass' -- in " \
16
+ # "Rails, this often means that the route was not found (404 error)."
17
+ # raise SnitchException, msg
18
+ # end
19
19
 
20
20
  response
21
21
  rescue Exception => exception
@@ -1,3 +1,3 @@
1
1
  module SnitchReporting
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require "snitch_reporting"
2
- require "snitch_reporting/rack"
3
2
  require "snitch_reporting/engine"
3
+ require "snitch_reporting/rack"
4
4
  require "snitch_reporting/version"
5
5
 
6
6
  module SnitchReporting
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snitch_reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rocco Nicholls
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-22 00:00:00.000000000 Z
11
+ date: 2020-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails