souls 0.32.18 → 0.33.3
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/sync/model.rb +2 -2
- data/lib/souls/init.rb +23 -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/mutation.rb +35 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adf31a88940fff2ee709f3e6a65a8c0b380c8a98d2c219f15b3205020a90b272
|
4
|
+
data.tar.gz: 4cb05c4da3e40a9d739d7225e18ecdf5b247883a45a6d62715ae7308b4dfea35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de578128a64aa2c1785a7ef263485735ff34beb07c9da88728b437244f18771c48858603bbc3ef37bef2d35cc8e7a638a5862f95c482ae7ea61ca7b83a2c0176
|
7
|
+
data.tar.gz: a6d3cb9080a7ec39750ba2035f889e99bd348a9e2b4db7507873ff5f9da44e15addf8662f29acdc2f693f200f42ba1d15bd10943b039718349e5a6ad61d44b0f
|
data/lib/souls/cli/sync/model.rb
CHANGED
@@ -43,8 +43,8 @@ module Souls
|
|
43
43
|
api_file_data = file_diff(Dir["#{api_dir}/*.rb"])
|
44
44
|
worker_file_data = file_diff(Dir["#{worker_dir}/*.rb"])
|
45
45
|
|
46
|
-
api_latest_date =
|
47
|
-
worker_latest_date =
|
46
|
+
api_latest_date = Time.parse(api_file_data.max)
|
47
|
+
worker_latest_date = Time.parse(worker_file_data.max)
|
48
48
|
end
|
49
49
|
|
50
50
|
if api_latest_date < worker_latest_date
|
data/lib/souls/init.rb
CHANGED
@@ -9,6 +9,29 @@ module Souls
|
|
9
9
|
data[0]["tag_name"]
|
10
10
|
end
|
11
11
|
|
12
|
+
def self.generate_cd
|
13
|
+
shell = `echo $SHELL`.strip
|
14
|
+
rc =
|
15
|
+
if shell.include?("zsh")
|
16
|
+
"zshrc"
|
17
|
+
else
|
18
|
+
"bash"
|
19
|
+
end
|
20
|
+
system("echo 'alias api=\'cd apps/api\'' >> ~/.#{rc}")
|
21
|
+
system("echo 'alias mother=\'...\'' >> ~/.#{rc}")
|
22
|
+
system("echo 'alias worker=\'cd apps/worker\'' >> ~/.#{rc}")
|
23
|
+
puts(Paint["run `source ~/.#{rc}` to reflect your .#{rc}", :yellow])
|
24
|
+
puts(Paint["You can move to mother/api/worker just type", :green])
|
25
|
+
puts(Paint["\nmother\n", :white])
|
26
|
+
puts(
|
27
|
+
Paint["to go back to mother dir from api/worker\n\nYou can also go to api/worker from mother dir by typing",
|
28
|
+
:green]
|
29
|
+
)
|
30
|
+
puts(Paint["\napi\n", :white])
|
31
|
+
puts(Paint["or\n", :green])
|
32
|
+
puts(Paint["worker", :white])
|
33
|
+
end
|
34
|
+
|
12
35
|
def self.initial_config_init(app_name: "souls", service_name: "api")
|
13
36
|
config_dir = "./#{app_name}/apps/#{service_name}/config"
|
14
37
|
FileUtils.mkdir_p(config_dir) unless Dir.exist?(config_dir)
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.12.3
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.12.3
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Souls
|
2
|
+
module Worker
|
3
|
+
module Generate
|
4
|
+
class << self
|
5
|
+
def mutation(class_name: "csv_export")
|
6
|
+
file_dir = "./app/graphql/mutations/"
|
7
|
+
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
8
|
+
file_path = "#{file_dir}#{class_name.singularize}_job.rb"
|
9
|
+
raise(StandardError, "Mailer already exist! #{file_path}") if File.exist?(file_path)
|
10
|
+
|
11
|
+
File.open(file_path, "w") do |f|
|
12
|
+
f.write(<<~TEXT)
|
13
|
+
module Mutations
|
14
|
+
class #{class_name.camelize}Job < BaseMutation
|
15
|
+
description "Job Description"
|
16
|
+
field :response, String, null: false
|
17
|
+
|
18
|
+
def resolve
|
19
|
+
# Define Job Here
|
20
|
+
|
21
|
+
{ response: "Job queued!" }
|
22
|
+
rescue StandardError => e
|
23
|
+
GraphQL::ExecutionError.new(e.to_s)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
TEXT
|
28
|
+
end
|
29
|
+
puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
30
|
+
file_path
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
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.
|
4
|
+
version: 0.33.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/souls/worker/generate.rb
|
149
149
|
- lib/souls/worker/generate/index.rb
|
150
150
|
- lib/souls/worker/generate/mailer.rb
|
151
|
+
- lib/souls/worker/generate/mutation.rb
|
151
152
|
- lib/souls/worker/index.rb
|
152
153
|
homepage: https://souls.elsoul.nl
|
153
154
|
licenses:
|