souls 1.4.10 → 1.5.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 +4 -4
- data/lib/souls/cli/gcloud/run/index.rb +1 -1
- data/lib/souls/cli/gcloud/sql/index.rb +6 -8
- data/lib/souls/cli/release/release.rb +1 -1
- 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
- data/lib/souls.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 610ae84aae1c7d75c24a0362d9aa8d26d8db04f5fceb3156a89717c2a04d2f43
|
4
|
+
data.tar.gz: d7aa00e87059adc6c94669ae690ac2d44553d798518f9e4241d9539e391d1a9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1e30d414c8464bdeff2abc95bd92a26f58f234e731ccba69dc034a010c1043150e62affd95309d1197cd418c2ebdbc51c31fba65a65268f2b2b77126b006f3e
|
7
|
+
data.tar.gz: dcc28cc09610d9263bd060290f6399017f6bad0c8b6962f01c1c226fda890d126b61dd83e6b9877a4ecbbc3cec6108b6e48084c707993704f999bf3be9998a55
|
@@ -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 -x #{worker_name} | awk '{print $4}'`
|
27
27
|
rescue Thor::Error => e
|
28
28
|
raise(Thor::Error, e)
|
29
29
|
end
|
@@ -8,21 +8,23 @@ module Souls
|
|
8
8
|
password = prompt.mask("Set DB PassWord:")
|
9
9
|
app_name = Souls.configuration.app
|
10
10
|
project_id = Souls.configuration.project_id
|
11
|
-
instance_name = Souls.configuration.instance_name
|
11
|
+
instance_name = Souls.configuration.instance_name
|
12
12
|
region = Souls.configuration.region if options[:region].blank?
|
13
13
|
db_type = options[:mysql] ? "MYSQL_8_0" : "POSTGRES_13"
|
14
14
|
|
15
15
|
zone = "#{region}-b"
|
16
16
|
system(
|
17
17
|
"gcloud sql instances create #{instance_name} \
|
18
|
-
--database-version=#{db_type} --cpu=1 --memory=
|
18
|
+
--database-version=#{db_type} --cpu=1 --memory=4096MB --zone=#{zone} \
|
19
19
|
--root-password='#{password}' --database-flags cloudsql.iam_authentication=on"
|
20
20
|
)
|
21
|
+
instance_ip = `gcloud sql instances list | grep -x #{instance_name} | awk '{print $5}'`.strip
|
22
|
+
sleep(5) until instance_ip.match?(Resolv::IPv4::Regex)
|
21
23
|
Dir.chdir(Souls.get_api_path.to_s) do
|
22
24
|
file_path = ".env"
|
23
25
|
File.open(file_path, "w") do |line|
|
24
26
|
line.write(<<~TEXT)
|
25
|
-
SOULS_DB_HOST=#{
|
27
|
+
SOULS_DB_HOST=#{instance_ip}
|
26
28
|
SOULS_DB_PW=#{password}
|
27
29
|
SOULS_DB_USER=postgres
|
28
30
|
SOULS_GCP_PROJECT_ID=#{project_id}
|
@@ -36,7 +38,7 @@ module Souls
|
|
36
38
|
File.open(file_path, "w") do |line|
|
37
39
|
line.write(<<~TEXT)
|
38
40
|
SOULS_DB_HOST="/cloudsql/#{project_id}:#{region}:#{instance_name}"
|
39
|
-
SOULS_DB_PW=#{
|
41
|
+
SOULS_DB_PW=#{password}
|
40
42
|
SOULS_DB_USER=postgres
|
41
43
|
SOULS_APP_NAME=#{app_name}
|
42
44
|
SOULS_GCP_PROJECT_ID=#{project_id}
|
@@ -133,10 +135,6 @@ module Souls
|
|
133
135
|
|
134
136
|
private
|
135
137
|
|
136
|
-
def get_sql_ip
|
137
|
-
`gcloud sql instances list | grep james | awk '{print $5}'`
|
138
|
-
end
|
139
|
-
|
140
138
|
def region_to_timezone(region: "asia-northeast1")
|
141
139
|
if region.include?("asia")
|
142
140
|
"Asia/Tokyo"
|
@@ -33,7 +33,7 @@ module Souls
|
|
33
33
|
puts("before build")
|
34
34
|
system("rake build")
|
35
35
|
system("rake release")
|
36
|
-
system("gsutil -m cp -r coverage gs://souls-bucket/souls-coverage")
|
36
|
+
system("gsutil -m -q cp -r coverage gs://souls-bucket/souls-coverage")
|
37
37
|
Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
|
38
38
|
end
|
39
39
|
end
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.1
|
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.1
|
data/lib/souls.rb
CHANGED