souls 0.8.4 → 0.8.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: 8b74eb05a7580c397e60b046e42396460e5420d458e8d59c14dfc83ea7321336
4
- data.tar.gz: 75f8d7fdc50574b803729dae7d494b9a9d734041a33d23d917ad4dfa3cafe5ee
3
+ metadata.gz: a57b96797a0a477562740a5cf08fbd5c4183f2fe493a70cb69566f5f1cda980b
4
+ data.tar.gz: 8a029707d19eda050c020c36600dda592d3f0a0451d05f51667343a5d6a8ad2f
5
5
  SHA512:
6
- metadata.gz: cc4d537ffd2fc5356aa9c5b09cbd7ff5f90f81632543374678ae9dfca77fed20e589cd2879fbfa73a546c733eaf01de12d4b37377dd9a094e1aff1dcc9f03c7a
7
- data.tar.gz: c91f880c56d08b41e99964ef5c8cdc5b30ed1c52f49ddc78ed5e0237f7c1fa7ad68d3d9aeb87b5e65e2dd6238d96407c5e27107f41020c00ce7b762f4243a1e2
6
+ metadata.gz: f46f143cc597d71e62948f95226c7bbee91541063d8d6ea03f8fc77e46bdbeeff35373e709ba663b9c5b745e4a2524413ba0c11b4254738792f7265794d7c110
7
+ data.tar.gz: 0c608d8eda05af23a06ae4767e2b19d38e4c98f72a0136bded4e86c48ddc0c08731e5d07d99e3355f30135337fe70f1b9f457dd010216cb618f06d693af06d13
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.8.3)
4
+ souls (0.8.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,13 +1,14 @@
1
1
  Souls.configure do |config|
2
- config.project_id = "el-quest"
3
- config.app = "el-quest"
4
- config.namespace = "souls"
5
- config.service_name = "blog-service"
6
- config.network = "elsoul"
7
- config.machine_type = "elsoul"
8
- config.zone = "elsoul"
9
- config.domain = "elsoul"
10
- config.google_application_credentials = "./config/credentials.json"
11
- config.strain = "service"
2
+ config.main_project_id = ""
3
+ config.project_id = ""
4
+ config.app = "souls"
5
+ config.namespace = ""
6
+ config.service_name = ""
7
+ config.network = ""
8
+ config.machine_type = ""
9
+ config.zone = ""
10
+ config.domain = ""
11
+ config.google_application_credentials = ""
12
+ config.strain = ""
12
13
  config.proto_package_name = "souls"
13
14
  end
data/exe/souls CHANGED
@@ -3,7 +3,7 @@ require "souls"
3
3
 
4
4
  begin
5
5
  begin
6
- require "./config/initializers/souls" unless ARGV[0] == "new"
6
+ require "./config/initializers/souls" unless ARGV[0] == "new" || ARGV[0] == "init"
7
7
  rescue
8
8
  Souls::Init.config_init
9
9
  end
@@ -41,15 +41,16 @@ module Souls
41
41
  confirm = STDIN.gets.chomp
42
42
  raise StandardError, "Retry" unless confirm == ""
43
43
  download_souls app_name: app_name, repository_name: "souls_#{STRAINS[strain.to_i - 1]}"
44
- config_init app_name: app_name, project: project if config_needed.include?(strain)
44
+ initial_config_init app_name: app_name, project: project if config_needed.include?(strain)
45
45
  rescue StandardError => error
46
46
  puts error
47
47
  retry
48
48
  end
49
49
  end
50
50
 
51
- def config_init app_name: "souls", project: {}
51
+ def initial_config_init app_name: "souls", project: {}
52
52
  puts "Generating souls conf..."
53
+ `touch "#{app_name}/config/initializers/souls.rb"`
53
54
  file_path = "#{app_name}/config/initializers/souls.rb"
54
55
  File.open(file_path, "w") do |f|
55
56
  f.write <<~EOS
@@ -71,6 +72,33 @@ module Souls
71
72
  end
72
73
  end
73
74
 
75
+ def config_init app_name: "souls", project: {}
76
+ `touch ./config/initializers/souls.rb`
77
+ file_path = "./config/initializers/souls.rb"
78
+ puts "Generating souls conf..."
79
+ sleep(rand(0.1..0.3))
80
+ puts "Generated!"
81
+ puts "Let's Edit SOULs Conf: `#{file_path}`"
82
+ File.open(file_path, "w") do |f|
83
+ f.write <<~EOS
84
+ Souls.configure do |config|
85
+ config.main_project_id = "#{project[:main_project_id]}"
86
+ config.project_id = "#{project[:project_id]}"
87
+ config.app = "#{app_name}"
88
+ config.namespace = "#{project[:namespace]}"
89
+ config.service_name = "#{project[:service_name]}"
90
+ config.network = "#{project[:network]}"
91
+ config.machine_type = "#{project[:machine_type]}"
92
+ config.zone = "#{project[:zone]}"
93
+ config.domain = "#{project[:domain]}"
94
+ config.google_application_credentials = "#{project[:google_application_credentials]}"
95
+ config.strain = "#{project[:strain]}"
96
+ config.proto_package_name = "souls"
97
+ end
98
+ EOS
99
+ end
100
+ end
101
+
74
102
  def get_version repository_name: "souls_service"
75
103
  data = JSON.parse `curl \
76
104
  -H "Accept: application/vnd.github.v3+json" \
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
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.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI