rollbar_helper 0.0.4 → 0.1.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -4
  3. data/lib/rollbar_helper.rb +4 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a622887303197c233baa82c3a57856120e3e0fbc
4
- data.tar.gz: 166753da0c7caea3c7f366eb8108f6e477fcd779
3
+ metadata.gz: a011b3bbc7e959be87adf48f88b781ab9e021a2b
4
+ data.tar.gz: f489c6144819621100c00455288e35a88ac8e655
5
5
  SHA512:
6
- metadata.gz: 374531b0b3777b01ac4c72f1bf6042e58da64548b662c9f235029429d6f5b63570e21f1d123217ca2e00e4506bbb818dfddb2846f2443b9597615f6b52fc90c4
7
- data.tar.gz: fbe24f32b2e46de9af16e1f7657e69d9a8ef1b776a04020f0799638bf5219e02bfabf1ed5efdc834d79948f0b6cdf4ac3064d988af1692f7b3c828ad05ee1cdf
6
+ metadata.gz: 363d66edf3321a2acca22d077d8da93503d08ca188be5a1ea42cb186ffd18f156b976b7e8ad96c943cae29ebbf55b1128c79a279da406c1a73666c6fecf20252
7
+ data.tar.gz: 9ea534ba65da917b50d6315fb4d0f75bc8282fd4fc42cde701c137f69fcd0cd3ef10d73e5f2d6855088052f1cdd51f9e7df859d1fd8ceb25dd995413ac536990
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # RollbarHelper
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rollbar_helper`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
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/santi-h/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.
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
@@ -1,9 +1,9 @@
1
1
  class RollbarHelper
2
- VERSION = "0.0.4"
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
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: 2017-02-09 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler