souls 0.41.1 → 0.42.1

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: 9901b40b4c239bbf4963bddaa54b6211f12f60b5a780e409e25f34e43280a46b
4
- data.tar.gz: 3937e60d4e0f2799cbae53c2c4e9662c135e5529636dd234d0cffbc9a71bafd9
3
+ metadata.gz: edd47698ca891813c0b301df870e9d89c186f6a5daf08e0b826030f9c39fac24
4
+ data.tar.gz: 66d83ceba816974a327d2df21202b515e50f0bb53790c211d530566a5c07ee78
5
5
  SHA512:
6
- metadata.gz: 23ed2a5788d0c0aefdb596eff5a102f62189a0780925576a5dd51c275d65b06100d7a7e60922a6b17a91443c6bc15ec85888b796c097595da2d4d99465908c09
7
- data.tar.gz: a6746ef6153e4c62a2b7f8f3d07b681970d20431b18db35c2d8738dd7ada78f630e742b378ca3d158e7296cffd61fcee1ad7b0698c64c312a8cb0689c63b1cb6
6
+ metadata.gz: cb4b8d58f2dbd7ded286e3fbdb937d1d83eac27d76c16c33448a321b2f5ee2e2df366436ac7cde2a5b2b45ff8bf934b5bd4236c218412c666660921bde1d0691
7
+ data.tar.gz: 8d917f318dceceddc9d153a8cd7e0753b458990095155620db6bd123a5b88bf0ffaebe428d53c8e148598965125cafd0d400ab072e2238111e7a964780070965
@@ -16,7 +16,7 @@ module Souls
16
16
  end
17
17
 
18
18
  def get_endpoint(worker_name: "")
19
- system("gcloud run services list | grep #{worker_name} | awk '{print $4}'")
19
+ `gcloud run services list | grep #{worker_name} | awk '{print $4}'`
20
20
  end
21
21
  end
22
22
  end
@@ -11,7 +11,7 @@ module Souls
11
11
  )
12
12
  end
13
13
 
14
- def pathch_instance(instance_name: "")
14
+ def patch_instance(instance_name: "")
15
15
  app_name = Souls.configuration.app
16
16
  instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
17
17
  project_id = Souls.configuration.project_id
@@ -23,11 +23,12 @@ module Souls
23
23
 
24
24
  new_line.write(" config.workers = [\n")
25
25
  workers.each do |worker|
26
- endpoint = Souls::Gcloud::Run.get_endpoint(worker_name: worker[:name])
26
+ base_url = Souls::Gcloud::Run.get_endpoint(worker_name: worker[:name])
27
+ endpoint = Souls.configuration.endpoint
27
28
  new_line.write(<<-TEXT)
28
29
  {
29
30
  name: "#{worker[:name]}",
30
- endpoint: "#{endpoint}/endpoint",
31
+ endpoint: "#{base_url.strip}/#{endpoint}",
31
32
  port: #{worker[:port]}
32
33
  },
33
34
  TEXT
@@ -35,9 +36,9 @@ module Souls
35
36
  break
36
37
  end
37
38
  end
38
- new_line.write(<<-TEXT)
39
- ]
40
- end
39
+ new_line.write(<<~TEXT)
40
+ ]
41
+ end
41
42
  TEXT
42
43
  end
43
44
  end
@@ -24,10 +24,10 @@ module Souls
24
24
 
25
25
  workers.each do |key, value|
26
26
  if value == 1
27
- create_topic(topic_id: key)
28
- create_push_subscription(topic_id: key)
27
+ create_topic(topic_id: key.to_s)
28
+ create_push_subscription(topic_id: key.to_s)
29
29
  end
30
- delete_topic(topic_id: key) if value == -1
30
+ delete_topic(topic_id: key.to_s) if value == -1
31
31
  end
32
32
  workers
33
33
  end
@@ -49,7 +49,7 @@ module Souls
49
49
  require("#{Souls.get_mother_path}/config/souls")
50
50
  worker_name = topic_id.split("_")[0]
51
51
 
52
- subscription_id = "#{topic_id}-sub"
52
+ subscription_id = "#{topic_id}_sub"
53
53
  endpoint = ""
54
54
  worker_paths = Souls.configuration.workers
55
55
  worker_paths.each do |worker|
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.41.1".freeze
2
+ VERSION = "0.42.1".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.20.1
1
+ 0.21.1
@@ -1 +1 @@
1
- 0.20.1
1
+ 0.21.1
data/lib/souls.rb CHANGED
@@ -247,14 +247,13 @@ module Souls
247
247
  end
248
248
 
249
249
  class Configuration
250
- attr_accessor :app, :strain, :project_id, :github_repo, :worker_endpoint, :fixed_gems, :workers
250
+ attr_accessor :app, :strain, :project_id, :endpoint, :fixed_gems, :workers
251
251
 
252
252
  def initialize
253
253
  @app = nil
254
254
  @project_id = nil
255
+ @endpoint = nil
255
256
  @strain = nil
256
- @github_repo = nil
257
- @worker_endpoint = nil
258
257
  @fixed_gems = nil
259
258
  @workers = nil
260
259
  end
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.41.1
4
+ version: 0.42.1
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-09-04 00:00:00.000000000 Z
13
+ date: 2021-09-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -175,7 +175,7 @@ metadata:
175
175
  homepage_uri: https://souls.elsoul.nl
176
176
  source_code_uri: https://github.com/elsoul/souls
177
177
  changelog_uri: https://github.com/elsoul/souls
178
- post_install_message:
178
+ post_install_message:
179
179
  rdoc_options: []
180
180
  require_paths:
181
181
  - lib
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  requirements: []
193
193
  rubygems_version: 3.2.22
194
- signing_key:
194
+ signing_key:
195
195
  specification_version: 4
196
196
  summary: SOULs はサーバーレスフルスタックフレームワークです。柔軟な Ruby GraphQL API と Worker はルーティングの必要がありません。
197
197
  クラウド環境への自動デプロイ、CI/CD ワークフローを標準装備。開発者がビジネスロジックに集中し、楽しくコードが書けるような環境を目指しています。