rollbar_helper 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -4
- data/lib/rollbar_helper.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a011b3bbc7e959be87adf48f88b781ab9e021a2b
|
4
|
+
data.tar.gz: f489c6144819621100c00455288e35a88ac8e655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 363d66edf3321a2acca22d077d8da93503d08ca188be5a1ea42cb186ffd18f156b976b7e8ad96c943cae29ebbf55b1128c79a279da406c1a73666c6fecf20252
|
7
|
+
data.tar.gz: 9ea534ba65da917b50d6315fb4d0f75bc8282fd4fc42cde701c137f69fcd0cd3ef10d73e5f2d6855088052f1cdd51f9e7df859d1fd8ceb25dd995413ac536990
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# RollbarHelper
|
2
2
|
|
3
|
-
|
3
|
+
When you call `Rollbar.error('description')`, rollbar doesn't provide a stacktrace, just the "description" error. To find exactly where this error was generated, one has to search the entire codebase for `"description"`.
|
4
4
|
|
5
|
-
|
5
|
+
This gem allows you to call `RollbarHelper.error('description')` and get a stacktrace on https://rollbar.com pointing where in the code it was exactly generated.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,14 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Keep your `gem 'rollbar'` dependency and your rollbar configuration.
|
26
|
+
|
27
|
+
Instead of calling `Rollbar.error(...)`, call
|
28
|
+
```ruby
|
29
|
+
RollbarHelper.error(...)
|
30
|
+
```
|
31
|
+
|
32
|
+
`...` could be a string or an Exception
|
26
33
|
|
27
34
|
## Development
|
28
35
|
|
@@ -32,7 +39,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
39
|
|
33
40
|
## Contributing
|
34
41
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bodyshopbidsdotcom/rollbar_helper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
43
|
|
37
44
|
|
38
45
|
## License
|
data/lib/rollbar_helper.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class RollbarHelper
|
2
|
-
VERSION = "0.0
|
2
|
+
VERSION = "0.1.0"
|
3
3
|
|
4
4
|
class << self
|
5
5
|
|
6
|
-
def error(obj, fingerprint: nil)
|
6
|
+
def error(obj, extra = {}, fingerprint: nil)
|
7
7
|
e = nil
|
8
8
|
|
9
9
|
if obj.is_a?(Exception)
|
@@ -14,9 +14,9 @@ class RollbarHelper
|
|
14
14
|
end
|
15
15
|
|
16
16
|
if fingerprint.present?
|
17
|
-
Rollbar.scope(:fingerprint => fingerprint).error(e)
|
17
|
+
Rollbar.scope(:fingerprint => fingerprint).error(e, **extra)
|
18
18
|
else
|
19
|
-
Rollbar.error(e)
|
19
|
+
Rollbar.error(e, **extra)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollbar_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Santiago Herrera
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|