wolf_core 0.1.77 → 0.1.78
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wolf_core/utils/file_utils.rb +7 -3
- data/lib/wolf_core/version.rb +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: 5e145d3b439d467c90d8724667a591a2c296cef6bb593b92725aaef999ee8ebe
|
4
|
+
data.tar.gz: 3aa621efd4819d2a657626eee5e63e37dc24ccef22d44965fa63006e3e3c85a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cff2eac905d64ca218923a824df3972657b5b364ac13103044e4f5dcfe1c76894abccef55da0f8b85aec811d86fde58de8458cd075c007a23fa36b6aebb1c44
|
7
|
+
data.tar.gz: 55109f3a42ed5fcdbc239b71e9771bef15df2c4bdc3d6af5dcc50fe37a6ffaeb06491c262d23d63e520e754d2088f97877d9cb944fdcfea500f1b3d22c23e1e9
|
@@ -14,6 +14,7 @@ module WolfCore
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def safe_require(missing_files)
|
17
|
+
error_counter = {}
|
17
18
|
while missing_files.any?
|
18
19
|
files_to_require = missing_files
|
19
20
|
missing_files = []
|
@@ -22,9 +23,12 @@ module WolfCore
|
|
22
23
|
# log_object "Requiring file: #{file}"
|
23
24
|
require_relative file
|
24
25
|
rescue NameError => e
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
error_counter[file] = error_counter[file].to_i + 1
|
27
|
+
if error_counter[file] >= 10
|
28
|
+
log_object "Error requiring file: #{file}"
|
29
|
+
log_object e, title: 'Error is'
|
30
|
+
end
|
31
|
+
missing_files << file if error_counter[file] < 15
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
data/lib/wolf_core/version.rb
CHANGED