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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e86dba90f13e7a1e0edb98b6f952b2a3132cc71e044caca35b1da8e1c83e3914
4
- data.tar.gz: 21cb452f850734ae326c23955243b561ceb049df2398d736cac95af03a202ba7
3
+ metadata.gz: 223ff4476db0ed4aae7b969105bfa5ee96f0249f5dfd21f21d71402caa76fa94
4
+ data.tar.gz: d37233c50db8f79e70cb5f6d09664c686fa71fb69630a88a36e404aabf1430c1
5
5
  SHA512:
6
- metadata.gz: 330adaef8cc29cabda3433d1ef1f7ec56d37e236cf817d08296e56d7c4152d80b5cc847795762d600b06a16730e3ae6bf16c970085818cb212aa9f5327cce3a8
7
- data.tar.gz: 9066f78a3aa34a0dfb9864510fe2c6e51cd4058605434c1f75efcc033261dfcbf649c38376b0e17f3f421d223ac9d6b0232ae2743a5a76416b0fdcf9927be640
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])
@@ -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 = Date.parse(api_file_data.max)
47
- worker_latest_date = Date.parse(worker_file_data.max)
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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.32.16".freeze
2
+ VERSION = "0.33.1".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.11.16
1
+ 0.12.1
@@ -1 +1 @@
1
- 0.11.16
1
+ 0.12.1
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.32.16
4
+ version: 0.33.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI