exception_notification_sns 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcf4bd7f058a027e7f7a9c95a877d46f5842ea58
4
- data.tar.gz: b16312a6e41b5865ff997648f298a5dd7eaf2741
3
+ metadata.gz: 6ed7fcedf2d9c72542426a5772e14e6b0908cb39
4
+ data.tar.gz: 00e42003cb09a1fb766e685820f333f6adf3b7dd
5
5
  SHA512:
6
- metadata.gz: 79fa5d56c931106e881f59ee8d5d511fe591369705507ff1c3a4d5dfaa0df551a588ff9a68e476cd864ddbb8e19b83dc4677915c4d07247260c589521e63c73c
7
- data.tar.gz: 0b31fae1b40d630428e7f7425008ba2934698c003fa0c1f917c43dca3168c652fdf49b3ec85ea0d2e617ca19592a7594cdab1c6643468db4ffbe28d863d7b410
6
+ metadata.gz: 9dabda8af83560cce6a88656bcf54a4f8184eae42f103796f0f8a787ab10a0d504ca642bb93a4ffceabee7eec84d783d3e25c826e8fab950023bce4c18a9ef02
7
+ data.tar.gz: eab94d05fb5c182d424de703fdef52ca7e4801de10606cd54a2b1fb2cefc31929280b0fc6fb3496f6b6a1827f0ebbe75f87462203da675fe7e77b74e8d184c1b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exception_notification_sns (0.1.1)
4
+ exception_notification_sns (0.1.2)
5
5
  aws-sdk-v1 (>= 1, < 3)
6
6
  exception_notification (= 4.2.1)
7
7
 
@@ -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.1'
5
+ s.version = '0.1.2'
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'
@@ -25,7 +25,6 @@ module ExceptionNotifier
25
25
  @request = ::ActionDispatch::Request.new(env) if @kontroller
26
26
 
27
27
  @sns_client.publish({
28
- subject: compose_subject,
29
28
  topic_arn: @topic_arn,
30
29
  message: compose_message.to_json
31
30
  })
@@ -35,16 +34,17 @@ module ExceptionNotifier
35
34
  !@sns_client.nil? && !@topic_arn.nil?
36
35
  end
37
36
 
38
- def compose_subject
39
- subject = @kontroller ? "#{@kontroller.controller_name}##{@kontroller.action_name}" : ''
40
- subject << " (#{@exception.class})"
41
- subject << " #{@exception.message.inspect}"
37
+ def compose_info
38
+ info = @kontroller ? "#{@kontroller.controller_name}##{@kontroller.action_name}" : ''
39
+ info << " (#{@exception.class})"
40
+ info << " #{@exception.message.inspect}"
42
41
  end
43
42
 
44
43
  def compose_message
45
44
  message = {
45
+ info: compose_info,
46
46
  backtrace: @backtrace.to_s,
47
- default: compose_subject
47
+ default: compose_info
48
48
  }
49
49
 
50
50
  message[:request] = {
@@ -21,8 +21,8 @@ describe 'SNS Notifer' do
21
21
  it 'should compose correct message and subject' do
22
22
  @sns.call(fake_exception)
23
23
 
24
- composed_subject = @sns.compose_subject
25
- expect(composed_subject).to eq fake_subject
24
+ composed_info = @sns.compose_info
25
+ expect(composed_info).to eq fake_info
26
26
 
27
27
  composed_message = @sns.compose_message
28
28
  expect(composed_message[:backtrace]).not_to be_nil
@@ -38,9 +38,9 @@ describe 'SNS Notifer' do
38
38
  }
39
39
  end
40
40
 
41
- def fake_subject
42
- subject = " (#{fake_exception.class})"
43
- subject << " #{fake_exception.message.inspect}"
41
+ def fake_info
42
+ info = " (#{fake_exception.class})"
43
+ info << " #{fake_exception.message.inspect}"
44
44
  end
45
45
 
46
46
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_notification_sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matej Minažek