souls 1.3.2 → 1.3.3

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: e903e408a1e67cf84a2817b0e7144eec61a5c07011b9f2299b4d3b01fdcf4c2e
4
- data.tar.gz: 0572dec02f099651cdc15625eb75189c454aa3b61bdba20bd551c1f9dfe88bd7
3
+ metadata.gz: 56948b07884486be23ef9be575ff30331999c0fbcdf02d63991d30d23a161a57
4
+ data.tar.gz: dec91f275f65b3c2d8e2bc114eecfc6c43fd7d16473905b60866db5453c38816
5
5
  SHA512:
6
- metadata.gz: 775426654c16e931505331ff4cc383c6652244b4fe76f9df41b5e3fefc287ee3a1c38b0adf4234a1c9069abc568678cdebafd06b09f95067f5cf6192264d1d39
7
- data.tar.gz: 3602a072188c4f27d7292a8428cbe82d8188b1de2b23a6ef6bf9f8a2675c036fd5ea6a10f68833a5c63753d996144f2cc80cf63a2eb60538fd371716ebe981fa
6
+ metadata.gz: 04a255e490b590891b25e1f4c33409fba65ff677e556bca9dd90ff5eb62358cf5f80b0ec840b09c301a85bcabc06786e4d44a1512004c32f134e399317bfaad3
7
+ data.tar.gz: b2278cc9e0b024cee8559972a71d99f26e880bd22da4b44c9453500e2fd492601ecad085c4725de4e2a2d5cf0cce16d55a7a2b364235b7827ec1bf57bccfce78
@@ -192,7 +192,7 @@ end
192
192
  --service-account=${{ secrets.APP_NAME }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com \\
193
193
  --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{secrets.APP_NAME}}-#{worker_name} \\
194
194
  --memory=4Gi \\
195
- --region=asia-northeast1 \\
195
+ --region=${{ secrets.GCP_REGION }} \\
196
196
  --allow-unauthenticated \\
197
197
  --platform=managed \\
198
198
  --quiet \\
@@ -5,6 +5,9 @@ module Souls
5
5
  method_option :root_password, default: "", aliases: "--root-password", desc: "Set Cloud SQL Root Password"
6
6
  method_option :mysql, type: :boolean, default: false, aliases: "--mysql", desc: "Set Cloud SQL Type to MySQL"
7
7
  def create_instance
8
+ app_name = Souls.configuration.app
9
+ project_id = Souls.configuration.project_id
10
+ region = Souls.configuration.region
8
11
  instance_name = Souls.configuration.instance_name if instance_name.blank?
9
12
  region = Souls.configuration.region if options[:region].blank?
10
13
  db_type = options[:mysql] ? "MYSQL_8_0" : "POSTGRES_13"
@@ -12,16 +15,38 @@ module Souls
12
15
  zone = "#{region}-b"
13
16
  system(
14
17
  "gcloud sql instances create #{instance_name} \
15
- --database-version=#{db_type} --cpu=2 --memory=7680MB --zone=#{zone} \
18
+ --database-version=#{db_type} --cpu=1 --memory=3750MB --zone=#{zone} \
16
19
  --root-password='#{options[:root_password]}' --database-flags cloudsql.iam_authentication=on"
17
20
  )
18
21
  Dir.chdir(Souls.get_api_path.to_s) do
19
22
  file_path = ".env"
20
- lines = File.readlines(".env")
21
- lines[0] = "DB_HOST=#{get_sql_ip.strip}\n"
22
- lines[1] = "DB_PW=#{options[:root_password]}\n"
23
- lines[2] = "DB_USER=postgres\n"
24
- File.open(file_path, "w") { |f| f.write(lines.join) }
23
+ File.open(file_path, "w") do |line|
24
+ line.write(<<~TEXT)
25
+ DB_HOST=#{get_sql_ip.strip}
26
+ DB_PW=#{options[:root_password]}
27
+ DB_USER=postgres
28
+ SLACK=YOUR_WEB_HOOK_URL
29
+ TZ="Asia/Tokyo"
30
+ SECRET_KEY_BASE=xxxxxxxxxxxxxx
31
+ TEXT
32
+ end
33
+ end
34
+ Dir.chdir(Souls.get_mother_path.to_s) do
35
+ file_path = ".env.production"
36
+ File.open(file_path, "w") do |line|
37
+ line.write(<<~TEXT)
38
+ DB_HOST="/cloudsql/#{project_id}:#{region}:#{instance_name}"
39
+ DB_PW=#{options[:root_password]}
40
+ DB_USER=postgres
41
+ APP_NAME=#{app_name}
42
+ GCP_PROJECT_ID=#{project_id}
43
+ GCP_REGION=#{region}
44
+ GCLOUDSQL_INSTANCE="#{project_id}:#{region}:#{instance_name}"
45
+ TZ="Asia/Tokyo"
46
+ SLACK="https://YOUR.WEB_HOOK_URL"
47
+ SECRET_KEY_BASE="XXXXXXXSecureTokenXXXXXXXXXX"
48
+ TEXT
49
+ end
25
50
  end
26
51
  rescue Thor::Error => e
27
52
  raise(Thor::Error, e)
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.3.2".freeze
2
+ VERSION = "1.3.3".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.3.2
1
+ 1.3.3
@@ -1 +1 @@
1
- 1.3.2
1
+ 1.3.3
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
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
13
  date: 2021-11-01 00:00:00.000000000 Z
@@ -231,7 +231,7 @@ metadata:
231
231
  homepage_uri: https://souls.elsoul.nl
232
232
  source_code_uri: https://github.com/elsoul/souls
233
233
  changelog_uri: https://github.com/elsoul/souls
234
- post_install_message:
234
+ post_install_message:
235
235
  rdoc_options: []
236
236
  require_paths:
237
237
  - lib
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  version: '0'
248
248
  requirements: []
249
249
  rubygems_version: 3.2.22
250
- signing_key:
250
+ signing_key:
251
251
  specification_version: 4
252
252
  summary: Build Serverless Apps faster like Rails. Powered by Ruby GraphQL, RBS/Steep,
253
253
  Active Record, RSpec, RuboCop, and Google Cloud.