souls 0.67.3 → 0.68.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ea18c5d8e5db2d8ce10b76f069e56f342bb17f4fb3965c292028d455773f22f
4
- data.tar.gz: 2f52323e8c002c4798a17bb4a92c004b06af456a7d1c4918909338c766099ba9
3
+ metadata.gz: af7698852f0121588c60883aee4a3c80b6b573ca0c08e8f33487f476de63b7f9
4
+ data.tar.gz: 14ae91be145a5cd8d38453f4995c04e85860b0fbdf0fffbe109701d1e79ec069
5
5
  SHA512:
6
- metadata.gz: 5e6ff3c3ac40131edaf62bf100af8aff513c5d5c3d9dfe7e7f87d670122c7bbbf7014beb76a85698d811b4b5bb9131090424bdd609946eb7b8eb64a0726cf445
7
- data.tar.gz: 10595cbb552d2cb92c0e5c579abe475ab6641a251d49946e0912d7fb962f6007da13f9feeb60ab480e6501c89918bd5674003385b73e2abbf4af28962fc148b6
6
+ metadata.gz: 7a9e9593df5f2aa7110e439f14ff67bc69c0754a701e0481c722430e3cc73203c2f3aef3a1ec248947379c17f33bc351ab070eb1e8a767951e88c50bd0786bc4
7
+ data.tar.gz: da8018823d2efcc24764844befa4ad9b901504adc7a8ffa23ded174cc6bb9bc5c3fbfe7b6fe1eb18303c13dcbca67aa25501633c4da657050136683a1da600b6
@@ -28,7 +28,7 @@ module Souls
28
28
 
29
29
  it "return StockSheet Data" do
30
30
  begin
31
- a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}", "response")
31
+ a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}")
32
32
  raise unless a1.present?
33
33
  rescue StandardError
34
34
  raise(StandardError, result)
@@ -12,9 +12,8 @@ module Souls
12
12
  private
13
13
 
14
14
  def get_topics(workers: {})
15
- app_name = Souls.configuration.app
16
15
  project_id = Souls.configuration.project_id
17
- pubsub = Google::Cloud::Pubsub.new
16
+ pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
18
17
  topics = pubsub.topics
19
18
 
20
19
  topic_names =
@@ -22,7 +21,7 @@ module Souls
22
21
  topic.name.gsub("projects/#{project_id}/topics/", "")
23
22
  end
24
23
 
25
- souls_topics = topic_names.select { |n| n.include?("souls_#{app_name}_") }
24
+ souls_topics = topic_names.select { |n| n.include?("souls_") }
26
25
 
27
26
  souls_topics.each do |name|
28
27
  value = workers[name.to_sym] || 0
@@ -40,17 +39,16 @@ module Souls
40
39
  end
41
40
 
42
41
  def create_topic(topic_id: "mailer")
43
- app_name = Souls.configuration.app
44
- pubsub = Google::Cloud::Pubsub.new
45
- topic_name = "souls_#{app_name}_#{topic_id}"
46
- topic = pubsub.create_topic(topic_name.to_s)
42
+ project_id = Souls.configuration.project_id
43
+ pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
44
+ topic = pubsub.create_topic(topic_id.to_s)
47
45
  puts("Topic #{topic.name} created.")
48
46
  end
49
47
 
50
48
  def delete_topic(topic_id: "mailer")
51
- app_name = Souls.configuration.app
52
- pubsub = Google::Cloud::Pubsub.new
53
- topic_name = "souls_#{app_name}_#{topic_id}"
49
+ project_id = Souls.configuration.project_id
50
+ pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
51
+ topic_name = "#{topic_id}_sub"
54
52
  topic = pubsub.topic(topic_name.to_s)
55
53
  topic.delete
56
54
  puts("Topic #{topic_name} deleted.")
@@ -58,20 +56,19 @@ module Souls
58
56
 
59
57
  def create_push_subscription(topic_id: "mailer")
60
58
  require("#{Souls.get_mother_path}/config/souls")
61
- app_name = Souls.configuration.app
62
- topic_name = "souls_#{app_name}_#{topic_id}"
63
- worker_name = topic_id.split("_")[0]
59
+ worker_name = topic_id.split("_")[1]
64
60
 
65
- subscription_id = "#{topic_name}_sub"
61
+ subscription_id = "#{topic_id}_sub"
66
62
  endpoint = ""
67
63
  worker_paths = Souls.configuration.workers
68
64
  worker_paths.each do |worker|
69
65
  endpoint = worker[:endpoint] if worker[:name] == worker_name
70
66
  end
71
67
 
72
- pubsub = Google::Cloud::Pubsub.new
68
+ project_id = Souls.configuration.project_id
69
+ pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
73
70
 
74
- topic = pubsub.topic(topic_name)
71
+ topic = pubsub.topic(topic_id)
75
72
  sub = topic.subscribe(subscription_id, endpoint: endpoint, deadline: 20)
76
73
  sub.expires_in = nil
77
74
  puts("Push subscription #{subscription_id} created.")
@@ -83,19 +80,13 @@ module Souls
83
80
  response = {}
84
81
  Dir.chdir(Souls.get_mother_path.to_s) do
85
82
  worker_paths.each do |worker|
86
- mailers =
87
- Dir["apps/#{worker}/app/graphql/mutations/mailers/*.rb"].map do |file|
88
- file.gsub("apps/#{worker}/app/graphql/mutations/mailers/", "").gsub(".rb", "")
89
- end
90
-
91
83
  workers =
92
84
  Dir["apps/#{worker}/app/graphql/mutations/*.rb"].map do |file|
93
85
  file.gsub("apps/#{worker}/app/graphql/mutations/", "").gsub(".rb", "")
94
86
  end
95
87
  workers.delete("base_mutation")
96
- local_files = mailers + workers
97
- local_files.each do |file|
98
- response[:"#{worker}_#{file}"] = 1
88
+ workers.each do |file|
89
+ response[:"souls_#{worker}_#{file}"] = 1
99
90
  end
100
91
  end
101
92
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.67.3".freeze
2
+ VERSION = "0.68.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.46.3
1
+ 0.47.3
@@ -1 +1 @@
1
- 0.46.3
1
+ 0.47.3
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.67.3
4
+ version: 0.68.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
8
8
  - KishiTheMechanic
9
9
  - James Neve
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-10-03 00:00:00.000000000 Z
13
+ date: 2021-10-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -112,12 +112,11 @@ dependencies:
112
112
  version: 1.1.0
113
113
  description: |-
114
114
  Welcome to SOULs Serverless Application Framework!
115
-
116
- - Focus on business logic in serverless environment
115
+ - Ruby GraphQL with RBS/Steep - Focus on business logic in serverless environment
117
116
 
118
117
  - Maximize development efficiency with CI / CD standard schema-driven Scaffold
119
118
 
120
- - Achieve global scale with lower management costs
119
+ - Achieve global scale with lower management costs - Rails like Scaffold
121
120
  email:
122
121
  - f.kawasaki@elsoul.nl
123
122
  - s.kishi@elsoul.nl
@@ -207,7 +206,7 @@ metadata:
207
206
  homepage_uri: https://souls.elsoul.nl
208
207
  source_code_uri: https://github.com/elsoul/souls
209
208
  changelog_uri: https://github.com/elsoul/souls
210
- post_install_message:
209
+ post_install_message:
211
210
  rdoc_options: []
212
211
  require_paths:
213
212
  - lib
@@ -223,9 +222,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
222
  version: '0'
224
223
  requirements: []
225
224
  rubygems_version: 3.2.22
226
- signing_key:
225
+ signing_key:
227
226
  specification_version: 4
228
- summary: Welcome to SOULs Serverless Application Framework! - Focus on business logic
229
- in serverless environment - Maximize development efficiency with CI / CD standard
230
- schema-driven Scaffold - Achieve global scale with lower management costs
227
+ summary: Welcome to SOULs Serverless Application Framework! - Ruby GraphQL with RBS/Steep -
228
+ Focus on business logic in serverless environment - Maximize development efficiency
229
+ with CI / CD standard schema-driven Scaffold - Achieve global scale with lower
230
+ management costs - Rails like Scaffold
231
231
  test_files: []