cryptum 0.0.300 → 0.0.302
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 +1 -10
- data/lib/cryptum/ui/order_plan.rb +6 -2
- data/lib/cryptum/ui/portfolio.rb +5 -1
- 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: d94e7dec4dd43fc5e867d337bdbb0d026fcea3fedeabf6caf3b13b933d4970af
|
4
|
+
data.tar.gz: bf56ad4e8b6f7174c24edf007b18a441da67cc9582bedc830e55fe4fd8ea3f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a8ceee4b2b70baa2214dece9afeaaf239f81e4f982bb93fa32cba7096d944a868ecd1833ea5f18693c34d4b327320e2a2a9519bb1929ae73d87bb20e7848631
|
7
|
+
data.tar.gz: fccd07d4fb586c20a893fcedf923fb12862895934db9fb9f1b3ad7c4dbad8020e43a5927541947a78df0846849703209b739308a0859fc814c58b3829a4def4c
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
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:40:45 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
|
@@ -20,15 +20,6 @@ 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
|
-
|
32
23
|
# Offense count: 2
|
33
24
|
# This cop supports safe autocorrection (--autocorrect).
|
34
25
|
Style/RedundantAssignment:
|
@@ -75,9 +75,13 @@ 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
|
+
# )
|
78
82
|
crypto_invested_percent = format(
|
79
83
|
'%0.2f',
|
80
|
-
|
84
|
+
current_crypto_fiat_value.to_f.fdiv(total_holdings.to_f) * 100
|
81
85
|
)
|
82
86
|
|
83
87
|
event_history.red_pill = true if crypto_invested_percent.to_f > autotrade_percent
|
@@ -413,7 +417,7 @@ module Cryptum
|
|
413
417
|
# (Only Applicable if order_book[:order_plan] < max_rows_to_display)
|
414
418
|
out_line_no += 1
|
415
419
|
rows_to_blank = (out_line_no + remaining_blank_rows) - 1
|
416
|
-
(out_line_no..
|
420
|
+
(out_line_no..rows_to_blank).each do |clr_line|
|
417
421
|
out_line_no = clr_line
|
418
422
|
order_plan_win.setpos(clr_line, Cryptum::UI.col_first)
|
419
423
|
Cryptum::UI.colorize(
|
data/lib/cryptum/ui/portfolio.rb
CHANGED
@@ -95,9 +95,13 @@ 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
|
+
# )
|
98
102
|
crypto_invested_percent = format(
|
99
103
|
'%0.2f',
|
100
|
-
|
104
|
+
current_crypto_fiat_value.to_f.fdiv(total_holdings.to_f) * 100
|
101
105
|
)
|
102
106
|
# TODO: Everything Above this Line Needs to be Indicators ^
|
103
107
|
|
data/lib/cryptum/version.rb
CHANGED