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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bitflyer/cli/command/summary_command.rb +7 -2
- data/lib/bitflyer/cli/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: 44bd852ceb44b855bdd72cde07511e1dab6b18481e9de1c53500e1affa0840fd
|
|
4
|
+
data.tar.gz: f28ed15aa32b158e16826e3945db6fe52e3d80e238fe28507c739a552a5fdb18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a4195abe142ae2891c80d968134be81d46a8e4da6a05766079474dd08f43f5cfe43b75160cf4f102c7bc5e04da1e0624b69f448f57b0a8b3afa108f937f4405
|
|
7
|
+
data.tar.gz: 249c2b4c427c4b3be3b245f17379dc62eee9a465a34a0021c47a07774b64f84bb3ad7005177d5c9a6206cf68b3af92c37a2381471e8b8ae7098652d6ce540a4c
|
data/Gemfile.lock
CHANGED
|
@@ -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
|
data/lib/bitflyer/cli/version.rb
CHANGED