souls 0.48.1 → 0.48.2
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/exe/souls +32 -30
- data/lib/souls/cli/create/index.rb +2 -10
- data/lib/souls/cli/sync/conf.rb +18 -8
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +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: 58f55a316abed31c0fe01f91343cb1922319cf65d6840f32bbb630a87fe002c2
|
4
|
+
data.tar.gz: 0b0fe15d1c23524def03a6457ab63b1dc78675f596fc015b3f8b35b674d215a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45a71d9f2e3fc0d1efe7737df6ff09c55600363643a5d8163e4818e159e0bf7fb7e7679bfb76e1405e034cc105efb4b80efe2ec59945f21e5382446910f048f4
|
7
|
+
data.tar.gz: 200dfcc6a26f1c94503ebbc8afae3c7db8f1d2740e90bfe594c67a0e4c628d7e3d7b10a760c5c3616d3d9900859c1b16147a5bbe945c308f24824a8aeb810089
|
data/exe/souls
CHANGED
@@ -10,37 +10,39 @@ begin
|
|
10
10
|
case souls_command
|
11
11
|
when "api"
|
12
12
|
api_command = ARGV[1]
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Whirly.
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Whirly.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
13
|
+
Dir.chdir(Souls.get_api_path.to_s) do
|
14
|
+
case api_command
|
15
|
+
when "generate", "g"
|
16
|
+
method_name = ARGV[2]
|
17
|
+
class_name = ARGV[3]
|
18
|
+
args = { class_name: class_name }
|
19
|
+
args[:mutation] = ARGV[4] if ARGV.size > 4
|
20
|
+
status = Paint["Running SOULs Generate Commands...", :yellow]
|
21
|
+
Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
|
22
|
+
Whirly.status = status
|
23
|
+
Souls::Api::Generate.public_send(method_name, **args)
|
24
|
+
Whirly.status = "Done!"
|
25
|
+
end
|
26
|
+
when "update"
|
27
|
+
class_name = ARGV[2]
|
28
|
+
status = Paint["Running SOULs Update Commands...", :yellow]
|
29
|
+
Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
|
30
|
+
Whirly.status = status
|
31
|
+
Souls::Api::Update.create_mutation(class_name: class_name)
|
32
|
+
Souls::Api::Update.update_mutation(class_name: class_name)
|
33
|
+
Souls::Api::Update.resolver(class_name: class_name)
|
34
|
+
Souls::Api::Update.type(class_name: class_name)
|
35
|
+
Souls::Api::Update.rspec_factory(class_name: class_name)
|
36
|
+
Souls::Api::Update.rspec_mutation(class_name: class_name)
|
37
|
+
Souls::Api::Update.rspec_resolver(class_name: class_name)
|
38
|
+
Whirly.status = "Done!"
|
39
|
+
end
|
40
|
+
when "d", "delete"
|
41
|
+
class_name = ARGV[2]
|
42
|
+
Souls::Api::Generate.delete_all(class_name: class_name)
|
43
|
+
else
|
44
|
+
puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
|
38
45
|
end
|
39
|
-
when "d", "delete"
|
40
|
-
class_name = ARGV[2]
|
41
|
-
Souls::Api::Generate.delete_all(class_name: class_name)
|
42
|
-
else
|
43
|
-
puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
|
44
46
|
end
|
45
47
|
when "worker"
|
46
48
|
api_command = ARGV[1]
|
@@ -204,20 +204,12 @@ end
|
|
204
204
|
end
|
205
205
|
|
206
206
|
def download_worker(worker_name: "mailer")
|
207
|
-
raise(StandardError, "Can't use `worker` for worker. Change Name.") if worker_name == "worker"
|
208
|
-
|
209
|
-
current_dir_name = FileUtils.pwd.to_s.match(%r{/([^/]+)/?$})[1]
|
210
|
-
wrong_dir = %w[apps api worker]
|
211
|
-
if wrong_dir.include?(current_dir_name)
|
212
|
-
raise(StandardError, "You are at wrong directory!Go to Mother Directory!")
|
213
|
-
end
|
214
|
-
|
215
207
|
version = Souls.get_latest_version_txt(service_name: "worker").join(".")
|
216
208
|
file_name = "worker-v#{version}.tgz"
|
217
209
|
url = "https://storage.googleapis.com/souls-bucket/boilerplates/workers/#{file_name}"
|
218
210
|
system("curl -OL #{url}")
|
219
|
-
system("tar -zxvf ./#{file_name}
|
220
|
-
system("mv
|
211
|
+
system("tar -zxvf ./#{file_name}")
|
212
|
+
system("mv ./worker apps/#{worker_name}")
|
221
213
|
system("cp ./apps/api/config/database.yml ./apps/#{worker_name}/config/")
|
222
214
|
FileUtils.rm(file_name)
|
223
215
|
end
|
data/lib/souls/cli/sync/conf.rb
CHANGED
@@ -24,16 +24,26 @@ module Souls
|
|
24
24
|
next unless worker_switch
|
25
25
|
|
26
26
|
new_line.write(" config.workers = [\n")
|
27
|
-
workers.
|
27
|
+
workers.each_with_index do |worker, i|
|
28
28
|
base_url = Souls::Gcloud::Run.get_endpoint(worker_name: worker[:name])
|
29
29
|
endpoint = Souls.configuration.endpoint
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
}
|
36
|
-
|
30
|
+
if (i + 1) == workers.size
|
31
|
+
new_line.write(<<-TEXT)
|
32
|
+
{
|
33
|
+
name: "#{worker[:name]}",
|
34
|
+
endpoint: "#{base_url.strip}#{endpoint}",
|
35
|
+
port: #{worker[:port]}
|
36
|
+
}
|
37
|
+
TEXT
|
38
|
+
else
|
39
|
+
new_line.write(<<-TEXT)
|
40
|
+
{
|
41
|
+
name: "#{worker[:name]}",
|
42
|
+
endpoint: "#{base_url.strip}#{endpoint}",
|
43
|
+
port: #{worker[:port]}
|
44
|
+
},
|
45
|
+
TEXT
|
46
|
+
end
|
37
47
|
end
|
38
48
|
break
|
39
49
|
end
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.27.
|
1
|
+
0.27.2
|
@@ -1 +1 @@
|
|
1
|
-
0.27.
|
1
|
+
0.27.2
|