exception_notification_sns 0.1.5 → 0.2.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
- SHA1:
3
- metadata.gz: 22dcca1faab1b4bd3bb4eeea1707964d6257b057
4
- data.tar.gz: f0abaee4b1aab7dab21b5f4b7798e354687a60de
2
+ SHA256:
3
+ metadata.gz: b03e8bbd8f88b2e6e6cdf6b503ca1bd7f0909f6ccba986ac07dfc4d8e73f9ccf
4
+ data.tar.gz: c99b066cd77b270cb6e907852300ba56837fac0c1735c228659c96830ac09879
5
5
  SHA512:
6
- metadata.gz: 05ea338ba70a6a90ae0ca72af27574e6a8e2966ed8a6b03a08eb0fce6b692e9a3a341cfdb2f809ee3b3f9f5368efebbe3664cdf3220f4b17a3408b0529f0bdb0
7
- data.tar.gz: 3b32b3666c21102d1d41bae88404be06e71cd0083a268705aeabb6d32d3d21dcdf5f974f9b7ca6ac83fcf76f84a65b1ca813c0fde322f30ce899e230f0b45f43
6
+ metadata.gz: 0504672d81d295c61e55cf2846187c97dd4d570f477166b6c1999f9c3172f744a4c4505d0038f5a4fc1c50eb706e20443b47a39ae7563a887bcf2d87dc5e1588
7
+ data.tar.gz: 261b589aa47ffd113d297d6d33c8c28e59e6f6faee105347a983de454e10ddc4304202dbad4f3c00ea473d7bf100aa4548ec7cb9d814c104518d324bf34e5f79
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'exception_notification_sns'
4
- s.version = '0.1.5'
4
+ s.version = '0.2.1'
5
5
  s.summary = 'exception_notification extension for aws sns v1'
6
6
  s.description = 'exception_notification_sns gem is used for sending application extensions to aws sns.
7
7
  It extends exception_notification gem, uses aws-sdk-v1 gem to push exception notificatons
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.require_path = 'lib'
18
18
 
19
- s.add_runtime_dependency 'aws-sdk-v1', '>= 1', '< 3'
19
+ s.add_runtime_dependency 'aws-sdk-sns', '>= 1', '< 2'
20
20
  s.add_runtime_dependency 'exception_notification', '4.2.1'
21
21
 
22
22
  s.add_development_dependency 'factory_girl', '4.5'
@@ -1,4 +1,4 @@
1
1
  require 'exception_notification'
2
- require 'aws-sdk-v1'
2
+ require 'aws-sdk-sns'
3
3
 
4
4
  require 'exception_notifier/sns_notifier'
@@ -14,7 +14,7 @@ module ExceptionNotifier
14
14
  client_params[key] = options.delete(key)
15
15
  end
16
16
 
17
- @sns_client = AWS::SNS::Client.new(client_params)
17
+ @sns_client = Aws::SNS::Client.new(client_params)
18
18
  @topic_arn = options.delete(:topic_arn)
19
19
  @subject = options.delete(:subject)
20
20
  end
@@ -2,14 +2,25 @@ require 'spec_helper'
2
2
  require 'exception_notifier/sns_notifier'
3
3
 
4
4
  describe 'SNS Notifier' do
5
- let(:options) do
5
+ let(:client_options) do
6
6
  {
7
7
  access_key_id: 'acces_key',
8
8
  secret_access_key: 'secret_access_key',
9
+ region: 'region'
10
+ }
11
+ end
12
+
13
+ let(:options) do
14
+ {
9
15
  topic_arn: 'topic_arn',
10
- region: 'region',
11
16
  subject: 'notification_subject'
12
- }
17
+ }.merge(client_options)
18
+ end
19
+
20
+ let(:test_options) { {stub_responses: true }.merge(client_options) }
21
+
22
+ before do
23
+ expect(Aws::SNS::Client).to receive(:new).with(client_options).and_return(Aws::SNS::Client.new(test_options))
13
24
  end
14
25
 
15
26
  subject { ExceptionNotifier::SnsNotifier.new(options) }
data/spec/spec_helper.rb CHANGED
@@ -7,11 +7,10 @@ ENV['RAILS_ENV'] = 'test'
7
7
  require 'rspec'
8
8
 
9
9
  require 'mocha/api'
10
- require 'aws/sns'
10
+ require 'aws-sdk-sns'
11
11
  require 'exception_notifier'
12
12
 
13
13
  ExceptionNotifier.testing_mode!
14
- AWS.stub!
15
14
 
16
15
  RSpec.configure do |config|
17
16
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_notification_sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matej Minažek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-07 00:00:00.000000000 Z
11
+ date: 2019-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: aws-sdk-v1
14
+ name: aws-sdk-sns
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '3'
22
+ version: '2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '3'
32
+ version: '2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: exception_notification
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.4.8
179
+ rubygems_version: 2.7.9
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: exception_notification extension for aws sns v1