souls 1.5.1 → 1.5.5

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: 610ae84aae1c7d75c24a0362d9aa8d26d8db04f5fceb3156a89717c2a04d2f43
4
- data.tar.gz: d7aa00e87059adc6c94669ae690ac2d44553d798518f9e4241d9539e391d1a9c
3
+ metadata.gz: '0832b8196b85749aba79efb983d1ac750903094a2c12dffceece48f885797a13'
4
+ data.tar.gz: 0c7912b5876996c503fc87690bb861ffb8b195bc1176d54ffa06b6c7e297938e
5
5
  SHA512:
6
- metadata.gz: d1e30d414c8464bdeff2abc95bd92a26f58f234e731ccba69dc034a010c1043150e62affd95309d1197cd418c2ebdbc51c31fba65a65268f2b2b77126b006f3e
7
- data.tar.gz: dcc28cc09610d9263bd060290f6399017f6bad0c8b6962f01c1c226fda890d126b61dd83e6b9877a4ecbbc3cec6108b6e48084c707993704f999bf3be9998a55
6
+ metadata.gz: b1923f0e51e212cefd708bcafb29aea698cb094720c8afbcd9b3a007a7b6536ee34022b9eeb8a160a336421558f3242181a4411ba12880f0e536e8e71fabc42d
7
+ data.tar.gz: 3e3db2be3a2374645d08add59d28b51f28565c727c7f0ff3c065586ce0a53cab585a1f1a2088c0be0e296635a3d74e52601b5dab0df3abfdf85cb021f6938673
@@ -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 -x #{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
@@ -13,13 +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 -x #{instance_name} | awk '{print $5}'`.strip
22
- sleep(5) until instance_ip.match?(Resolv::IPv4::Regex)
22
+ instance_ip = `gcloud sql instances list | grep #{instance_name} | awk '{print $5}'`.strip
23
23
  Dir.chdir(Souls.get_api_path.to_s) do
24
24
  file_path = ".env"
25
25
  File.open(file_path, "w") do |line|
@@ -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,27 @@
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
+ project_id = prompt.ask("Project ID:", default: souls.project_id)
8
+ region = prompt.ask("Region:", default: souls.region)
9
+ endpoint = prompt.ask("Endpoint:", default: souls.endpoint)
10
+
11
+ Dir.chdir(Souls.get_mother_path.to_s) do
12
+ mother_conf_path = "config/souls.rb"
13
+ api_conf_path = "apps/api/config/souls.rb"
14
+ mother_conf = File.readlines(mother_conf_path)
15
+ api_conf = File.readlines(api_conf_path)
16
+ mother_conf[2] = " config.project_id = \"#{project_id}\"\n"
17
+ mother_conf[3] = " config.region = \"#{region}\"\n"
18
+ mother_conf[4] = " config.endpoint = \"#{endpoint}\"\n"
19
+ api_conf[2] = " config.project_id = \"#{project_id}\"\n"
20
+ api_conf[3] = " config.region = \"#{region}\"\n"
21
+ api_conf[4] = " config.endpoint = \"#{endpoint}\"\n"
22
+ File.open(mother_conf_path, "w") { |f| f.write(mother_conf.join) }
23
+ File.open(api_conf_path, "w") { |f| f.write(api_conf.join) }
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,2 +1,3 @@
1
1
  require_relative "./gemfile"
2
2
  require_relative "./submodule"
3
+ require_relative "./config"
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.5.1".freeze
2
+ VERSION = "1.5.5".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.5.1
1
+ 1.5.5
@@ -1 +1 @@
1
- 1.5.1
1
+ 1.5.5
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.1
4
+ version: 1.5.5
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-08 00:00:00.000000000 Z
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