moromi-aws-sns 0.14.0 → 0.15.0

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: e94378068dc5c9b30cfd9a9386047f33d925ab930f0cba48d8485cbe7f99e2e1
4
- data.tar.gz: 486e985642f89cc26d002e12c90afe4824e519c340905eaae157f6a288434627
3
+ metadata.gz: e81f929cb8f988e4a6fcf67076daf379b41fe5d13832f6da060bc1536d055704
4
+ data.tar.gz: 540652fc01c31c623c40826e01ed2edbcb99937650442a0ade6a7549cd1a8d54
5
5
  SHA512:
6
- metadata.gz: eb2916a98e565d71e50192c64f55765cfa0874a3a1489fff6313d9a60a49eb3117ecf83ba397e3558718aac6d3b43471c1489a7fcf12e241a89e4f9ad2d112d1
7
- data.tar.gz: 2262cf3271bf2430a5f964cf1144b5a96f377df66e18ec25d8d47c3e0aac43102e23f7b3f3deb2ffad7482efd59ed760c0843e8821ef5a9b94abeb0dd9a7dd1c
6
+ metadata.gz: 8804c680b64dbe83ec4e0a5e0b66640a6e96c9a33585f0f5ff0cad642b73a7ed6a35baab4f510a781fc1405104d99dc68d3d958dacf25419b28297bf7ba033cd
7
+ data.tar.gz: 949e8670aa6483c3a77ccb545017a893c68bdd44f1d703755dd602118e7240e24a608c5e466097a64d0b39773fca2ae67457559af429082cd76d28cc90ab3215
@@ -4,9 +4,8 @@ module Moromi
4
4
  module Aws
5
5
  module Sns
6
6
  class Client
7
- def initialize(access_key_id, secret_access_key, region)
8
- @access_key_id = access_key_id
9
- @secret_access_key = secret_access_key
7
+ def initialize(region, credentials: nil)
8
+ @credentials = credentials
10
9
  @region = region
11
10
  end
12
11
 
@@ -87,12 +86,14 @@ module Moromi
87
86
 
88
87
  private
89
88
 
90
- def credentials
91
- @credentials ||= ::Aws::Credentials.new(@access_key_id, @secret_access_key)
92
- end
93
-
94
89
  def client
95
- @client ||= ::Aws::SNS::Client.new(region: @region, credentials: credentials)
90
+ @client ||= begin
91
+ if @credentials
92
+ ::Aws::SNS::Client.new(region: @region, credentials: @credentials)
93
+ else
94
+ ::Aws::SNS::Client.new(region: @region)
95
+ end
96
+ end
96
97
  end
97
98
 
98
99
  def call_publish(options)
@@ -1,7 +1,7 @@
1
1
  module Moromi
2
2
  module Aws
3
3
  module Sns
4
- VERSION = '0.14.0'
4
+ VERSION = '0.15.0'
5
5
  end
6
6
  end
7
7
  end
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency 'activesupport', ['>= 4.2']
26
26
 
27
27
  spec.add_development_dependency "bundler"
28
- spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rake", ">= 12.3.3"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moromi-aws-sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Ooishi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-16 00:00:00.000000000 Z
11
+ date: 2020-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sns
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: 12.3.3
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: 12.3.3
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.0.3
126
+ rubygems_version: 3.1.2
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: AWS SNS client.