cryptum 0.0.446 → 0.0.448

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: e602fec1892c72d24cec28660f090b8209fc469fa38407252be04a10e6781237
4
- data.tar.gz: ea39698a8b93f4601b7d010dc0758b493a771bcd0e803dc10aa3fa5ece210d75
3
+ metadata.gz: c8c01b84ae6f435626bf3012826afd00ba094510addb82c916b984785a73f222
4
+ data.tar.gz: 6b99a0071732f8dc1023bb066f3aec1b96856a3690e218bc585c4c974d69f7f0
5
5
  SHA512:
6
- metadata.gz: 3e139b0f1062881677a60a9d00ac53fcb0ee12fdc7b169d6393acdca33e77d7d9970f54d47dbed287440ae24523ebfc34141060d15553cc3cab36417e787bf5c
7
- data.tar.gz: c8f1e40e9356e121679d0f8da180eeca87dad2162fe44136c96f983e78901fb3102c9791c16f13623a6b9752857f833a2f9b0dcb57c8c261931dda3d18d9e9da
6
+ metadata.gz: 86013ba72221a8bf963df1184dcd1adbadc2846362db3b1e2d2ffecff51bb0073e5eaffa1841228632409d5f299970000020554c24970d965f44ea2ffb0852c3
7
+ data.tar.gz: 2d79c80880a1da770feae76e1c0fa410bbf4e5f8dcdc63ce848b6a879965f59d5ea15b3ed7955fba160368809eb05adc5e03c50f88b8d86d10bd5c8f8cd6a21a
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ Layout/LineLength:
6
6
  Lint/UselessRescue:
7
7
  Enabled: false
8
8
  Metrics/AbcSize:
9
- Max: 444.5
9
+ Max: 447.2
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: 134
16
16
  Metrics/CyclomaticComplexity:
17
- Max: 88
17
+ Max: 89
18
18
  Metrics/MethodLength:
19
19
  Max: 418
20
20
  Metrics/ModuleLength:
21
21
  Max: 428
22
22
  Metrics/PerceivedComplexity:
23
- Max: 86
23
+ Max: 87
24
24
  Style/HashSyntax:
25
25
  EnforcedShorthandSyntax: never
26
26
 
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ gem 'bundler', '>=2.4.17'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
18
18
  gem 'eventmachine', '1.2.7'
19
- gem 'faye-websocket', '0.11.2'
19
+ gem 'faye-websocket', '0.11.3'
20
20
  gem 'neovim', '0.9.0'
21
21
  gem 'permessage_deflate', '0.1.4'
22
22
  gem 'pry', '0.14.2'
@@ -27,7 +27,7 @@ gem 'rdoc', '6.5.0'
27
27
  gem 'require_all', '3.0.0'
28
28
  gem 'rest-client', '2.1.0'
29
29
  gem 'rspec', '3.12.0'
30
- gem 'rubocop', '1.54.2'
30
+ gem 'rubocop', '1.55.0'
31
31
  gem 'rubocop-rake', '0.6.0'
32
32
  gem 'rubocop-rspec', '2.22.0'
33
33
  gem 'ruby-prof', '1.6.3'
@@ -239,9 +239,11 @@ module Cryptum
239
239
  end
240
240
  end
241
241
 
242
- # Snag all sold orders
242
+ # Snag all sold orders YTD
243
243
  oh_meta_sold_arr = order_history_meta.select do |ohm|
244
- ohm[:color].to_sym == :green && ohm.key?(:done_at)
244
+ ohm[:color].to_sym == :green &&
245
+ ohm.key?(:done_at) &&
246
+ Time.now.strftime('%Y') == Time.parse(ohm[:done_at]).strftime('%Y')
245
247
  end
246
248
  order_hist_meta_sold = oh_meta_sold_arr.length
247
249
 
@@ -267,10 +269,10 @@ module Cryptum
267
269
  learning_arr.push(learning)
268
270
  end
269
271
 
270
- oh_sold = order_history.find { |oh| oh[:id] == sell_order_id }
271
- meta[:done_at] = Time.parse(oh_sold[:done_at]).strftime('%Y-%m-%d %H:%M:%S%z') unless oh_sold.nil?
272
+ # oh_sold = order_history.find { |oh| oh[:id] == sell_order_id }
273
+ # meta[:done_at] = Time.parse(oh_sold[:done_at]).strftime('%Y-%m-%d %H:%M:%S%z') unless oh_sold.nil?
274
+ meta[:done_at] = meta[:sell_details][:done_at] unless meta[:sell_details].nil?
272
275
  meta[:done_at] ||= '____-__-__ __:__:__-____'
273
- # meta[:done_at] ||= Time.now.strftime('%Y-%m-%d %H:%M:%S%z')
274
276
  meta[:color] = :green
275
277
 
276
278
  # Obtain buy && sell order details from order history
@@ -320,7 +322,8 @@ module Cryptum
320
322
  end
321
323
  order_hist_meta_24h_expired = ohm_expire_twenty_four_arr.length
322
324
 
323
- # Calculate total gains and gains within past 24 hrs
325
+ # Calculate gains within past 24 hrs
326
+ # && Calculate gains YTD
324
327
  gains_sum = oh_meta_sold_arr.map do |ohms|
325
328
  ohms[:profit].to_f
326
329
  end.sum
@@ -538,8 +541,8 @@ module Cryptum
538
541
  )
539
542
 
540
543
  header_str = "SELLING: #{total_to_sell} w tProf: $#{total_selling_profit_out} | "
541
- header_str += "SOLD 24h: #{order_hist_meta_sold_twenty_four} Tot: #{order_hist_meta_sold} | "
542
- header_str += "GAINS 24h: $#{gains_24h_out} Tot: $#{gains_out} | "
544
+ header_str += "SOLD 24h: #{order_hist_meta_sold_twenty_four} YTD: #{order_hist_meta_sold} | "
545
+ header_str += "GAINS 24h: $#{gains_24h_out} YTD: $#{gains_out} | "
543
546
  header_str += "EXPIRED 24h: #{order_hist_meta_24h_expired} Tot: #{order_hist_meta_expired}"
544
547
  order_execute_win.setpos(
545
548
  out_line_no,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.446'
4
+ VERSION = '0.0.448'
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.446
4
+ version: 0.0.448
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-07-19 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.11.2
89
+ version: 0.11.3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.11.2
96
+ version: 0.11.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: neovim
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -240,14 +240,14 @@ dependencies:
240
240
  requirements:
241
241
  - - '='
242
242
  - !ruby/object:Gem::Version
243
- version: 1.54.2
243
+ version: 1.55.0
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - '='
249
249
  - !ruby/object:Gem::Version
250
- version: 1.54.2
250
+ version: 1.55.0
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: rubocop-rake
253
253
  requirement: !ruby/object:Gem::Requirement