souls 1.5.2 → 1.5.6
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/lib/souls/cli/gcloud/run/index.rb +1 -1
- data/lib/souls/cli/gcloud/sql/index.rb +2 -1
- data/lib/souls/cli/init/index.rb +2 -0
- data/lib/souls/cli/upgrade/config.rb +29 -0
- data/lib/souls/cli/upgrade/index.rb +1 -0
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d3b9eb1cb5b6823cf7810614686760cffe8f38278fad5f5cbd71dcd7a9ac2ad
|
4
|
+
data.tar.gz: 37792d3980be9802875e160b4de033b2928ec80648e3643f5d6c2287cf911d1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e16d7589e8fd2ca4714aacf3389b6b6020df036b05914d0a7aaef4cc4fe7bc873617048632eed9883f2a555fdc856871e58a3bd0d24b8b19f6c7762efa2b0128
|
7
|
+
data.tar.gz: d41552dff851c5a23828420c2074144669766099e52fe378770d6fdaa323e3e5a9e4c536957a259325c6adfdad300c9efadef910143732d6c77a3b85b59a5084
|
@@ -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
|
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
|
@@ -13,12 +13,13 @@ module Souls
|
|
13
13
|
db_type = options[:mysql] ? "MYSQL_8_0" : "POSTGRES_13"
|
14
14
|
|
15
15
|
zone = "#{region}-b"
|
16
|
+
system("gcloud config set project #{project_id}")
|
16
17
|
system(
|
17
18
|
"gcloud sql instances create #{instance_name} \
|
18
19
|
--database-version=#{db_type} --cpu=1 --memory=4096MB --zone=#{zone} \
|
19
20
|
--root-password='#{password}' --database-flags cloudsql.iam_authentication=on"
|
20
21
|
)
|
21
|
-
instance_ip = `gcloud sql instances list | grep
|
22
|
+
instance_ip = `gcloud sql instances list | grep #{instance_name} | awk '{print $5}'`.strip
|
22
23
|
Dir.chdir(Souls.get_api_path.to_s) do
|
23
24
|
file_path = ".env"
|
24
25
|
File.open(file_path, "w") do |line|
|
data/lib/souls/cli/init/index.rb
CHANGED
@@ -7,6 +7,8 @@ module Souls
|
|
7
7
|
puts(Paint["`souls new souls-app`", :yellow])
|
8
8
|
exit
|
9
9
|
end
|
10
|
+
file_dir = "./#{app_name}"
|
11
|
+
raise(StandardError, "Directory Already Exist!") if Dir.exist?(file_dir)
|
10
12
|
|
11
13
|
service_name = "api"
|
12
14
|
download_souls(app_name: app_name, service_name: service_name)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Souls
|
2
|
+
class Upgrade < Thor
|
3
|
+
desc "config", "Update config/souls.rb"
|
4
|
+
def config
|
5
|
+
souls = Souls.configuration
|
6
|
+
prompt = TTY::Prompt.new
|
7
|
+
regions = `gcloud app regions list | awk '{print $1}'`.split("\n")
|
8
|
+
regions.shift
|
9
|
+
project_id = prompt.ask("Project ID:", default: souls.project_id)
|
10
|
+
region = prompt.select("Region:", regions, default: souls.region)
|
11
|
+
endpoint = prompt.ask("Endpoint:", default: souls.endpoint)
|
12
|
+
|
13
|
+
Dir.chdir(Souls.get_mother_path.to_s) do
|
14
|
+
mother_conf_path = "config/souls.rb"
|
15
|
+
api_conf_path = "apps/api/config/souls.rb"
|
16
|
+
mother_conf = File.readlines(mother_conf_path)
|
17
|
+
api_conf = File.readlines(api_conf_path)
|
18
|
+
mother_conf[2] = " config.project_id = \"#{project_id}\"\n"
|
19
|
+
mother_conf[3] = " config.region = \"#{region}\"\n"
|
20
|
+
mother_conf[4] = " config.endpoint = \"#{endpoint}\"\n"
|
21
|
+
api_conf[2] = " config.project_id = \"#{project_id}\"\n"
|
22
|
+
api_conf[3] = " config.region = \"#{region}\"\n"
|
23
|
+
api_conf[4] = " config.endpoint = \"#{endpoint}\"\n"
|
24
|
+
File.open(mother_conf_path, "w") { |f| f.write(mother_conf.join) }
|
25
|
+
File.open(api_conf_path, "w") { |f| f.write(api_conf.join) }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.6
|
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.6
|
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: 1.5.
|
4
|
+
version: 1.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-11-
|
13
|
+
date: 2021-11-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- lib/souls/cli/update/rspec_resolver.rb
|
218
218
|
- lib/souls/cli/update/type.rb
|
219
219
|
- lib/souls/cli/update/type_rbs.rb
|
220
|
+
- lib/souls/cli/upgrade/config.rb
|
220
221
|
- lib/souls/cli/upgrade/gemfile.rb
|
221
222
|
- lib/souls/cli/upgrade/index.rb
|
222
223
|
- lib/souls/cli/upgrade/submodule.rb
|