souls 0.70.3 → 0.70.7

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: bfdd45d8bf4b6e76fd74f7b021bf81ea682859cc7abd509b18691f424b5d4f56
4
- data.tar.gz: a8c23d424ef49be05963e867eb33437388d79d3b094144e058ca447246c7b17b
3
+ metadata.gz: 7a74490ea7bb8987b6f7d12b4f61022757cd24dc9ddf430d0b51c26aaa0217c3
4
+ data.tar.gz: cf53ab6076b6fd2f04a5817f2537b490ce5d31273929fa2812eef3ca57e20b69
5
5
  SHA512:
6
- metadata.gz: 8d3b1d5b17a75d0bdae8a7bc69abc3997105e832b509acfbfba2e69950a25908786fb5c9a1fa0e64761187931332b59cd52a7f108900ca1007067fa4fd12d4a0
7
- data.tar.gz: eb4bc8998b6c4b05bc88864c8023bb6acb84dcc3e2329727857065de89552f9d6622a8151a305a25eac05225b31593a6bb4738c85e78fa68f759bf3fcb9826cb
6
+ metadata.gz: 4c7675d874ba71198ef7302f7c2e41202f75f53b6e563f7b580b5fbb0b353d4be7401cc916bc1192d651b4fa550e8723907dcd93518d582a25852b15bb91565c
7
+ data.tar.gz: b2298d3104549aa2a509a33619af45c56c7fb1a48b57cfb455724e9ef93b9cea392eb0d0f0d8bdaadf5e446e354dc29f4f1a94543e0b2db5f570d8f88258dd89
@@ -23,7 +23,7 @@ module Souls
23
23
  desc "get_endpoint", "Show Worker's Endpoint"
24
24
  def get_endpoint(worker_name: "")
25
25
  project_id = Souls.configuration.project_id
26
- `gcloud run services list --project #{project_id} | grep ##{worker_name} | awk '{print $4}'`
26
+ `gcloud run services list --project #{project_id} | grep #{worker_name} | awk '{print $4}'`
27
27
  rescue Thor::Error => e
28
28
  raise(Thor::Error, e)
29
29
  end
@@ -62,13 +62,14 @@ module Souls
62
62
  desc "create_vpc_connector", "Create VPC-PEERING Connect"
63
63
  def create_vpc_connector
64
64
  app_name = Souls.configuration.app
65
+ project_id = Souls.configuration.project_id
65
66
  system(
66
67
  "
67
68
  gcloud services vpc-peerings connect \
68
69
  --service=servicenetworking.googleapis.com \
69
70
  --ranges=#{app_name}-ip-range \
70
71
  --network=#{app_name} \
71
- --project=#{app_name}
72
+ --project=#{project_id}
72
73
  "
73
74
  )
74
75
  rescue Thor::Error => e
@@ -55,6 +55,7 @@ module Souls
55
55
  end
56
56
 
57
57
  def create_push_subscription(topic_id: "mailer")
58
+ app = Souls.configuration.app
58
59
  require("#{Souls.get_mother_path}/config/souls")
59
60
  worker_name = topic_id.split("_")[1]
60
61
 
@@ -62,7 +63,7 @@ module Souls
62
63
  endpoint = ""
63
64
  worker_paths = Souls.configuration.workers
64
65
  worker_paths.each do |worker|
65
- endpoint = worker[:endpoint] if worker[:name] == worker_name
66
+ endpoint = worker[:endpoint] if worker[:name] == "souls-#{app}-#{worker_name}"
66
67
  end
67
68
 
68
69
  project_id = Souls.configuration.project_id
@@ -76,7 +77,7 @@ module Souls
76
77
 
77
78
  def get_workers
78
79
  require("#{Souls.get_mother_path}/config/souls")
79
- worker_paths = Souls.configuration.workers.map { |n| n[:name] }
80
+ worker_paths = Souls.configuration.workers.map { |n| n[:name].split("-").last }
80
81
  response = {}
81
82
  Dir.chdir(Souls.get_mother_path.to_s) do
82
83
  worker_paths.each do |worker|
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.70.3".freeze
2
+ VERSION = "0.70.7".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.49.3
1
+ 0.49.7
@@ -1 +1 @@
1
- 0.49.3
1
+ 0.49.7
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.70.3
4
+ version: 0.70.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI