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 +4 -4
- data/Gemfile.lock +1 -1
- data/config/initializers/souls.rb +11 -10
- data/exe/souls +1 -1
- data/lib/souls/init.rb +30 -2
- data/lib/souls/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a57b96797a0a477562740a5cf08fbd5c4183f2fe493a70cb69566f5f1cda980b
|
4
|
+
data.tar.gz: 8a029707d19eda050c020c36600dda592d3f0a0451d05f51667343a5d6a8ad2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f46f143cc597d71e62948f95226c7bbee91541063d8d6ea03f8fc77e46bdbeeff35373e709ba663b9c5b745e4a2524413ba0c11b4254738792f7265794d7c110
|
7
|
+
data.tar.gz: 0c608d8eda05af23a06ae4767e2b19d38e4c98f72a0136bded4e86c48ddc0c08731e5d07d99e3355f30135337fe70f1b9f457dd010216cb618f06d693af06d13
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
Souls.configure do |config|
|
2
|
-
config.
|
3
|
-
config.
|
4
|
-
config.
|
5
|
-
config.
|
6
|
-
config.
|
7
|
-
config.
|
8
|
-
config.
|
9
|
-
config.
|
10
|
-
config.
|
11
|
-
config.
|
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
data/lib/souls/init.rb
CHANGED
@@ -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
|
-
|
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
|
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" \
|
data/lib/souls/version.rb
CHANGED