rollbar_helper 0.0.0 → 0.0.1

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: e99dbc4a228602f6218f6aff09953e6cbed725c2
4
- data.tar.gz: 97c80073b6b247e4d109431f66340e02e090d78d
3
+ metadata.gz: d463a4beb90279faa3de364586977e422485137a
4
+ data.tar.gz: b8e90972a3f47ee519bd8b73ded15687ae75a750
5
5
  SHA512:
6
- metadata.gz: d478075832cb87ad3d63884d4f7af243ea43aa4660a2fa3a492489776eafdefac3cfb70ceccba48b52438bacc515b71397848e965f23d1cd4881e395158d6688
7
- data.tar.gz: a8fb04b2e182f8198c26beb9edfcdb56ccca320bcd1c9eb1bb5ff7e940797233476afc06f9d5bedfcb26a40a17334746d371c09ca6668e91a5b105321c578074
6
+ metadata.gz: 49d9206d7a2884f5b6bd45f42c262d0608f6cb007734ce214d3c127f9380261ef14b45d51f51d35b1cc5379efced6ea954d8530ffd0feaf7f30903d84c3e2510
7
+ data.tar.gz: 28a415a83c7a8f1360a4e5668f54f0eb0c5d9cc10ea14efb21c4f785fb6c76f22bdf0fe01d1b0ce10ee8d759577e02f3d7fccaa3ffeaccabab9afed6520c7614
@@ -1,11 +1,24 @@
1
1
  class RollbarHelper
2
- VERSION = "0.0.0"
2
+ VERSION = "0.0.1"
3
3
 
4
4
  class << self
5
- def sayit
6
- msg = 'holaaaa!'
7
- puts msg
8
- return msg
5
+
6
+ def error(obj, fingerprint: nil)
7
+ e = nil
8
+
9
+ if obj.is_a?(Exception)
10
+ e = obj
11
+ else
12
+ e = StandardError.new(obj.to_s)
13
+ e.set_backtrace(caller)
14
+ end
15
+
16
+ if fingerprint.present?
17
+ Rollbar.scope(:fingerprint => fingerprint).error(e)
18
+ else
19
+ Rollbar.error(e)
20
+ end
9
21
  end
22
+
10
23
  end
11
24
  end
@@ -13,8 +13,6 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = "https://github.com/santi-h/rollbar_helper"
14
14
  spec.license = "MIT"
15
15
 
16
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
- # to allow pushing to a single host or delete this section to allow pushing to any host.
18
16
  if spec.respond_to?(:metadata)
19
17
  spec.metadata['allowed_push_host'] = "https://rubygems.org"
20
18
  else
@@ -32,4 +30,5 @@ Gem::Specification.new do |spec|
32
30
  spec.add_development_dependency "bundler", "~> 1.14"
33
31
  spec.add_development_dependency "rake", "~> 10.0"
34
32
  spec.add_development_dependency "rspec", "~> 3.0"
33
+ spec.add_dependency "rollbar", "~> 2.14"
35
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Santiago Herrera
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rollbar
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.14'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.14'
55
69
  description:
56
70
  email:
57
71
  - santi.4096@gmail.com