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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19780e8beaf1a98b42306c53b66ad2d758a3c207690ef2710934560b61420bfb
4
- data.tar.gz: 391eb1cbe6dabe3c2629a202d7293622b2333eeb3c983d94cace4096e7b8a9c6
3
+ metadata.gz: 0db6879e922302bbbbcd4c283552f6057c1ff1651cfef64bb3908c60f378bdea
4
+ data.tar.gz: 6c1fa446d9facf407b3729aeb4bbc449b92bf44799c5865804811ddfc5ce7dd7
5
5
  SHA512:
6
- metadata.gz: acab4435d8d733b725defa06d6c31d137053903452fbf6888dec153156190435d5afc45cac759f6710436ea67b2b1cbb2766c86eba704bba01998fe8483ac7d7
7
- data.tar.gz: e1b902aac8566c84bafe2f75d4ac9693b9d05060c7c0fb29989485a8158767382db04fe14fcfa3765bf9044a4fd894cafd3d7098f0a5921e295e82c3bbd7007b
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
@@ -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.423'
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.423
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.