exception_notification_sns 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exception_notification_sns.gemspec +1 -1
- data/lib/exception_notifier/sns_notifier.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcf4bd7f058a027e7f7a9c95a877d46f5842ea58
|
4
|
+
data.tar.gz: b16312a6e41b5865ff997648f298a5dd7eaf2741
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79fa5d56c931106e881f59ee8d5d511fe591369705507ff1c3a4d5dfaa0df551a588ff9a68e476cd864ddbb8e19b83dc4677915c4d07247260c589521e63c73c
|
7
|
+
data.tar.gz: 0b31fae1b40d630428e7f7425008ba2934698c003fa0c1f917c43dca3168c652fdf49b3ec85ea0d2e617ca19592a7594cdab1c6643468db4ffbe28d863d7b410
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'exception_notification_sns'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.1'
|
6
6
|
s.summary = 'exception_notification extension for aws sns v1'
|
7
7
|
s.description = 'exception_notification_sns gem is used for sending application extensions to aws sns. It extends exception_notification gem, uses aws-sdk-v1 gem to push exception notificatons to amazon sns'
|
8
8
|
s.required_ruby_version = '>= 2.2.0'
|
@@ -17,10 +17,7 @@ module ExceptionNotifier
|
|
17
17
|
def call(exception, options={})
|
18
18
|
return if !active?
|
19
19
|
|
20
|
-
|
21
|
-
|
22
20
|
env = options[:env] || {}
|
23
|
-
puts env.inspect
|
24
21
|
@options = options
|
25
22
|
@exception = exception
|
26
23
|
@backtrace = exception.backtrace ? clean_backtrace(exception) : []
|
@@ -28,10 +25,10 @@ module ExceptionNotifier
|
|
28
25
|
@request = ::ActionDispatch::Request.new(env) if @kontroller
|
29
26
|
|
30
27
|
@sns_client.publish({
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
subject: compose_subject,
|
29
|
+
topic_arn: @topic_arn,
|
30
|
+
message: compose_message.to_json
|
31
|
+
})
|
35
32
|
end
|
36
33
|
|
37
34
|
def active?
|
@@ -51,8 +48,8 @@ module ExceptionNotifier
|
|
51
48
|
}
|
52
49
|
|
53
50
|
message[:request] = {
|
54
|
-
url:
|
55
|
-
method:
|
51
|
+
url: @request.url,
|
52
|
+
method: @request.request_method,
|
56
53
|
remote_ip: @request.remote_ip,
|
57
54
|
parameters: @request.filtered_parameters.inspect
|
58
55
|
} if @request
|