souls 0.44.3 → 0.44.4

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: a87b2a504cc46a808015cf66359f7db8f118eaf8c604da233375183071530946
4
- data.tar.gz: '098130821ce1f0f8f531803684a91824c11ea12a116c7ae95029a75f83ae341e'
3
+ metadata.gz: be13f14b9929dab4467ff30fa68d574e509a43d56ca7486d07251a7ed75196d6
4
+ data.tar.gz: 034f53df3ed7cdd2e91c31379a9fc7c3e2a0bda36af040bbe2c58d77f1ef3a03
5
5
  SHA512:
6
- metadata.gz: db01dadbecb4d6f2715e71b5e08059826115919117dc5921182ea2a65eda8db28369ba7eee03d942eadb25b92df7030f74f403a566f99e97630a640cddf55e88
7
- data.tar.gz: 7a0f2f6e0c33c990c1480afc0f5bccf421dbc6a6d5bc2404e7436cc08e0d906350bd4816f65a72bddae5d437750345db116943b70301991f3d0ff9c646c7076b
6
+ metadata.gz: 930e61d7785ab9aba113ef70053d4f1aed3209d51906e6c6fe01c7e8744d740a4a43474801f50006dc2080c4fbf9a163353a6301d8352c8632050e5941df642d
7
+ data.tar.gz: 2cf7a62aebff5624790624cd2353ed227e3d35e8f321fb4fd01e61aad4a0b74e772e16d2f058e31c9642f19d749249518a96694fb3a689f64c257275145a9883
@@ -4,9 +4,11 @@ module Souls
4
4
  class << self
5
5
  def create_instance(instance_name: "", root_pass: "Postgre123!", zone: "asia-northeast1-b")
6
6
  instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
7
+ current_ip = `curl inet-ip.info`
7
8
  system(
8
9
  "gcloud sql instances create #{instance_name} \
9
10
  --database-version=POSTGRES_13 --cpu=2 --memory=7680MB --zone=#{zone} \
11
+ --assign-ip=#{current_ip} \
10
12
  --root-password='#{root_pass}' --database-flags cloudsql.iam_authentication=on"
11
13
  )
12
14
  end
@@ -15,12 +17,13 @@ module Souls
15
17
  app_name = Souls.configuration.app
16
18
  instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
17
19
  project_id = Souls.configuration.project_id
18
- system(
19
- "gcloud beta sql instances patch #{instance_name} \
20
- --project=#{project_id} \
21
- --network=#{app_name} \
22
- --no-assign-ip"
23
- )
20
+ system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --network=#{app_name}")
21
+ end
22
+
23
+ def assign_ip
24
+ current_ip = `curl inet-ip.info`
25
+ project_id = Souls.configuration.project_id
26
+ system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --assign-ip=#{current_ip}")
24
27
  end
25
28
  end
26
29
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.44.3".freeze
2
+ VERSION = "0.44.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.23.3
1
+ 0.23.4
@@ -1 +1 @@
1
- 0.23.3
1
+ 0.23.4
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.44.3
4
+ version: 0.44.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI