souls 0.32.16 → 0.33.1
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 +1 -1
- data/lib/souls/cli/sync/model.rb +4 -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
- 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: 223ff4476db0ed4aae7b969105bfa5ee96f0249f5dfd21f21d71402caa76fa94
|
4
|
+
data.tar.gz: d37233c50db8f79e70cb5f6d09664c686fa71fb69630a88a36e404aabf1430c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b9a432b1b3766f1d4d7a519e1d1c9e66a4e47c8740baeebe05659abf81ccad0de5e4c76a702c94678d8afc99d6eb1de3a86a59b9041c5ff3efab8f0c9d2a45b
|
7
|
+
data.tar.gz: b9e8139058993083b20fbe1883a6953b59f92fd9b26393260b4373b9f52590ac3b455cc76834e32cf6d767f9cd7622d0da93c83e95aa62878bac6915b60ac0a1
|
data/exe/souls
CHANGED
@@ -138,7 +138,7 @@ begin
|
|
138
138
|
Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
|
139
139
|
Whirly.status = status
|
140
140
|
Souls::Sync.model
|
141
|
-
Whirly.status = "API and Worker Both Models Synced!"
|
141
|
+
Whirly.status = Paint["API and Worker Both Models Synced!", :green]
|
142
142
|
end
|
143
143
|
else
|
144
144
|
puts(Paint["Comannd doesn't exist.Check you command again!...", :red])
|
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
|
@@ -56,6 +56,8 @@ module Souls
|
|
56
56
|
FileUtils.mkdir(worker_dir) unless Dir.exist?(worker_dir)
|
57
57
|
system("cp -r #{api_dir}/* #{worker_dir}")
|
58
58
|
end
|
59
|
+
rescue StandardError => e
|
60
|
+
puts(Paint["`souls api g scaffold $model` at `api` dir first!", :red])
|
59
61
|
end
|
60
62
|
|
61
63
|
def get_models_path(service_name: "api")
|
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.1
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.12.1
|