cryptum 0.0.382 → 0.0.383

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +5 -8
  3. data/lib/cryptum/api/exchange_rates.rb +0 -2
  4. data/lib/cryptum/api/orders.rb +0 -6
  5. data/lib/cryptum/api/portfolio.rb +0 -2
  6. data/lib/cryptum/api/rest.rb +3 -4
  7. data/lib/cryptum/api/signature.rb +0 -4
  8. data/lib/cryptum/api.rb +0 -6
  9. data/lib/cryptum/bot_conf.rb +0 -3
  10. data/lib/cryptum/event/parse.rb +5 -5
  11. data/lib/cryptum/event.rb +0 -2
  12. data/lib/cryptum/log.rb +18 -4
  13. data/lib/cryptum/open_ai.rb +129 -32
  14. data/lib/cryptum/option/environment.rb +0 -2
  15. data/lib/cryptum/option/parser.rb +0 -2
  16. data/lib/cryptum/order_book/generate.rb +0 -4
  17. data/lib/cryptum/order_book.rb +0 -3
  18. data/lib/cryptum/portfolio.rb +0 -2
  19. data/lib/cryptum/ui/command.rb +0 -2
  20. data/lib/cryptum/ui/market_trend.rb +0 -2
  21. data/lib/cryptum/ui/matrix.rb +0 -2
  22. data/lib/cryptum/ui/order/execute.rb +629 -0
  23. data/lib/cryptum/ui/order/execute_details.rb +300 -0
  24. data/lib/cryptum/ui/order/plan.rb +518 -0
  25. data/lib/cryptum/ui/order/plan_details.rb +243 -0
  26. data/lib/cryptum/ui/order/timer.rb +140 -0
  27. data/lib/cryptum/ui/order.rb +21 -0
  28. data/lib/cryptum/ui/portfolio.rb +0 -2
  29. data/lib/cryptum/ui/signal_engine.rb +0 -2
  30. data/lib/cryptum/ui/terminal_window.rb +0 -2
  31. data/lib/cryptum/ui/ticker.rb +0 -2
  32. data/lib/cryptum/ui.rb +1 -8
  33. data/lib/cryptum/version.rb +1 -1
  34. data/lib/cryptum/web_sock/coinbase.rb +0 -5
  35. data/lib/cryptum/web_sock/event_machine.rb +2 -6
  36. data/lib/cryptum.rb +16 -2
  37. data/spec/lib/cryptum/ui/{order_execute_details_spec.rb → order/execute_details_spec.rb} +2 -2
  38. data/spec/lib/cryptum/ui/{order_execution_spec.rb → order/execute_spec.rb} +2 -2
  39. data/spec/lib/cryptum/ui/order/plan_details_spec.rb +10 -0
  40. data/spec/lib/cryptum/ui/{order_timer_spec.rb → order/plan_spec.rb} +2 -2
  41. data/spec/lib/cryptum/ui/{order_plan_details_spec.rb → order/timer_spec.rb} +2 -2
  42. data/spec/lib/cryptum/ui/{order_plan_spec.rb → order_spec.rb} +2 -2
  43. metadata +13 -11
  44. data/lib/cryptum/ui/order_execute_details.rb +0 -300
  45. data/lib/cryptum/ui/order_execution.rb +0 -629
  46. data/lib/cryptum/ui/order_plan.rb +0 -518
  47. data/lib/cryptum/ui/order_plan_details.rb +0 -243
  48. data/lib/cryptum/ui/order_timer.rb +0 -140
@@ -0,0 +1,243 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cryptum
4
+ module UI
5
+ # This plugin is used to Display Order Plan Details
6
+ # selected from the Order Plan Window Pane.
7
+ module Order
8
+ module PlanDetails
9
+ # Supported Method Parameters::
10
+ # Cryptum::UI::Order::PlanDetails.refresh(
11
+ # )
12
+
13
+ public_class_method def self.refresh(opts = {})
14
+ event_history = opts[:event_history]
15
+ order_plan_details_win = opts[:order_plan_details_win]
16
+
17
+ order = event_history.order_plan_selected_data
18
+ tpm = order[:tpm]
19
+ autotrade_percent = order[:autotrade_percent]
20
+ order_color = order[:color]
21
+
22
+ fiat_avail_out = Cryptum.beautify_large_number(
23
+ value: order[:fiat_available]
24
+ )
25
+ risk_alloc_out = Cryptum.beautify_large_number(
26
+ value: order[:risk_alloc]
27
+ )
28
+ slice_alloc_out = Cryptum.beautify_large_number(
29
+ value: order[:slice_alloc]
30
+ )
31
+ previous_slice_invest_out = Cryptum.beautify_large_number(
32
+ value: order[:previous_slice_invest]
33
+ )
34
+ invest_out = Cryptum.beautify_large_number(
35
+ value: order[:invest]
36
+ )
37
+ profit_out = Cryptum.beautify_large_number(
38
+ value: order[:profit]
39
+ )
40
+ tpm_out = format('%0.2f', tpm)
41
+ return_out = Cryptum.beautify_large_number(
42
+ value: order[:return]
43
+ )
44
+ autotrade_ln1_details = "1. Autotrade is set to #{autotrade_percent}% of $#{fiat_avail_out}, making $#{risk_alloc_out} available for this slice in"
45
+ autotrade_ln2_details = ' the order plan.'
46
+ if order[:last_slice]
47
+ slice_alloc_ln1_details = "2. Since $#{risk_alloc_out} is the remaining amount within the criteria defined in the Autotrade % above,"
48
+ slice_alloc_ln2_details = " $#{invest_out} will be allocated for this slice."
49
+ else
50
+ slice_alloc_ln1_details = "2. With $#{risk_alloc_out} available and a slice allocation of #{order[:allocation_percent]}%, $#{slice_alloc_out} plus the previous"
51
+ slice_alloc_ln2_details = " slice of $#{previous_slice_invest_out} results in $#{invest_out} being allocated for this slice."
52
+ end
53
+ profit_ln1_details = "3. With a slice allocation of $#{invest_out}, plus a TPM equal to #{tpm_out}%, $#{return_out} will be returned"
54
+ profit_ln2_details = " once sold. With $#{invest_out} invested, the gross profit equals $#{profit_out}, minus any Maker &"
55
+ profit_ln3_details = ' Taker (transaction) fees.'
56
+
57
+ # UI
58
+ col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
59
+
60
+ # ROW 1
61
+ out_line_no = 0
62
+ line_color = order_color
63
+ header_color = order_color
64
+ header_style = :bold
65
+ style = :bold
66
+ header_style = :reverse if event_history.order_plan_details_win_active
67
+
68
+ Cryptum::UI.line(
69
+ ui_win: order_plan_details_win,
70
+ out_line_no: out_line_no,
71
+ color: line_color
72
+ )
73
+
74
+ # ROW 2
75
+ out_line_no += 1
76
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
77
+ order_plan_details_win.clrtoeol
78
+ Cryptum::UI.colorize(
79
+ ui_win: order_plan_details_win,
80
+ color: header_color,
81
+ style: header_style,
82
+ string: ''.ljust(col_just1, ' ')
83
+ )
84
+
85
+ header_str = "- ORDER SLICE ##{order[:plan_no]} DETAILS -"
86
+ order_plan_details_win.setpos(
87
+ out_line_no,
88
+ Cryptum::UI.col_center(str: header_str)
89
+ )
90
+
91
+ Cryptum::UI.colorize(
92
+ ui_win: order_plan_details_win,
93
+ color: order_color,
94
+ style: header_style,
95
+ string: header_str
96
+ )
97
+
98
+ # ROW 3
99
+ out_line_no += 1
100
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
101
+ order_plan_details_win.clrtoeol
102
+
103
+ Cryptum::UI.colorize(
104
+ ui_win: order_plan_details_win,
105
+ color: order_color,
106
+ style: style,
107
+ string: autotrade_ln1_details.ljust(col_just1, ' ')
108
+ )
109
+
110
+ # ROW 4
111
+ out_line_no += 1
112
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
113
+ order_plan_details_win.clrtoeol
114
+
115
+ Cryptum::UI.colorize(
116
+ ui_win: order_plan_details_win,
117
+ color: order_color,
118
+ style: style,
119
+ string: autotrade_ln2_details.ljust(col_just1, ' ')
120
+ )
121
+
122
+ # ROW 5
123
+ out_line_no += 1
124
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
125
+ order_plan_details_win.clrtoeol
126
+
127
+ Cryptum::UI.colorize(
128
+ ui_win: order_plan_details_win,
129
+ color: order_color,
130
+ style: style,
131
+ string: slice_alloc_ln1_details.ljust(col_just1, ' ')
132
+ )
133
+
134
+ # ROW 6
135
+ out_line_no += 1
136
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
137
+ order_plan_details_win.clrtoeol
138
+
139
+ Cryptum::UI.colorize(
140
+ ui_win: order_plan_details_win,
141
+ color: order_color,
142
+ style: style,
143
+ string: slice_alloc_ln2_details.ljust(col_just1, ' ')
144
+ )
145
+
146
+ # ROW 7
147
+ out_line_no += 1
148
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
149
+ order_plan_details_win.clrtoeol
150
+
151
+ Cryptum::UI.colorize(
152
+ ui_win: order_plan_details_win,
153
+ color: order_color,
154
+ style: style,
155
+ string: profit_ln1_details.ljust(col_just1, ' ')
156
+ )
157
+
158
+ # ROW 8
159
+ out_line_no += 1
160
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
161
+ order_plan_details_win.clrtoeol
162
+
163
+ Cryptum::UI.colorize(
164
+ ui_win: order_plan_details_win,
165
+ color: order_color,
166
+ style: style,
167
+ string: profit_ln2_details.ljust(col_just1, ' ')
168
+ )
169
+
170
+ # ROW 9
171
+ out_line_no += 1
172
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
173
+ order_plan_details_win.clrtoeol
174
+
175
+ Cryptum::UI.colorize(
176
+ ui_win: order_plan_details_win,
177
+ color: order_color,
178
+ style: style,
179
+ string: profit_ln3_details.ljust(col_just1, ' ')
180
+ )
181
+
182
+ # Clear to OK ROW
183
+ ok_row = 9
184
+ out_line_no += 1
185
+ to_ok_row = ok_row - 1
186
+ (out_line_no..to_ok_row).each do |clr_line|
187
+ order_plan_details_win.setpos(clr_line, Cryptum::UI.col_first)
188
+ Cryptum::UI.colorize(
189
+ ui_win: order_plan_details_win,
190
+ color: order_color,
191
+ style: :normal,
192
+ string: ''.ljust(col_just1, ' ')
193
+ )
194
+ end
195
+
196
+ # OK ROW
197
+ out_line_no = ok_row
198
+ order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
199
+ order_plan_details_win.clrtoeol
200
+ Cryptum::UI.colorize(
201
+ ui_win: order_plan_details_win,
202
+ color: order_color,
203
+ string: ''.ljust(col_just1, ' ')
204
+ )
205
+
206
+ header_str = '- OK -'
207
+ order_plan_details_win.setpos(
208
+ out_line_no,
209
+ Cryptum::UI.col_center(str: header_str)
210
+ )
211
+
212
+ Cryptum::UI.colorize(
213
+ ui_win: order_plan_details_win,
214
+ color: order_color,
215
+ style: :reverse,
216
+ string: header_str
217
+ )
218
+
219
+ order_plan_details_win.refresh
220
+
221
+ event_history
222
+ rescue Interrupt
223
+ # Exit Gracefully if CTRL+C is Pressed During Session
224
+ Cryptum::UI::Exit.gracefully(
225
+ which_self: self,
226
+ event_history: event_history
227
+ )
228
+ rescue StandardError => e
229
+ raise e
230
+ end
231
+
232
+ # Display Usage for this Module
233
+
234
+ public_class_method def self.help
235
+ puts "USAGE:
236
+ #{self}.refresh(
237
+ )
238
+ "
239
+ end
240
+ end
241
+ end
242
+ end
243
+ end
@@ -0,0 +1,140 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cryptum
4
+ module UI
5
+ # This plugin is used to Refresh the Cryptum Status Section UI
6
+ module Order
7
+ module Timer
8
+ # Supported Method Parameters::
9
+ # Cryptum::UI::Timer.refresh(
10
+ # )
11
+
12
+ public_class_method def self.refresh(opts = {})
13
+ option_choice = opts[:option_choice]
14
+ event_history = opts[:event_history]
15
+ order_timer_win = opts[:order_timer_win]
16
+ indicator_status = opts[:indicator_status]
17
+
18
+ last_trend_reset_time = event_history.order_book[:last_trend_reset]
19
+ last_order_exec_time = event_history.order_book[:last_order_exec]
20
+
21
+ # Market Trend Reset Timer
22
+ time_between_trend_reset = option_choice.market_trend_reset
23
+ trend_timer_begin = Time.parse(last_trend_reset_time)
24
+ trend_timer_end = trend_timer_begin + time_between_trend_reset
25
+ trend_time_remaining = trend_timer_end - Time.now
26
+
27
+ if trend_time_remaining.zero? || trend_time_remaining.negative?
28
+ event_history.order_book[:market_trend][:buy] = 0
29
+ event_history.order_book[:market_trend][:sell] = 0
30
+ event_history.order_book[:last_trend_reset] = Time.now.strftime(
31
+ '%Y-%m-%d %H:%M:%S.%N%z'
32
+ )
33
+
34
+ last_trend_reset_time = event_history.order_book[:last_trend_reset]
35
+ time_between_trend_reset = option_choice.market_trend_reset
36
+ trend_timer_begin = Time.parse(last_trend_reset_time)
37
+ trend_timer_end = trend_timer_begin + time_between_trend_reset
38
+ trend_time_remaining = trend_timer_end - Time.now
39
+ end
40
+
41
+ trend_countdown = Cryptum.beautify_large_number(
42
+ value: format('%0.2f', trend_time_remaining)
43
+ )
44
+
45
+ # Market Trend Reset Timer
46
+ time_between_order_exec = event_history.time_between_orders
47
+ time_between_order_exec_out = Cryptum.beautify_large_number(
48
+ value: format('%0.2f', time_between_order_exec)
49
+ )
50
+ order_begin_time = Time.parse(last_order_exec_time)
51
+ order_end_time = order_begin_time + time_between_order_exec
52
+ order_exec_time_remaining = order_end_time - Time.now
53
+ order_countdown = Cryptum.beautify_large_number(
54
+ value: format('%0.2f', order_exec_time_remaining)
55
+ )
56
+
57
+ buy_total = event_history.order_book[:market_trend][:buy].to_i
58
+ sell_total = event_history.order_book[:market_trend][:sell].to_i
59
+
60
+ color = :white
61
+ color = indicator_status.market_trend[:color] if indicator_status.market_trend
62
+ case color
63
+ when :green
64
+ # TODO: add condition to check if open sell orders exist.
65
+ # If so intent should be something like, "- SEE ORDER HISTORY -"
66
+ # Otherwise, intent should be something like, "- WAIT FOR MARKET TREND SHIFT -"
67
+ intent = "- #{Cryptum.down_arrow} SEE ORDER HISTORY #{Cryptum.down_arrow} -"
68
+ else
69
+ speed = 'FAST'
70
+ speed = 'SLOW' if buy_total >= sell_total
71
+
72
+ intent = "- #{speed} BUY: #{order_countdown} of #{time_between_order_exec_out} -"
73
+ intent = '- BUYING PAUSED -' if event_history.red_pill
74
+ end
75
+
76
+ # Have a Clock
77
+ clock = Time.now.strftime('%Y-%m-%d %H:%M:%S%z')
78
+
79
+ # UI
80
+ col_just4 = (Curses.cols - Cryptum::UI.col_fourth) - 1
81
+
82
+ # ROW 1
83
+ # COLUMN 1
84
+ out_line_no = 0
85
+ order_timer_win.setpos(out_line_no, Cryptum::UI.col_first)
86
+ order_timer_win.clrtoeol
87
+ Cryptum::UI.colorize(
88
+ ui_win: order_timer_win,
89
+ color: :white,
90
+ style: :bold,
91
+ string: "#{option_choice.market_trend_reset_label} M. Trend Rst: #{trend_countdown}"
92
+ )
93
+
94
+ # COLUMN 2
95
+ order_timer_win.setpos(
96
+ out_line_no,
97
+ Cryptum::UI.col_center(str: intent)
98
+ )
99
+ Cryptum::UI.colorize(
100
+ ui_win: order_timer_win,
101
+ color: :white,
102
+ style: :bold,
103
+ string: intent
104
+ )
105
+
106
+ # COLUMN 3
107
+ order_timer_win.setpos(out_line_no, Cryptum::UI.col_fourth)
108
+ Cryptum::UI.colorize(
109
+ ui_win: order_timer_win,
110
+ color: :white,
111
+ style: :bold,
112
+ string: clock.rjust(col_just4)
113
+ )
114
+
115
+ order_timer_win.refresh
116
+
117
+ order_countdown.to_f
118
+ rescue Interrupt
119
+ # Exit Gracefully if CTRL+C is Pressed During Session
120
+ Cryptum::UI::Exit.gracefully(
121
+ which_self: self,
122
+ event_history: event_history,
123
+ option_choice: option_choice
124
+ )
125
+ rescue StandardError => e
126
+ raise e
127
+ end
128
+
129
+ # Display Usage for this Module
130
+
131
+ public_class_method def self.help
132
+ puts "USAGE:
133
+ #{self}.refresh(
134
+ )
135
+ "
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
6
+ module UI
7
+ module Order
8
+ require 'cryptum/ui/order/execute'
9
+ require 'cryptum/ui/order/execute_details'
10
+ require 'cryptum/ui/order/plan'
11
+ require 'cryptum/ui/order/plan_details'
12
+ require 'cryptum/ui/order/timer'
13
+
14
+ # Display a List of Every UI Module
15
+
16
+ public_class_method def self.help
17
+ constants.sort
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'logger'
4
-
5
3
  module Cryptum
6
4
  # This plugin is used to Refresh the Cryptum console UI
7
5
  module UI
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'logger'
4
-
5
3
  module Cryptum
6
4
  # This plugin is used to Refresh the Cryptum console UI
7
5
  module UI
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'logger'
4
-
5
3
  module Cryptum
6
4
  module UI
7
5
  # This Class is Used by Cryptum::Event to
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'logger'
4
-
5
3
  module Cryptum
6
4
  # This plugin is used to Refresh the Cryptum console UI
7
5
  module UI
data/lib/cryptum/ui.rb CHANGED
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'curses'
4
- require 'time'
5
-
6
3
  module Cryptum
7
4
  # Cryptum::UI Module used for Presenting the
8
5
  # Cryptum Curses Interface
@@ -12,11 +9,7 @@ module Cryptum
12
9
  require 'cryptum/ui/key_press_event'
13
10
  require 'cryptum/ui/market_trend'
14
11
  require 'cryptum/ui/matrix'
15
- require 'cryptum/ui/order_execution'
16
- require 'cryptum/ui/order_execute_details'
17
- require 'cryptum/ui/order_plan'
18
- require 'cryptum/ui/order_plan_details'
19
- require 'cryptum/ui/order_timer'
12
+ require 'cryptum/ui/order'
20
13
  require 'cryptum/ui/portfolio'
21
14
  require 'cryptum/ui/signal_engine'
22
15
  require 'cryptum/ui/terminal_window'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.382'
4
+ VERSION = '0.0.383'
5
5
  end
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'faye/websocket'
4
- require 'websocket/extensions'
5
- require 'permessage_deflate'
6
-
7
3
  module Cryptum
8
4
  # This plugin is used to Establish a Web
9
5
  # Socket Connection with Coinbase
@@ -96,7 +92,6 @@ module Cryptum
96
92
 
97
93
  public_class_method def self.help
98
94
  puts "USAGE:
99
- logger = #{self}.create()
100
95
  "
101
96
  end
102
97
  end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eventmachine'
4
- require 'json'
5
-
6
3
  module Cryptum
7
4
  # This plugin is used to Establish a Web
8
5
  # Socket Connection with Coinbase
@@ -196,7 +193,7 @@ module Cryptum
196
193
  end
197
194
 
198
195
  EM.add_periodic_timer(delay_ms_cast_as_decimal) do
199
- order_countdown = Cryptum::UI::OrderTimer.refresh(
196
+ order_countdown = Cryptum::UI::Order::Timer.refresh(
200
197
  option_choice: option_choice,
201
198
  event_history: event_history,
202
199
  order_timer_win: terminal_win.order_timer_section,
@@ -230,7 +227,7 @@ module Cryptum
230
227
  terminal_win.key_press_event.key_r = true
231
228
  # IMPORTANT:
232
229
  # Wait for Order Plan recalculation to occur
233
- # once Cryptum::UI::OrderPlan is refreshed
230
+ # once Cryptum::UI::Order::Plan is refreshed
234
231
  # in Cryptum::Event _BEFORE_ writing the order
235
232
  # book to file.
236
233
  end
@@ -268,7 +265,6 @@ module Cryptum
268
265
  # Display Usage for this Module
269
266
  public_class_method def self.help
270
267
  puts "USAGE:
271
- logger = #{self}.create()
272
268
  "
273
269
  end
274
270
  end
data/lib/cryptum.rb CHANGED
@@ -1,9 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # All the 3rd party gems used in this application
4
+ require 'addressable'
5
+ require 'base64'
6
+ require 'curses'
7
+ require 'eventmachine'
8
+ require 'faye/websocket'
9
+ require 'fileutils'
10
+ require 'json'
11
+ require 'logger'
12
+ require 'openssl'
13
+ require 'optparse'
14
+ require 'permessage_deflate'
3
15
  require 'rbtrace'
16
+ require 'rest-client'
17
+ require 'time'
4
18
  require 'yaml'
5
- require 'json'
6
- require 'fileutils'
19
+ require 'websocket/extensions'
20
+
7
21
  # Root-Level Namespace for cryptum
8
22
  module Cryptum
9
23
  $stdout.sync = true
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Cryptum::UI::OrderExecuteDetails do
5
+ describe Cryptum::UI::Order::ExecuteDetails do
6
6
  it 'should display information for existing help method' do
7
- help_response = Cryptum::UI::OrderExecuteDetails
7
+ help_response = Cryptum::UI::Order::ExecuteDetails
8
8
  expect(help_response).to respond_to :help
9
9
  end
10
10
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Cryptum::UI::OrderExecution do
5
+ describe Cryptum::UI::Order::Execute do
6
6
  it 'should display information for existing help method' do
7
- help_response = Cryptum::UI::OrderExecution
7
+ help_response = Cryptum::UI::Order::Execute
8
8
  expect(help_response).to respond_to :help
9
9
  end
10
10
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Cryptum::UI::Order::PlanDetails do
6
+ it 'should display information for existing help method' do
7
+ help_response = Cryptum::UI::Order::PlanDetails
8
+ expect(help_response).to respond_to :help
9
+ end
10
+ end
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Cryptum::UI::OrderTimer do
5
+ describe Cryptum::UI::Order::Plan do
6
6
  it 'should display information for existing help method' do
7
- help_response = Cryptum::UI::OrderTimer
7
+ help_response = Cryptum::UI::Order::Plan
8
8
  expect(help_response).to respond_to :help
9
9
  end
10
10
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Cryptum::UI::OrderPlanDetails do
5
+ describe Cryptum::UI::Order::Timer do
6
6
  it 'should display information for existing help method' do
7
- help_response = Cryptum::UI::OrderPlanDetails
7
+ help_response = Cryptum::UI::Order::Timer
8
8
  expect(help_response).to respond_to :help
9
9
  end
10
10
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Cryptum::UI::OrderPlan do
5
+ describe Cryptum::UI::Order do
6
6
  it 'should display information for existing help method' do
7
- help_response = Cryptum::UI::OrderPlan
7
+ help_response = Cryptum::UI::Order
8
8
  expect(help_response).to respond_to :help
9
9
  end
10
10
  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.382
4
+ version: 0.0.383
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -436,11 +436,12 @@ files:
436
436
  - lib/cryptum/ui/key_press_event.rb
437
437
  - lib/cryptum/ui/market_trend.rb
438
438
  - lib/cryptum/ui/matrix.rb
439
- - lib/cryptum/ui/order_execute_details.rb
440
- - lib/cryptum/ui/order_execution.rb
441
- - lib/cryptum/ui/order_plan.rb
442
- - lib/cryptum/ui/order_plan_details.rb
443
- - lib/cryptum/ui/order_timer.rb
439
+ - lib/cryptum/ui/order.rb
440
+ - lib/cryptum/ui/order/execute.rb
441
+ - lib/cryptum/ui/order/execute_details.rb
442
+ - lib/cryptum/ui/order/plan.rb
443
+ - lib/cryptum/ui/order/plan_details.rb
444
+ - lib/cryptum/ui/order/timer.rb
444
445
  - lib/cryptum/ui/portfolio.rb
445
446
  - lib/cryptum/ui/signal_engine.rb
446
447
  - lib/cryptum/ui/terminal_window.rb
@@ -493,11 +494,12 @@ files:
493
494
  - spec/lib/cryptum/ui/key_press_event_spec.rb
494
495
  - spec/lib/cryptum/ui/market_trend_spec.rb
495
496
  - spec/lib/cryptum/ui/matrix_spec.rb
496
- - spec/lib/cryptum/ui/order_execute_details_spec.rb
497
- - spec/lib/cryptum/ui/order_execution_spec.rb
498
- - spec/lib/cryptum/ui/order_plan_details_spec.rb
499
- - spec/lib/cryptum/ui/order_plan_spec.rb
500
- - spec/lib/cryptum/ui/order_timer_spec.rb
497
+ - spec/lib/cryptum/ui/order/execute_details_spec.rb
498
+ - spec/lib/cryptum/ui/order/execute_spec.rb
499
+ - spec/lib/cryptum/ui/order/plan_details_spec.rb
500
+ - spec/lib/cryptum/ui/order/plan_spec.rb
501
+ - spec/lib/cryptum/ui/order/timer_spec.rb
502
+ - spec/lib/cryptum/ui/order_spec.rb
501
503
  - spec/lib/cryptum/ui/portfolio_spec.rb
502
504
  - spec/lib/cryptum/ui/signal_engine_spec.rb
503
505
  - spec/lib/cryptum/ui/terminal_window_spec.rb