cyclone_lariat 1.0.0.rc3 → 1.0.0.rc4
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 +4 -4
- data/CHANGELOG.md +7 -0
- 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: 952709c6db2f728a379f9412d11803d67ae8dade
|
4
|
+
data.tar.gz: e06fdee221a672914cd2a1f80601b1ae99104987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a6a9e861b9393467dcb4d95b5edd38089135630e0b7e04641fd079313f32a5e9dce0703f088386020d2ec6d32c9a2ca393970eca23415eccabcf907a7eb3c7d
|
7
|
+
data.tar.gz: fb7a911ab148e94771df6be6562114b3fb056b538d628059695e0cb906787b5ae4fff6723939fc12e3ecbeb8a3b45a7758018285a6764633e6235ab59b3899db
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,13 @@ 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.rc4]
|
8
|
+
Added
|
9
|
+
- `CycloneLariat::Migration#subscribed?(topic:, endpoint:)` to check existance
|
10
|
+
subscriptions
|
11
|
+
Changed
|
12
|
+
- Fix `CycloneLariat::Clients::Sns#list_subscriptions`
|
13
|
+
|
7
14
|
## [1.0.0.rc3]
|
8
15
|
Added
|
9
16
|
- `CycloneLariat::Messages::Builder` for building messages
|
@@ -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.rc4
|
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-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: aws-sdk-sns
|