bbk-utils 1.0.1.84207 → 1.0.1.89770
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/bbk/utils.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9a7afa5a8879bb88c539dd0d11b2c4e57321cfb729de3bd5fe1e31d4becea87
|
4
|
+
data.tar.gz: d57ebc66b8468c354b0124dc3ada3eba12738b67863d3bab9010c562fdf8a8df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0adb7b4527d8bff9241d7c6bc7da35749cfbc872dcfc1cf1d68efb4752a4c479a950cf26da1a8dc9a2b68137f743fbc152fc9daa2e1887208663ec2683b0d6c
|
7
|
+
data.tar.gz: 22e33eac745da9ba63d698218013ce1621dd7a75e4a6ca63030e0566699ec8a206f144b0552fee4c1b0b7f8e6f9f502450cf2559f60514e66c8a19163cbc715a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bbk-utils (1.0.1.
|
4
|
+
bbk-utils (1.0.1.89770)
|
5
5
|
activesupport (~> 6.0)
|
6
6
|
russian
|
7
7
|
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
kwalify (0.7.2)
|
50
50
|
launchy (2.5.0)
|
51
51
|
addressable (~> 2.7)
|
52
|
-
minitest (5.
|
52
|
+
minitest (5.16.2)
|
53
53
|
parallel (1.21.0)
|
54
54
|
parser (3.0.3.1)
|
55
55
|
ast (~> 2.4.1)
|
@@ -133,7 +133,7 @@ GEM
|
|
133
133
|
coercible (~> 1.0)
|
134
134
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
135
135
|
equalizer (~> 0.0, >= 0.0.9)
|
136
|
-
zeitwerk (2.
|
136
|
+
zeitwerk (2.6.0)
|
137
137
|
|
138
138
|
PLATFORMS
|
139
139
|
ruby
|
data/lib/bbk/utils.rb
CHANGED
@@ -17,6 +17,24 @@ module BBK
|
|
17
17
|
|
18
18
|
attr_accessor :logger
|
19
19
|
|
20
|
+
def gracefully_main
|
21
|
+
yield
|
22
|
+
0
|
23
|
+
rescue SignalException => e
|
24
|
+
if %w[INT TERM EXIT QUIT].include?(Signal.signame(e.signo))
|
25
|
+
0
|
26
|
+
else
|
27
|
+
logger.error "Signal: #{e.inspect}"
|
28
|
+
1
|
29
|
+
end
|
30
|
+
rescue StandardError => e
|
31
|
+
logger.error "Exception: #{e.inspect}. Backtrace: #{e.backtrace.inspect}"
|
32
|
+
1
|
33
|
+
rescue SystemExit => e
|
34
|
+
logger.error "System exit: #{e.inspect}. Backtrace: #{e.backtrace.inspect}"
|
35
|
+
e.status
|
36
|
+
end
|
37
|
+
|
20
38
|
end
|
21
39
|
|
22
40
|
self.logger = ::BBK::Utils::Logger.default
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbk-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.1.
|
4
|
+
version: 1.0.1.89770
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samoilenko Yuri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|