snitch_reporting 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +19 -3
- data/lib/snitch_reporting/engine.rb +0 -2
- data/lib/snitch_reporting/rack.rb +5 -5
- data/lib/snitch_reporting/version.rb +1 -1
- data/lib/snitch_reporting.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a378afd285e3d04001fcefd7e4782f410ffbd0cb7cfd19430c97fac7a56f99bd
|
4
|
+
data.tar.gz: 3e70eec20386c0efce472c340b0a2b221be59edde1e99abd0f29346160d1bf52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
@@ -11,11 +11,11 @@ class SnitchReporting::Rack
|
|
11
11
|
response = @app.call(env)
|
12
12
|
_, headers, = response
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
data/lib/snitch_reporting.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|