cyclone_lariat 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -0
- data/.rubocop.yml +26 -1
- data/CHANGELOG.md +21 -1
- data/Gemfile.lock +27 -22
- data/README.md +466 -90
- data/Rakefile +2 -5
- data/bin/cyclone_lariat +174 -0
- data/config/initializers/sequel.rb +7 -0
- data/cyclone_lariat.gemspec +4 -0
- data/db/migrate/03_add_versions.rb +9 -0
- data/docs/_imgs/graphviz_01.png +0 -0
- data/docs/_imgs/graphviz_02.png +0 -0
- data/docs/_imgs/graphviz_03.png +0 -0
- data/docs/_imgs/logic.png +0 -0
- data/docs/_imgs/sqs_sns_diagram.png +0 -0
- data/lib/cyclone_lariat/abstract/client.rb +25 -14
- data/lib/cyclone_lariat/abstract/message.rb +20 -5
- data/lib/cyclone_lariat/configure.rb +2 -1
- data/lib/cyclone_lariat/errors.rb +22 -4
- data/lib/cyclone_lariat/middleware.rb +2 -1
- data/lib/cyclone_lariat/migration.rb +214 -0
- data/lib/cyclone_lariat/queue.rb +147 -0
- data/lib/cyclone_lariat/sns_client.rb +120 -23
- data/lib/cyclone_lariat/sqs_client.rb +69 -17
- data/lib/cyclone_lariat/topic.rb +113 -0
- data/lib/cyclone_lariat/version.rb +1 -1
- data/lib/cyclone_lariat.rb +1 -0
- data/lib/tasks/console.rake +13 -0
- data/lib/tasks/cyclone_lariat.rake +44 -0
- data/lib/tasks/db.rake +1 -1
- metadata +45 -5
- data/docs/_imgs/diagram.png +0 -0
- data/lib/cyclone_lariat/list_topics_store.rb +0 -45
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: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kudrin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sns
|
@@ -39,6 +39,20 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: dry-cli
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0.6'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0.6'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: luna_park
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,6 +67,20 @@ dependencies:
|
|
53
67
|
- - "~>"
|
54
68
|
- !ruby/object:Gem::Version
|
55
69
|
version: '0.11'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: terminal-table
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '3.0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '3.0'
|
56
84
|
- !ruby/object:Gem::Dependency
|
57
85
|
name: bundler
|
58
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,7 +266,8 @@ dependencies:
|
|
238
266
|
description:
|
239
267
|
email:
|
240
268
|
- kudrin.alexander@gmail.com
|
241
|
-
executables:
|
269
|
+
executables:
|
270
|
+
- cyclone_lariat
|
242
271
|
extensions: []
|
243
272
|
extra_rdoc_files: []
|
244
273
|
files:
|
@@ -254,17 +283,24 @@ files:
|
|
254
283
|
- Gemfile.lock
|
255
284
|
- README.md
|
256
285
|
- Rakefile
|
286
|
+
- bin/cyclone_lariat
|
257
287
|
- bin/docker/diff
|
258
288
|
- bin/docker/init
|
259
289
|
- bin/docker/privatekey
|
260
290
|
- bin/docker/rm
|
261
291
|
- config/db.example.rb
|
292
|
+
- config/initializers/sequel.rb
|
262
293
|
- cyclone_lariat.gemspec
|
263
294
|
- db/migrate/01_add_uuid_extensions.rb
|
264
295
|
- db/migrate/02_add_events.rb
|
296
|
+
- db/migrate/03_add_versions.rb
|
265
297
|
- docker-compose.yml
|
266
|
-
- docs/_imgs/
|
298
|
+
- docs/_imgs/graphviz_01.png
|
299
|
+
- docs/_imgs/graphviz_02.png
|
300
|
+
- docs/_imgs/graphviz_03.png
|
267
301
|
- docs/_imgs/lariat.jpg
|
302
|
+
- docs/_imgs/logic.png
|
303
|
+
- docs/_imgs/sqs_sns_diagram.png
|
268
304
|
- lib/cyclone_lariat.rb
|
269
305
|
- lib/cyclone_lariat/abstract/client.rb
|
270
306
|
- lib/cyclone_lariat/abstract/message.rb
|
@@ -272,13 +308,17 @@ files:
|
|
272
308
|
- lib/cyclone_lariat/configure.rb
|
273
309
|
- lib/cyclone_lariat/errors.rb
|
274
310
|
- lib/cyclone_lariat/event.rb
|
275
|
-
- lib/cyclone_lariat/list_topics_store.rb
|
276
311
|
- lib/cyclone_lariat/messages_mapper.rb
|
277
312
|
- lib/cyclone_lariat/messages_repo.rb
|
278
313
|
- lib/cyclone_lariat/middleware.rb
|
314
|
+
- lib/cyclone_lariat/migration.rb
|
315
|
+
- lib/cyclone_lariat/queue.rb
|
279
316
|
- lib/cyclone_lariat/sns_client.rb
|
280
317
|
- lib/cyclone_lariat/sqs_client.rb
|
318
|
+
- lib/cyclone_lariat/topic.rb
|
281
319
|
- lib/cyclone_lariat/version.rb
|
320
|
+
- lib/tasks/console.rake
|
321
|
+
- lib/tasks/cyclone_lariat.rake
|
282
322
|
- lib/tasks/db.rake
|
283
323
|
homepage: https://am-team.github.io/cyclone_lariat/#/
|
284
324
|
licenses:
|
data/docs/_imgs/diagram.png
DELETED
Binary file
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'singleton'
|
4
|
-
|
5
|
-
module CycloneLariat
|
6
|
-
class ListTopicsStore
|
7
|
-
include Singleton
|
8
|
-
|
9
|
-
def topic_arn(topic_name)
|
10
|
-
@topics[topic_name.to_sym]
|
11
|
-
end
|
12
|
-
|
13
|
-
def list
|
14
|
-
@topics.keys
|
15
|
-
end
|
16
|
-
|
17
|
-
def add_topics(aws_client)
|
18
|
-
@topics ||= {}
|
19
|
-
@aws_client = aws_client
|
20
|
-
fetch
|
21
|
-
end
|
22
|
-
|
23
|
-
def clear_store!
|
24
|
-
@topics = {}
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def fetch
|
30
|
-
return unless @topics.empty?
|
31
|
-
|
32
|
-
@next_token = ''
|
33
|
-
topics_from_aws until @next_token.nil?
|
34
|
-
end
|
35
|
-
|
36
|
-
def topics_from_aws
|
37
|
-
result = @aws_client.list_topics(next_token: @next_token)
|
38
|
-
@next_token = result.next_token
|
39
|
-
result.topics.each do |topic|
|
40
|
-
topic_name = topic.topic_arn.split(':').last
|
41
|
-
@topics[topic_name.to_sym] = topic.topic_arn
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|