cryptum 0.0.429 → 0.0.430

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2380db0865bfa954a012a595702a708c13fe6bf18cfd0958d510239addf00186
4
- data.tar.gz: fc72a86ba6f45138bf5171e766581ccf3e0fc970eb3eeda90c456d9aaecc9306
3
+ metadata.gz: 2a529bc6041458959ded98c7d5a487f978a1ca4da216ef27006daa74b4882fdf
4
+ data.tar.gz: be3358d93281401821f0192b837717d343872a58c1b0eb759056ce8d00387a00
5
5
  SHA512:
6
- metadata.gz: c76b40bba10f43ff918eae4f8fce19368a92d2e20e3c4baf7b29da3a0165f4c8a8c05bb2ef45a34d088c0f1ae7ca28acc09c1538cd211a70c6c774d3db1ed5a1
7
- data.tar.gz: 4394275cfa271f7cace9ed98b905fedf42eabafba11a292a2eb23af927f184c095c08ce487fbf0aacc22fb029a3ada517468bebe08090390613347b744e027a3
6
+ metadata.gz: 7f1cad0e69a09e9754340649c6457e9bb7abbac52b6a6f2e15158ad7b6b8f1a2a667ad4afacdc9b460b30828bfa9a44a0cd4d1bdce40dd25446d39c71b1d95d8
7
+ data.tar.gz: 002ad29184c1b14f4dd6a6ea6bd04fd836a9d08d3db03d76e401353f4ade3acf9c05edae3045c61f104975fbc1fd536d9217ae90f3da486098699c338f1e26bf
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ Layout/LineLength:
6
6
  Lint/UselessRescue:
7
7
  Enabled: false
8
8
  Metrics/AbcSize:
9
- Max: 417.7
9
+ Max: 436.3
10
10
  Metrics/BlockLength:
11
11
  Max: 138
12
12
  Metrics/BlockNesting:
@@ -14,13 +14,13 @@ Metrics/BlockNesting:
14
14
  Metrics/ClassLength:
15
15
  Max: 128
16
16
  Metrics/CyclomaticComplexity:
17
- Max: 80
17
+ Max: 86
18
18
  Metrics/MethodLength:
19
- Max: 397
19
+ Max: 418
20
20
  Metrics/ModuleLength:
21
- Max: 407
21
+ Max: 428
22
22
  Metrics/PerceivedComplexity:
23
- Max: 80
23
+ Max: 84
24
24
  Style/HashSyntax:
25
25
  EnforcedShorthandSyntax: never
26
26
 
@@ -457,15 +457,34 @@ module Cryptum
457
457
  )
458
458
  plan_no = meta[:plan_no]
459
459
 
460
- buy_created_at_hash_arr = order_history.select do |oh|
461
- oh[:id] == meta[:buy_order_id]
462
- end
463
-
464
- buy_created_at = '____-__-__ __:__:__-____'
465
- unless buy_created_at_hash_arr.empty?
466
- buy_created_at = Time.parse(
467
- buy_created_at_hash_arr.first[:created_at]
468
- ).strftime('%Y-%m-%d %H:%M:%S%z')
460
+ order_exec_last_ln = '____-__-__ __:__:__-____'
461
+ case meta[:color].to_sym
462
+ when :cyan, :red
463
+ buy_created_at_hash_arr = order_history.select do |oh|
464
+ oh[:id] == meta[:buy_order_id]
465
+ end
466
+
467
+ unless buy_created_at_hash_arr.empty?
468
+ order_exec_last_ln = Time.parse(
469
+ buy_created_at_hash_arr.first[:created_at]
470
+ ).strftime('%Y-%m-%d %H:%M:%S%z')
471
+ end
472
+ when :green, :white
473
+ if meta[:done_at]
474
+ order_exec_last_ln = Time.parse(
475
+ meta[:done_at]
476
+ ).strftime('%Y-%m-%d %H:%M:%S%z')
477
+ end
478
+ when :magenta, :yellow
479
+ sell_created_at_hash_arr = order_history.select do |oh|
480
+ oh[:id] == meta[:sell_order_id]
481
+ end
482
+
483
+ unless sell_created_at_hash_arr.empty?
484
+ order_exec_last_ln = Time.parse(
485
+ sell_created_at_hash_arr.first[:created_at]
486
+ ).strftime('%Y-%m-%d %H:%M:%S%z')
487
+ end
469
488
  end
470
489
 
471
490
  invest = "$#{invest_out} @ "
@@ -475,7 +494,7 @@ module Cryptum
475
494
  targ_tick = "$#{target_price_out}"
476
495
  profit = "|Profit: $#{meta[:profit]}"
477
496
 
478
- order_exec_ln = "#{buy_created_at}|#{invest}#{tick}#{size}#{tpm_out}#{targ_tick}#{profit}|#{plan_no}"
497
+ order_exec_ln = "#{order_exec_last_ln}|#{invest}#{tick}#{size}#{tpm_out}#{targ_tick}#{profit}|#{plan_no}"
479
498
 
480
499
  order_execute_win.setpos(out_line_no, Cryptum::UI.col_first)
481
500
  order_execute_win.clrtoeol
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.429'
4
+ VERSION = '0.0.430'
5
5
  end
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.429
4
+ version: 0.0.430
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-26 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable