action_reporter 1.0.4 → 1.0.5

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: 49736906f57c97cd86a7f0963fa78a63d6cbbb9d0fe03d601b987b376dca8e00
4
- data.tar.gz: 6446a9feb95c216715b07b1775239b600a2ad1ae8083f7fbacdf86cd97b44469
3
+ metadata.gz: 32481c273e889f21cb750b677fdfd75fe7c1582b483e07a3024e79ecdbc14a44
4
+ data.tar.gz: d5b037711d2112362680f8f72483a9e3937985d8b06152e5839a777b36f118f7
5
5
  SHA512:
6
- metadata.gz: 7294c392d117b9a54625bb80b417c489408e2068d33b9338ec8d3bc60a0a91f3e360163fdcc9e6830eba1231a35ec5fe49f9c58b089f60e983e841302f80ede1
7
- data.tar.gz: 047d3ee881ea607458bd29d97dfcb72e3aee38b899aaa2893532a38ccf1f9c466ffd58b4459a0d70355e895a722419ac11cacca60e6f213c3b9cdbe978541715
6
+ metadata.gz: dcec530e56b6e82c019aff4475e970d6642d582620c37a1ca3f099163c3c3de0dde3a367e68de11a897edbf2f2c7ba00b057979b1ca71a1207f7b25549c94257
7
+ data.tar.gz: 1fad20c37845fb64fda7b4adfc81ba676b671bba8384b8d0e75752908fe5a3db1368e7d50ea808ea3cee3eb138fa19cd22064eec7f6384746ad1fea770de6116
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.5
2
+
3
+ * Fix Sentry reporting and context setting
4
+
1
5
  # 1.0.4
2
6
 
3
7
  * Move `transform_context` to individual reporter classes
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "action_reporter"
3
- s.version = "1.0.4"
3
+ s.version = "1.0.5"
4
4
 
5
5
  s.license = "MIT"
6
6
 
@@ -3,13 +3,20 @@ module ActionReporter
3
3
  class_accessor "Sentry"
4
4
 
5
5
  def notify(error, context: {})
6
- self.context(context)
7
- Sentry.capture_exception(error)
6
+ Sentry.with_scope do |temp_scope|
7
+ temp_scope.set_contexts(transform_context(context))
8
+
9
+ if error.is_a?(StandardError)
10
+ Sentry.capture_exception(error)
11
+ else
12
+ Sentry.capture_message(error)
13
+ end
14
+ end
8
15
  end
9
16
 
10
17
  def context(args)
11
18
  new_context = transform_context(args)
12
- Sentry.set_context(args)
19
+ Sentry.get_current_scope.set_contexts(new_context)
13
20
  end
14
21
 
15
22
  def audited_user=(user)
@@ -1,3 +1,3 @@
1
1
  module ActionReporter
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov