cyclone_lariat 1.0.0.rc3 → 1.0.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +4 -4
- data/lib/cyclone_lariat/clients/sns.rb +15 -1
- data/lib/cyclone_lariat/migration.rb +4 -0
- data/lib/cyclone_lariat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e85d9e3115b5cba0ff233723389a20a5eef9f3c
|
4
|
+
data.tar.gz: d87d6e81b0fba3f4aa78e432b7aab2bf993f5a82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 285ef03ab2d275f51401d547b3ce6d43c7dbfcc2e16cb53cbbe134dde906d043ec2eb8ea427286b413910a85e70b0b320a8a857ce2f03f7a021db6c47b72e7f4
|
7
|
+
data.tar.gz: 8fed12ef46bc40ac995b80a377ab9702fc526d2b12ced8750b6e84ca5a44cfef49b14498d45c84ba421cf1a7f3ddaaa71088abdcd98e28a329057369af194b7c
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.0.0.rc5]
|
8
|
+
Changed
|
9
|
+
- Update Gemfile.lock
|
10
|
+
|
11
|
+
## [1.0.0.rc4]
|
12
|
+
Added
|
13
|
+
- `CycloneLariat::Migration#subscribed?(topic:, endpoint:)` to check existance
|
14
|
+
subscriptions
|
15
|
+
Changed
|
16
|
+
- Fix `CycloneLariat::Clients::Sns#list_subscriptions`
|
17
|
+
|
7
18
|
## [1.0.0.rc3]
|
8
19
|
Added
|
9
20
|
- `CycloneLariat::Messages::Builder` for building messages
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cyclone_lariat (1.0.0.
|
4
|
+
cyclone_lariat (1.0.0.rc5)
|
5
5
|
aws-sdk-sns
|
6
6
|
aws-sdk-sqs
|
7
7
|
dry-cli (~> 0.6)
|
@@ -28,13 +28,13 @@ GEM
|
|
28
28
|
arel (9.0.0)
|
29
29
|
ast (2.4.2)
|
30
30
|
aws-eventstream (1.2.0)
|
31
|
-
aws-partitions (1.
|
32
|
-
aws-sdk-core (3.
|
31
|
+
aws-partitions (1.738.0)
|
32
|
+
aws-sdk-core (3.171.0)
|
33
33
|
aws-eventstream (~> 1, >= 1.0.2)
|
34
34
|
aws-partitions (~> 1, >= 1.651.0)
|
35
35
|
aws-sigv4 (~> 1.5)
|
36
36
|
jmespath (~> 1, >= 1.6.1)
|
37
|
-
aws-sdk-sns (1.
|
37
|
+
aws-sdk-sns (1.60.0)
|
38
38
|
aws-sdk-core (~> 3, >= 3.165.0)
|
39
39
|
aws-sigv4 (~> 1.1)
|
40
40
|
aws-sdk-sqs (1.53.0)
|
@@ -75,6 +75,11 @@ module CycloneLariat
|
|
75
75
|
topic
|
76
76
|
end
|
77
77
|
|
78
|
+
def subscribed?(topic:, endpoint:)
|
79
|
+
subscription_arn = find_subscription_arn(topic: topic, endpoint: endpoint)
|
80
|
+
subscription_arn.nil? ? false : true
|
81
|
+
end
|
82
|
+
|
78
83
|
def subscribe(topic:, endpoint:)
|
79
84
|
subscription_arn = find_subscription_arn(topic: topic, endpoint: endpoint)
|
80
85
|
raise Errors::SubscriptionAlreadyExists.new(topic: topic, endpoint: endpoint) if subscription_arn
|
@@ -117,7 +122,16 @@ module CycloneLariat
|
|
117
122
|
|
118
123
|
loop do
|
119
124
|
resp[:subscriptions].each do |s|
|
120
|
-
endpoint =
|
125
|
+
endpoint =
|
126
|
+
case s.protocol
|
127
|
+
when 'sqs'
|
128
|
+
Resources::Queue.from_arn(s.endpoint)
|
129
|
+
when 'sns'
|
130
|
+
Resources::Topic.from_arn(s.endpoint)
|
131
|
+
else
|
132
|
+
next
|
133
|
+
end
|
134
|
+
|
121
135
|
subscriptions << { topic: Resources::Topic.from_arn(s.topic_arn), endpoint: endpoint, arn: s.subscription_arn }
|
122
136
|
end
|
123
137
|
|
@@ -73,6 +73,10 @@ module CycloneLariat
|
|
73
73
|
puts " Subscription was deleted `#{topic.name} -> #{endpoint.name}`"
|
74
74
|
end
|
75
75
|
|
76
|
+
def subscribed?(topic:, endpoint:)
|
77
|
+
sns.subscribed?(topic: topic, endpoint: endpoint)
|
78
|
+
end
|
79
|
+
|
76
80
|
def default_policy(queue)
|
77
81
|
{
|
78
82
|
'Sid' => queue.arn,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyclone_lariat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kudrin
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-03-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: aws-sdk-sns
|