souls 0.44.3 → 0.45.0

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.
@@ -2,7 +2,7 @@ module Souls
2
2
  module Api::Generate
3
3
  class << self
4
4
  ## Generate Type
5
- def create_type_head(class_name: "souls")
5
+ def create_type_head(class_name: "user")
6
6
  file_dir = "./app/graphql/types/"
7
7
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
8
8
  file_path = "./app/graphql/types/#{class_name}_type.rb"
@@ -16,7 +16,7 @@ module Souls
16
16
  end
17
17
  end
18
18
 
19
- def create_type_params(class_name: "souls")
19
+ def create_type_params(class_name: "user")
20
20
  file_path = "./app/graphql/types/#{class_name}_type.rb"
21
21
  path = "./db/schema.rb"
22
22
  @on = false
@@ -52,7 +52,7 @@ module Souls
52
52
  end
53
53
  end
54
54
 
55
- def create_type_end(class_name: "souls")
55
+ def create_type_end(class_name: "user")
56
56
  file_path = "./app/graphql/types/#{class_name}_type.rb"
57
57
  File.open(file_path, "a") do |f|
58
58
  f.write(<<~TEXT)
@@ -63,7 +63,7 @@ module Souls
63
63
  file_path
64
64
  end
65
65
 
66
- def type(class_name: "souls")
66
+ def type(class_name: "user")
67
67
  singularized_class_name = class_name.singularize
68
68
  file_path = "./app/graphql/types/#{singularized_class_name}_type.rb"
69
69
  return "Type already exist! #{file_path}" if File.exist?(file_path)
@@ -15,11 +15,21 @@ module Souls
15
15
  app_name = Souls.configuration.app
16
16
  instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
17
17
  project_id = Souls.configuration.project_id
18
+ system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --network=#{app_name}")
19
+ end
20
+
21
+ def assign_ip(instance_name: "", ip: "")
22
+ ip = `curl inet-ip.info` if ip.blank?
23
+ project_id = Souls.configuration.project_id
24
+ instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
18
25
  system(
19
- "gcloud beta sql instances patch #{instance_name} \
26
+ "
27
+ gcloud beta sql instances patch #{instance_name} \
20
28
  --project=#{project_id} \
21
- --network=#{app_name} \
22
- --no-assign-ip"
29
+ --assign-ip \
30
+ --authorized-networks=#{ip} \
31
+ --quiet
32
+ "
23
33
  )
24
34
  end
25
35
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.44.3".freeze
2
+ VERSION = "0.45.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.23.3
1
+ 0.24.0
@@ -1 +1 @@
1
- 0.23.3
1
+ 0.24.0
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.45.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI