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 +4 -4
- data/CHANGELOG.md +4 -0
- data/action_reporter.gemspec +1 -1
- data/lib/action_reporter/sentry_reporter.rb +10 -3
- data/lib/action_reporter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32481c273e889f21cb750b677fdfd75fe7c1582b483e07a3024e79ecdbc14a44
|
4
|
+
data.tar.gz: d5b037711d2112362680f8f72483a9e3937985d8b06152e5839a777b36f118f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcec530e56b6e82c019aff4475e970d6642d582620c37a1ca3f099163c3c3de0dde3a367e68de11a897edbf2f2c7ba00b057979b1ca71a1207f7b25549c94257
|
7
|
+
data.tar.gz: 1fad20c37845fb64fda7b4adfc81ba676b671bba8384b8d0e75752908fe5a3db1368e7d50ea808ea3cee3eb138fa19cd22064eec7f6384746ad1fea770de6116
|
data/CHANGELOG.md
CHANGED
data/action_reporter.gemspec
CHANGED
@@ -3,13 +3,20 @@ module ActionReporter
|
|
3
3
|
class_accessor "Sentry"
|
4
4
|
|
5
5
|
def notify(error, context: {})
|
6
|
-
|
7
|
-
|
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.
|
19
|
+
Sentry.get_current_scope.set_contexts(new_context)
|
13
20
|
end
|
14
21
|
|
15
22
|
def audited_user=(user)
|