cryptum 0.0.421 → 0.0.423
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cryptum-repl +5 -0
- data/lib/cryptum/log.rb +1 -1
- data/lib/cryptum/ui/exit.rb +3 -8
- data/lib/cryptum/ui.rb +3 -8
- data/lib/cryptum/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: 0db6879e922302bbbbcd4c283552f6057c1ff1651cfef64bb3908c60f378bdea
|
4
|
+
data.tar.gz: 6c1fa446d9facf407b3729aeb4bbc449b92bf44799c5865804811ddfc5ce7dd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 775f105582775eeac624f886fb98884b20a1006ea5d5882ccda2da023ecae159db27f4ad0dfc6c7b13e55b16fd03b701eb2197885c1af4a6cd4d3a18be2d56ad
|
7
|
+
data.tar.gz: 02b257841617c72ab0fde2be5b70d7d2b70d33317d3c8aa325e1d7464788a6a52aa0d98ff1177fc12c018651139095b9729fc0cf8e50a0a4582ea35119b17717
|
data/bin/cryptum-repl
CHANGED
@@ -67,7 +67,12 @@ begin
|
|
67
67
|
"#{title}[#{version}]:#{line_count} #{splat} ".to_s.scrub
|
68
68
|
end
|
69
69
|
]
|
70
|
+
msg = 'Session Started.'
|
71
|
+
Cryptum::Log.append(level: :info, msg: msg, which_self: self)
|
70
72
|
cli.start(self, prompt: Pry::Prompt.new(:cryptum, 'CRYPTUM_PROTOTYPING_DRIVER', prompt))
|
71
73
|
rescue StandardError => e
|
72
74
|
raise e
|
75
|
+
ensure
|
76
|
+
msg = 'Session Terminated.'
|
77
|
+
Cryptum::Log.append(level: :info, msg: msg, which_self: self)
|
73
78
|
end
|
data/lib/cryptum/log.rb
CHANGED
data/lib/cryptum/ui/exit.rb
CHANGED
@@ -14,18 +14,13 @@ module Cryptum
|
|
14
14
|
event_history = opts[:event_history]
|
15
15
|
|
16
16
|
Curses.close_screen
|
17
|
-
msg = ''
|
18
|
-
|
19
|
-
msg = "session: #{event_history.order_book[:path].split('/').first}, "
|
20
|
-
msg += "symbol: #{event_history.order_book[:symbol]}"
|
21
|
-
end
|
22
|
-
msg += ' => Session Gracefully Terminated.'
|
23
|
-
Cryptum::Log.append(level: :info, msg: msg, which_self: self)
|
17
|
+
msg = 'Session Gracefully Terminated.'
|
18
|
+
Cryptum::Log.append(level: :info, msg: msg, which_self: self, event_history: event_history)
|
24
19
|
|
25
20
|
exit 0
|
26
21
|
rescue Interrupt, StandardError => e
|
27
22
|
# Produce a Stacktrace for anything else
|
28
|
-
Cryptum::Log.append(level: :fatal, msg: e, which_self: self)
|
23
|
+
Cryptum::Log.append(level: :fatal, msg: e, which_self: self, event_history: event_history)
|
29
24
|
exit 1
|
30
25
|
ensure
|
31
26
|
if event_history
|
data/lib/cryptum/ui.rb
CHANGED
@@ -18,13 +18,8 @@ module Cryptum
|
|
18
18
|
# Initialize the UI
|
19
19
|
public_class_method def self.init(opts = {})
|
20
20
|
event_history = opts[:event_history]
|
21
|
-
msg = ''
|
22
|
-
|
23
|
-
msg = "session: #{event_history.order_book[:path].split('/').first}, "
|
24
|
-
msg += "symbol: #{event_history.order_book[:symbol]}"
|
25
|
-
end
|
26
|
-
msg += ' => Session Started.'
|
27
|
-
Cryptum::Log.append(level: :info, msg: msg, which_self: self)
|
21
|
+
msg = 'Session Started.'
|
22
|
+
Cryptum::Log.append(level: :info, msg: msg, which_self: self, event_history: event_history)
|
28
23
|
|
29
24
|
# Initialize curses Screen
|
30
25
|
Curses.init_screen
|
@@ -57,7 +52,7 @@ module Cryptum
|
|
57
52
|
Cryptum::UI::TerminalWindow.new
|
58
53
|
rescue Interrupt, StandardError => e
|
59
54
|
# Produce a Stacktrace for anything else
|
60
|
-
Cryptum::Log.append(level: :error, msg: e, which_self: self)
|
55
|
+
Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history)
|
61
56
|
end
|
62
57
|
|
63
58
|
# Create New Curses Window
|
data/lib/cryptum/version.rb
CHANGED