cryptum 0.0.421 → 0.0.422

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19780e8beaf1a98b42306c53b66ad2d758a3c207690ef2710934560b61420bfb
4
- data.tar.gz: 391eb1cbe6dabe3c2629a202d7293622b2333eeb3c983d94cace4096e7b8a9c6
3
+ metadata.gz: 14fd2ad2d6ae038f9891d683d16dcf92d2e6dbb301c55179afacff9e58ce479b
4
+ data.tar.gz: e1b62de5a575a3f2660bdd9a71ac5ad778a93d355a69a89565705b17e0cb99ca
5
5
  SHA512:
6
- metadata.gz: acab4435d8d733b725defa06d6c31d137053903452fbf6888dec153156190435d5afc45cac759f6710436ea67b2b1cbb2766c86eba704bba01998fe8483ac7d7
7
- data.tar.gz: e1b902aac8566c84bafe2f75d4ac9693b9d05060c7c0fb29989485a8158767382db04fe14fcfa3765bf9044a4fd894cafd3d7098f0a5921e295e82c3bbd7007b
6
+ metadata.gz: 7e351293e5b10a80e2d645ce5b5c359570a15e55958de228eea5e3f650dee42ea863f184750edec60ff1ee360ec3e059ba3f44c341e7e0d475548e598c81f2ad
7
+ data.tar.gz: 5eeb4c4ebd30836f9d6e7304ae9650a0377f571d0a24090e65d84acfee39d487250d0a8c1ed1c6eec51ad432885051f8cb8b9c49074a1ac0b1fde033eeba96df
data/lib/cryptum/log.rb CHANGED
@@ -82,7 +82,7 @@ module Cryptum
82
82
  else
83
83
  log_event = "driver: #{driver_name}"
84
84
  if event_history.respond_to?('order_book')
85
- log_event = ", session: #{session}, "
85
+ log_event += ", session: #{session}, "
86
86
  log_event += "symbol: #{symbol}"
87
87
  end
88
88
 
@@ -14,18 +14,13 @@ module Cryptum
14
14
  event_history = opts[:event_history]
15
15
 
16
16
  Curses.close_screen
17
- msg = ''
18
- if event_history.respond_to?('order_book')
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
- if event_history.respond_to?('order_book')
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.421'
4
+ VERSION = '0.0.422'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.421
4
+ version: 0.0.422
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.