bitflyer-cli 1.0.1 → 1.0.2

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: ddca3f608079462d31cb86831e22fe67edfb00fa055bc3bef1ff092c4647ba60
4
- data.tar.gz: 383c32699f7aa5d8f554b1edcc5a6aa5bd82dd07518edf93cf1069794c9e5d80
3
+ metadata.gz: 44bd852ceb44b855bdd72cde07511e1dab6b18481e9de1c53500e1affa0840fd
4
+ data.tar.gz: f28ed15aa32b158e16826e3945db6fe52e3d80e238fe28507c739a552a5fdb18
5
5
  SHA512:
6
- metadata.gz: 8d00cc6795858857d1e5165777c0389afb3ed8b355e128349f1b068e6afb31a7da2538697b6132b32a514e804db766560a3cd8159bd9101c96dc621e972b20e2
7
- data.tar.gz: faf067d80282c993290ff84ae73a3f0880b89fe6193df8489d32ecadb9cc83eab0458d8ea48416216625316f4400210fd336c61c3772ae9a6db5a00e0c6e61a3
6
+ metadata.gz: 9a4195abe142ae2891c80d968134be81d46a8e4da6a05766079474dd08f43f5cfe43b75160cf4f102c7bc5e04da1e0624b69f448f57b0a8b3afa108f937f4405
7
+ data.tar.gz: 249c2b4c427c4b3be3b245f17379dc62eee9a465a34a0021c47a07774b64f84bb3ad7005177d5c9a6206cf68b3af92c37a2381471e8b8ae7098652d6ce540a4c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bitflyer-cli (1.0.1)
4
+ bitflyer-cli (1.0.2)
5
5
  bigdecimal
6
6
  bitflyer (>= 2.0)
7
7
  colorize (>= 0.8.1, < 1.2.0)
@@ -9,8 +9,6 @@ class SummaryCommand
9
9
  include HasHTTPClient
10
10
  include HasRealtimeClient
11
11
 
12
- BUFFER_SIZE = 30
13
-
14
12
  def initialize
15
13
  @current_price = 0.0
16
14
 
@@ -23,6 +21,7 @@ class SummaryCommand
23
21
 
24
22
  def run # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
25
23
  $stdout.sync = true
24
+ print "\e[?25l"
26
25
 
27
26
  Thread.new do
28
27
  loop do
@@ -31,6 +30,8 @@ class SummaryCommand
31
30
  end
32
31
  end
33
32
 
33
+ puts "\n" * 3
34
+
34
35
  loop do
35
36
  print <<~EOS
36
37
  \e[4F\e[0JCurrent: #{@current_price.to_i.to_s.split_by_comma}
@@ -40,6 +41,10 @@ class SummaryCommand
40
41
  EOS
41
42
  sleep 0.1
42
43
  end
44
+ rescue Interrupt
45
+ # exit
46
+ ensure
47
+ print "\e[?25h"
43
48
  end
44
49
 
45
50
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bitflyer
4
4
  module Cli
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitflyer-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Ueki