souls 0.44.5 → 0.44.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8c2f8bf4c926aeed22803b70535e4c67eec16f7fce684e5783c8fe1dc9e31c6
4
- data.tar.gz: 640ef62e1f5372eaaca8f4e28a165fc8dc5000219d104673ec834a4a26947a8e
3
+ metadata.gz: d865b08288f0e499cfb249f6fe2a40f3c638c29c4926b7f3897d0b623c0ec18c
4
+ data.tar.gz: bec91ce65113d32ebd75e3b13e523be4349717aa8a2eb0afd1fd2633f8a46d12
5
5
  SHA512:
6
- metadata.gz: 5302522be96fd7fc61bc5325ec2f4d5e27cba0ac6836bed7a9deb6da3de3b7b0710e768e5707f64be0dfd02c8e940afbf3296238a853a3c265dc06b0c918b560
7
- data.tar.gz: faff35a6fdc2e1221168f0fd888e00da991d3531d03537310466c2fc590adfd90f68c8a31e473b4c1d29bd8bd65d0f1239436f245a9d2da28ca6844a3ec1446c
6
+ metadata.gz: 02b279c8eaa243c5ae867565ffa321a9ffcf14379a43985317e19a8674c817a48fd551c00f23f3714bb390b2d62e5b50e4cbfd101a3a520301191f2b9f6bd261
7
+ data.tar.gz: e5717306a70cbfe4824a9e9eac97f78f344ff92bd564df03001b21c54d6d201467118c80bfd3ef0337ecabcb86e159b7fb6b45d96a864df0d658b2c0ef539d40
@@ -4,11 +4,9 @@ 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`
8
7
  system(
9
8
  "gcloud sql instances create #{instance_name} \
10
9
  --database-version=POSTGRES_13 --cpu=2 --memory=7680MB --zone=#{zone} \
11
- --assign-ip=#{current_ip} \
12
10
  --root-password='#{root_pass}' --database-flags cloudsql.iam_authentication=on"
13
11
  )
14
12
  end
@@ -20,11 +18,19 @@ module Souls
20
18
  system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --network=#{app_name}")
21
19
  end
22
20
 
23
- def assign_ip(instance_name: "")
24
- current_ip = `curl inet-ip.info`
21
+ def assign_ip(instance_name: "", ip: "")
22
+ ip = `curl inet-ip.info` if ip.blank?
25
23
  project_id = Souls.configuration.project_id
26
24
  instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
27
- system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --assign-ip=#{current_ip}")
25
+ system(
26
+ "
27
+ gcloud beta sql instances patch #{instance_name} \
28
+ --project=#{project_id} \
29
+ --assign-ip \
30
+ --authorized-networks=#{ip} \
31
+ --quiet
32
+ "
33
+ )
28
34
  end
29
35
  end
30
36
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.44.5".freeze
2
+ VERSION = "0.44.6".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.23.5
1
+ 0.23.6
@@ -1 +1 @@
1
- 0.23.5
1
+ 0.23.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: 0.44.5
4
+ version: 0.44.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI