cryptum 0.0.302 → 0.0.304
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +11 -2
- data/lib/cryptum/ui/order_execution.rb +2 -1
- data/lib/cryptum/ui/order_plan.rb +3 -6
- data/lib/cryptum/ui/portfolio.rb +1 -5
- data/lib/cryptum/version.rb +1 -1
- data/lib/cryptum.rb +2 -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: b37f8bc5a291c5835e20e3aed98f9a335eec5205ccd33a300936d453c4551a82
|
4
|
+
data.tar.gz: fbf92d12bf47308bbc4f3dd4ace134c6758a24e686777d7aa2c5ca86fe06e934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 794d011d2d13d98cf16a80a403d331b5a812a24e5a3a4dad3beb23dffe2cb4c5da5b4b37ab93b1d08c2106c1b59c6858a0efec54ab55ca384e6cb7f5a051b960
|
7
|
+
data.tar.gz: 66c6ddc051add4700c0917740aefe95a699ea8c1d1da72106410b7c1a65adce46497ffcc981ce9b018830b2a9e6d1bfc4ed23d915165a9d8779f01a152d82a13
|
data/.rubocop_todo.yml
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2022-12-08 23:
|
3
|
+
# on 2022-12-08 23:59:51 UTC using RuboCop version 1.40.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 88
|
10
10
|
Lint/UselessAssignment:
|
11
11
|
Enabled: false
|
12
12
|
|
@@ -20,6 +20,15 @@ Style/ConditionalAssignment:
|
|
20
20
|
- 'lib/cryptum/option.rb'
|
21
21
|
- 'lib/cryptum/ui/order_execute_details.rb'
|
22
22
|
|
23
|
+
# Offense count: 2
|
24
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
25
|
+
# Configuration parameters: EnforcedStyle.
|
26
|
+
# SupportedStyles: left_coerce, right_coerce, single_coerce, fdiv
|
27
|
+
Style/FloatDivision:
|
28
|
+
Exclude:
|
29
|
+
- 'lib/cryptum/ui/order_plan.rb'
|
30
|
+
- 'lib/cryptum/ui/portfolio.rb'
|
31
|
+
|
23
32
|
# Offense count: 2
|
24
33
|
# This cop supports safe autocorrection (--autocorrect).
|
25
34
|
Style/RedundantAssignment:
|
@@ -413,11 +413,12 @@ module Cryptum
|
|
413
413
|
)
|
414
414
|
|
415
415
|
# ROWS 3-10
|
416
|
+
remaining_blank_rows = 0
|
417
|
+
remaining_blank_rows = max_rows_to_display if order_history_meta.empty?
|
416
418
|
max_rows_to_display = event_history.order_execute_max_rows_to_display
|
417
419
|
max_records_available_to_display = event_history.order_execute_max_records_available_to_display
|
418
420
|
first_row = event_history.order_execute_index_offset
|
419
421
|
last_row = first_row + max_rows_to_display
|
420
|
-
remaining_blank_rows = 0
|
421
422
|
if last_row >= order_history_meta.length
|
422
423
|
last_row = order_history_meta.length - 1
|
423
424
|
event_history.order_execute_max_records_available_to_display = last_row if last_row < max_rows_to_display
|
@@ -75,13 +75,9 @@ module Cryptum
|
|
75
75
|
balance.to_f * ticker_price
|
76
76
|
)
|
77
77
|
|
78
|
-
# crypto_invested_percent = format(
|
79
|
-
# '%0.2f',
|
80
|
-
# (current_crypto_fiat_value.to_f / total_holdings.to_f) * 100
|
81
|
-
# )
|
82
78
|
crypto_invested_percent = format(
|
83
79
|
'%0.2f',
|
84
|
-
current_crypto_fiat_value.to_f
|
80
|
+
(current_crypto_fiat_value.to_f / total_holdings.to_f) * 100
|
85
81
|
)
|
86
82
|
|
87
83
|
event_history.red_pill = true if crypto_invested_percent.to_f > autotrade_percent
|
@@ -259,6 +255,8 @@ module Cryptum
|
|
259
255
|
)
|
260
256
|
|
261
257
|
# ROWS 3-10
|
258
|
+
remaining_blank_rows = 0
|
259
|
+
# remaining_blank_rows = max_rows_to_display if order_plan.empty?
|
262
260
|
if event_history.red_pill
|
263
261
|
out_line_no += 1
|
264
262
|
order_plan_win.setpos(out_line_no, Cryptum::UI.col_first)
|
@@ -340,7 +338,6 @@ module Cryptum
|
|
340
338
|
max_records_available_to_display = event_history.order_plan_max_records_available_to_display
|
341
339
|
first_row = event_history.order_plan_index_offset
|
342
340
|
last_row = first_row + max_rows_to_display
|
343
|
-
remaining_blank_rows = 0
|
344
341
|
if last_row >= order_plan.length
|
345
342
|
last_row = order_plan.length - 1
|
346
343
|
event_history.order_plan_max_records_available_to_display = last_row if last_row < max_rows_to_display
|
data/lib/cryptum/ui/portfolio.rb
CHANGED
@@ -95,13 +95,9 @@ module Cryptum
|
|
95
95
|
(1 - (fiat_budget / total_holdings.to_f)) * 100
|
96
96
|
)
|
97
97
|
|
98
|
-
# crypto_invested_percent = format(
|
99
|
-
# '%0.2f',
|
100
|
-
# (current_crypto_fiat_value.to_f / total_holdings.to_f) * 100
|
101
|
-
# )
|
102
98
|
crypto_invested_percent = format(
|
103
99
|
'%0.2f',
|
104
|
-
current_crypto_fiat_value.to_f
|
100
|
+
(current_crypto_fiat_value.to_f / total_holdings.to_f) * 100
|
105
101
|
)
|
106
102
|
# TODO: Everything Above this Line Needs to be Indicators ^
|
107
103
|
|
data/lib/cryptum/version.rb
CHANGED
data/lib/cryptum.rb
CHANGED
@@ -137,6 +137,8 @@ module Cryptum
|
|
137
137
|
beautify_whole = whole_num.reverse.scan(/.{1,3}/).join(',').reverse
|
138
138
|
beautify_num = "#{beautify_whole}.#{fraction}" unless is_negative
|
139
139
|
beautify_num = "-#{beautify_whole}.#{fraction}" if is_negative
|
140
|
+
|
141
|
+
beautify_num
|
140
142
|
rescue Interrupt
|
141
143
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
142
144
|
Cryptum.exit_gracefully(which_self: self)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.304
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|