souls 0.59.2 → 0.60.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.
- checksums.yaml +4 -4
- data/lib/souls/cli/create/index.rb +64 -0
- 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
- data/lib/souls/worker/generate/index.rb +1 -0
- data/lib/souls/worker/generate/job.rb +1 -0
- data/lib/souls/worker/generate/job_rbs.rb +31 -0
- 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: 70d25691a6e93376b3393efc7b95c0585995bf1611cce81b463a4db3f17497ca
|
4
|
+
data.tar.gz: 0a1fe1bcc547ad5c41d85a5bf814157f171eb5aec5f8b1ce5f847bf509a6a6fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01fdbaa3e67ed0cfc1d4a78c56e55046f4e3bf3c413e7170eefb9b2ffb661cd86721140553e01807a9fe82db553003c7b108b90081ec9ca77b336e70c579577c
|
7
|
+
data.tar.gz: 8d83326353d091c5655ff463ee1d7e72582d8a66be7c40567206811b3b4b1a4f25c2796ec3362fa01f7142b8651f60a60c76cd4852e6b4032f3cabc49102bf08
|
@@ -19,6 +19,9 @@ module Souls
|
|
19
19
|
procfile(worker_name: options[:name], port: port)
|
20
20
|
mother_procfile(worker_name: options[:name])
|
21
21
|
souls_config_init(worker_name: options[:name])
|
22
|
+
steepfile(worker_name: options[:name])
|
23
|
+
souls_helper_rbs(worker_name: options[:name])
|
24
|
+
souls_worker_credit(worker_name: options[:name])
|
22
25
|
end
|
23
26
|
true
|
24
27
|
rescue Thor::Error => e
|
@@ -27,6 +30,26 @@ module Souls
|
|
27
30
|
|
28
31
|
private
|
29
32
|
|
33
|
+
def steepfile(worker_name: "mailer")
|
34
|
+
file_path = "./Steepfile"
|
35
|
+
new_file_path = "config/Steepfile"
|
36
|
+
File.open(new_file_path, "w") do |new_line|
|
37
|
+
File.open(file_path, "r") do |f|
|
38
|
+
f.each_line do |line|
|
39
|
+
case line.strip.to_s
|
40
|
+
when "end"
|
41
|
+
["app", "db", "constants", "app.rb"].each do |path|
|
42
|
+
new_line.write(" check \"apps/#{worker_name}/#{path}\"\n")
|
43
|
+
end
|
44
|
+
new_line.write("end\n")
|
45
|
+
else
|
46
|
+
new_line.write(line)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
30
53
|
def procfile(worker_name: "mailer", port: 3000)
|
31
54
|
file_dir = "apps/#{worker_name}"
|
32
55
|
file_path = "#{file_dir}/Procfile.dev"
|
@@ -212,6 +235,47 @@ end
|
|
212
235
|
puts(e)
|
213
236
|
end
|
214
237
|
|
238
|
+
def souls_helper_rbs(worker_name: "mailer")
|
239
|
+
file_dir = "./sig/#{worker_name}/app/utils/"
|
240
|
+
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
241
|
+
file_path = "#{file_dir}/souls_helper.rbs"
|
242
|
+
File.open(file_path, "w") do |f|
|
243
|
+
f.write(<<~TEXT)
|
244
|
+
module SoulsHelper
|
245
|
+
def self.export_csv: (untyped model_name) -> (String? | StandardError )
|
246
|
+
def self.export_model_to_csv: (untyped model_name) -> (untyped | StandardError )
|
247
|
+
def self.upload_to_gcs: (String file_path, String upload_path) -> untyped
|
248
|
+
def self.get_selenium_driver: (?:chrome mode) -> untyped
|
249
|
+
end
|
250
|
+
module CSV
|
251
|
+
def self.open: (*untyped){(untyped) -> nil} -> untyped
|
252
|
+
end
|
253
|
+
module Selenium
|
254
|
+
module WebDriver
|
255
|
+
def self.for: (*untyped) -> untyped
|
256
|
+
module Chrome
|
257
|
+
module Options
|
258
|
+
def self.new: ()-> untyped
|
259
|
+
end
|
260
|
+
end
|
261
|
+
module Remote
|
262
|
+
module Capabilities
|
263
|
+
def self.firefox: ()-> untyped
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
268
|
+
module Google
|
269
|
+
module Cloud
|
270
|
+
module Storage
|
271
|
+
def self.new: ()-> untyped
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
TEXT
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
215
279
|
def download_worker(worker_name: "mailer")
|
216
280
|
version = Souls.get_latest_version_txt(service_name: "worker").join(".")
|
217
281
|
file_name = "worker-v#{version}.tgz"
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.39.0
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.39.0
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Souls
|
2
|
+
class Generate < Thor
|
3
|
+
desc "job_rbs [CLASS_NAME]", "Generate SOULs Job Mutation RBS Template"
|
4
|
+
def job_rbs(class_name)
|
5
|
+
file_path = ""
|
6
|
+
Dir.chdir(Souls.get_mother_path.to_s) do
|
7
|
+
singularized_class_name = class_name.underscore.singularize
|
8
|
+
file_dir = "./sig/#{singularized_class_name}/app/graphql/mutations/"
|
9
|
+
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
10
|
+
file_path = "#{file_dir}#{singularized_class_name}.rbs"
|
11
|
+
File.open(file_path, "w") do |f|
|
12
|
+
f.write(<<~TEXT)
|
13
|
+
module Types
|
14
|
+
module Mutations
|
15
|
+
String: String
|
16
|
+
class #{singularized_class_name.camelize} < BaseMutation
|
17
|
+
def self.description: (String) -> untyped
|
18
|
+
def self.field: (:response, String, null: false) -> untyped
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
TEXT
|
23
|
+
end
|
24
|
+
puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
25
|
+
end
|
26
|
+
file_path
|
27
|
+
rescue Thor::Error => e
|
28
|
+
raise(Thor::Error, e)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|