souls 0.26.9 → 0.26.10
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.rb +27 -13
- 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: 6ed9ffbee1c79292d85bde12b686954ecdbcb679f7fdde04324d3152d2cc065d
|
|
4
|
+
data.tar.gz: f9a65837d335c25d873b65d3fe6eb08c9335314ced645c8568b3fce233477a41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58d4c85fbb4ce6c74dec22a3cb7f4975045798eb5d014a185888e91ac0ae5985b0adeb2a27a535230bc047afcffa8c7b217aa43c122eb6a7974b7d3ea47fd771
|
|
7
|
+
data.tar.gz: 9e9b6d5849d53895bc80b37cf446cb501548689f2a43c0040b04556708194b0305d650d95fac2229761f65139d73a2b556e49f6ab74169a60d9ab13d7a831386
|
data/lib/souls.rb
CHANGED
|
@@ -297,36 +297,50 @@ module Souls
|
|
|
297
297
|
end
|
|
298
298
|
|
|
299
299
|
def cp_and_dl_files(api_dir: "", worker_dir: "")
|
|
300
|
-
|
|
301
|
-
worker_file_data = file_diff(Dir["#{worker_dir}/*.rb"])
|
|
300
|
+
if Dir["#{worker_dir}/*.rb"].blank?
|
|
302
301
|
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
api_latest_date = 1
|
|
303
|
+
worker_latest_date = 0
|
|
304
|
+
else
|
|
305
|
+
api_file_data = file_diff(Dir["#{api_dir}/*.rb"])
|
|
306
|
+
worker_file_data = file_diff(Dir["#{worker_dir}/*.rb"])
|
|
307
|
+
|
|
308
|
+
api_latest_date = Date.parse(api_file_data.max)
|
|
309
|
+
worker_latest_date = Date.parse(worker_file_data.max)
|
|
310
|
+
end
|
|
305
311
|
|
|
306
|
-
if api_latest_date
|
|
307
|
-
FileUtils.rm_rf(api_dir)
|
|
312
|
+
if api_latest_date < worker_latest_date
|
|
313
|
+
FileUtils.rm_rf(api_dir) if Dir.exist?(api_dir)
|
|
308
314
|
FileUtils.mkdir(api_dir) unless Dir.exist?(api_dir)
|
|
309
315
|
system("cp -r #{worker_dir}/* #{api_dir}")
|
|
310
316
|
else
|
|
311
|
-
FileUtils.rm_rf(worker_dir)
|
|
317
|
+
FileUtils.rm_rf(worker_dir) if Dir.exist?(worker_dir)
|
|
312
318
|
FileUtils.mkdir(worker_dir) unless Dir.exist?(worker_dir)
|
|
313
319
|
system("cp -r #{api_dir}/* #{worker_dir}")
|
|
314
320
|
end
|
|
315
321
|
end
|
|
316
322
|
|
|
317
323
|
def get_models_path(service_name: "api")
|
|
324
|
+
case service_name
|
|
325
|
+
when "api"
|
|
326
|
+
api_path = "."
|
|
327
|
+
worker_path = "../worker"
|
|
328
|
+
when "worker"
|
|
329
|
+
api_path = "../api"
|
|
330
|
+
worker_path = "."
|
|
331
|
+
end
|
|
318
332
|
[
|
|
319
333
|
{
|
|
320
|
-
api: "
|
|
321
|
-
worker: "
|
|
334
|
+
api: "#{api_path}/db",
|
|
335
|
+
worker: "#{worker_path}/db"
|
|
322
336
|
},
|
|
323
337
|
{
|
|
324
|
-
api: "
|
|
325
|
-
worker: "
|
|
338
|
+
api: "#{api_path}/app/models",
|
|
339
|
+
worker: "#{worker_path}/app/models"
|
|
326
340
|
},
|
|
327
341
|
{
|
|
328
|
-
api: "
|
|
329
|
-
worker: "
|
|
342
|
+
api: "#{api_path}/spec/factories",
|
|
343
|
+
worker: "#{worker_path}/spec/factories"
|
|
330
344
|
}
|
|
331
345
|
]
|
|
332
346
|
end
|
data/lib/souls/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.10
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.10
|