sibit 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -2
- data/.simplecov +7 -5
- data/Gemfile +1 -1
- data/bin/sibit +24 -14
- data/features/cli.feature +1 -1
- data/lib/sibit.rb +1 -1
- data/lib/sibit/bestof.rb +7 -5
- data/lib/sibit/blockchain.rb +7 -2
- data/lib/sibit/btc.rb +10 -3
- data/lib/sibit/firstof.rb +5 -0
- data/lib/sibit/http.rb +2 -2
- data/lib/sibit/json.rb +11 -1
- data/lib/sibit/log.rb +1 -1
- data/lib/sibit/version.rb +1 -1
- data/sibit.gemspec +11 -13
- data/test/test__helper.rb +1 -1
- data/test/test_blockchain.rb +9 -0
- data/test/test_btc.rb +12 -0
- data/test/test_live.rb +4 -6
- metadata +25 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6560adb5310350a01c7d22c8fa4dd58abc73e9c60c737117d8929cc1a77bdc1
|
4
|
+
data.tar.gz: 31f7e57e269801972b5e3f8cb11f29d9ff847a214b29f488c0a809bc35d0341e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d170b48eca5cd5ecd76d6e60bbf9b2fb5575f1e203a92aab6d10547fcfbf9043f30e55d12f21e45ff6929ab46538a2c56edd103df8e48cc0e621fca1810fe2
|
7
|
+
data.tar.gz: 910666d824ba0e74414e39a51d18b3e5fbbeae6af37cd4c8d15cf27e2b591a1b3d0b992f98b324e3c43dc0fa07ae5a5d19e0bb403f5958242e2f47a2eaeb412a
|
data/.rubocop.yml
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
AllCops:
|
2
|
+
NewCops: enable
|
2
3
|
Exclude:
|
3
4
|
- 'assets/**/*'
|
4
5
|
DisplayCopNames: true
|
5
|
-
TargetRubyVersion: 2.
|
6
|
+
TargetRubyVersion: 2.5
|
6
7
|
|
7
8
|
Style/ClassAndModuleChildren:
|
8
9
|
Enabled: false
|
9
|
-
|
10
|
+
Layout/LineLength:
|
10
11
|
Max: 100
|
11
12
|
Layout/EndOfLine:
|
12
13
|
EnforcedStyle: lf
|
data/.simplecov
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright (c) 2019-2020 Yegor Bugayenko
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -18,21 +20,21 @@
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
21
|
# SOFTWARE.
|
20
22
|
|
21
|
-
if Gem.win_platform?
|
23
|
+
if Gem.win_platform?
|
22
24
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
23
25
|
SimpleCov::Formatter::HTMLFormatter
|
24
26
|
]
|
25
27
|
SimpleCov.start do
|
26
|
-
add_filter
|
27
|
-
add_filter
|
28
|
+
add_filter '/test/'
|
29
|
+
add_filter '/features/'
|
28
30
|
end
|
29
31
|
else
|
30
32
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
31
33
|
[SimpleCov::Formatter::HTMLFormatter]
|
32
34
|
)
|
33
35
|
SimpleCov.start do
|
34
|
-
add_filter
|
35
|
-
add_filter
|
36
|
+
add_filter '/test/'
|
37
|
+
add_filter '/features/'
|
36
38
|
minimum_coverage 60
|
37
39
|
end
|
38
40
|
end
|
data/Gemfile
CHANGED
data/bin/sibit
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
|
24
|
+
$stdout.sync = true
|
25
25
|
|
26
26
|
require 'slop'
|
27
27
|
require 'backtrace'
|
@@ -29,9 +29,12 @@ require 'retriable_proxy'
|
|
29
29
|
require_relative '../lib/sibit'
|
30
30
|
require_relative '../lib/sibit/version'
|
31
31
|
require_relative '../lib/sibit/blockchain'
|
32
|
+
require_relative '../lib/sibit/blockchair'
|
32
33
|
require_relative '../lib/sibit/btc'
|
33
34
|
require_relative '../lib/sibit/bitcoinchain'
|
35
|
+
require_relative '../lib/sibit/cex'
|
34
36
|
require_relative '../lib/sibit/earn'
|
37
|
+
require_relative '../lib/sibit/fake'
|
35
38
|
require_relative '../lib/sibit/firstof'
|
36
39
|
|
37
40
|
begin
|
@@ -62,24 +65,31 @@ Options are:"
|
|
62
65
|
o.array(
|
63
66
|
'--api',
|
64
67
|
'Ordered List of APIs to use, e.g. "earn,blockchain,btc,bitcoinchain"',
|
65
|
-
default: %w[earn blockchain btc bitcoinchain]
|
68
|
+
default: %w[earn blockchain btc bitcoinchain blockchair cex]
|
66
69
|
)
|
67
70
|
end
|
68
|
-
rescue Slop::Error =>
|
69
|
-
raise
|
71
|
+
rescue Slop::Error => e
|
72
|
+
raise e.message
|
70
73
|
end
|
71
74
|
raise 'Try --help' if opts.arguments.empty?
|
72
|
-
log = Sibit::Log.new(opts[:verbose] ?
|
75
|
+
log = Sibit::Log.new(opts[:verbose] ? $stdout : nil)
|
73
76
|
http = opts[:proxy] ? Sibit::HttpProxy.new(opts[:proxy]) : Sibit::Http.new
|
74
77
|
apis = opts[:api].map(&:downcase).map do |a|
|
75
78
|
api = nil
|
76
|
-
|
79
|
+
case a
|
80
|
+
when 'blockchain'
|
77
81
|
api = Sibit::Blockchain.new(http: http, log: log, dry: opts[:dry])
|
78
|
-
|
82
|
+
when 'btc'
|
79
83
|
api = Sibit::Btc.new(http: http, log: log, dry: opts[:dry])
|
80
|
-
|
84
|
+
when 'bitcoinchain'
|
81
85
|
api = Sibit::Bitcoinchain.new(http: http, log: log, dry: opts[:dry])
|
82
|
-
|
86
|
+
when 'blockchair'
|
87
|
+
api = Sibit::Blockchair.new(http: http, log: log, dry: opts[:dry])
|
88
|
+
when 'cex'
|
89
|
+
api = Sibit::Cex.new(http: http, log: log, dry: opts[:dry])
|
90
|
+
when 'fake'
|
91
|
+
api = Sibit::Fake.new
|
92
|
+
when 'earn'
|
83
93
|
api = Sibit::Earn.new(http: http, log: log, dry: opts[:dry])
|
84
94
|
else
|
85
95
|
raise Sibit::Error, "Unknown API \"#{a}\""
|
@@ -87,7 +97,7 @@ Options are:"
|
|
87
97
|
api = RetriableProxy.for_object(api, on: Sibit::Error) if opts[:attempts] > 1
|
88
98
|
api
|
89
99
|
end
|
90
|
-
sibit = Sibit.new(log: log, api: Sibit::FirstOf.new(apis, log: log))
|
100
|
+
sibit = Sibit.new(log: log, api: Sibit::FirstOf.new(apis, log: log, verbose: true))
|
91
101
|
case opts.arguments[0]
|
92
102
|
when 'price'
|
93
103
|
puts sibit.price
|
@@ -96,7 +106,7 @@ Options are:"
|
|
96
106
|
text = %i[S M L XL].map do |m|
|
97
107
|
sat = fees[m] * 250
|
98
108
|
usd = sat * sibit.price / 100_000_000
|
99
|
-
"#{m}: #{sat}sat / $#{format('
|
109
|
+
"#{m}: #{sat}sat / $#{format('%<usd>.02f', usd: usd)}"
|
100
110
|
end.join("\n")
|
101
111
|
puts text
|
102
112
|
when 'latest'
|
@@ -132,11 +142,11 @@ Options are:"
|
|
132
142
|
else
|
133
143
|
raise "Command #{opts.arguments[0]} is not supported"
|
134
144
|
end
|
135
|
-
rescue StandardError =>
|
145
|
+
rescue StandardError => e
|
136
146
|
if opts[:verbose]
|
137
|
-
puts Backtrace.new(
|
147
|
+
puts Backtrace.new(e).to_s
|
138
148
|
else
|
139
|
-
puts "ERROR: #{
|
149
|
+
puts "ERROR: #{e.message}"
|
140
150
|
end
|
141
151
|
exit(255)
|
142
152
|
end
|
data/features/cli.feature
CHANGED
data/lib/sibit.rb
CHANGED
@@ -48,7 +48,7 @@ class Sibit
|
|
48
48
|
# The +api+ argument can be an object or an array of objects. If an array
|
49
49
|
# is provided, we will make an attempt to try them one by one, until
|
50
50
|
# one of them succeedes.
|
51
|
-
def initialize(log:
|
51
|
+
def initialize(log: $stdout, api: Sibit::Blockchain.new(log: Sibit::Log.new(log)))
|
52
52
|
@log = Sibit::Log.new(log)
|
53
53
|
@api = api
|
54
54
|
end
|
data/lib/sibit/bestof.rb
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
|
+
require 'backtrace'
|
23
24
|
require_relative 'error'
|
24
25
|
require_relative 'log'
|
25
26
|
|
@@ -103,14 +104,15 @@ class Sibit
|
|
103
104
|
def best_of(method)
|
104
105
|
return yield @list unless @list.is_a?(Array)
|
105
106
|
results = []
|
107
|
+
errors = []
|
106
108
|
@list.each do |api|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
end
|
109
|
+
results << yield(api)
|
110
|
+
rescue Sibit::Error => e
|
111
|
+
errors << e
|
112
|
+
@log.info("The API #{api.class.name} failed at #{method}(): #{e.message}") if @verbose
|
112
113
|
end
|
113
114
|
if results.empty?
|
115
|
+
errors.each { |e| @log.info(Backtrace.new(e).to_s) }
|
114
116
|
raise Sibit::Error, "No APIs out of #{@list.length} managed to succeed at #{method}(): \
|
115
117
|
#{@list.map { |a| a.class.name }.join(', ')}"
|
116
118
|
end
|
data/lib/sibit/blockchain.rb
CHANGED
@@ -58,8 +58,13 @@ class Sibit
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Get hash of the block after this one.
|
61
|
-
def next_of(
|
62
|
-
|
61
|
+
def next_of(hash)
|
62
|
+
json = Sibit::Json.new(http: @http, log: @log).get(
|
63
|
+
URI("https://blockchain.info/rawblock/#{hash}")
|
64
|
+
)
|
65
|
+
nxt = json['next_block']
|
66
|
+
@log.info("The next block of #{hash} is #{nxt}")
|
67
|
+
nxt
|
63
68
|
end
|
64
69
|
|
65
70
|
# The height of the block.
|
data/lib/sibit/btc.rb
CHANGED
@@ -95,6 +95,7 @@ class Sibit
|
|
95
95
|
data = json['data']
|
96
96
|
raise Sibit::Error, "The block #{hash} not found" if data.nil?
|
97
97
|
h = data['height']
|
98
|
+
raise Sibit::Error, "The block #{hash} found but the height is absent" if h.nil?
|
98
99
|
@log.info("The height of #{hash} is #{h}")
|
99
100
|
h
|
100
101
|
end
|
@@ -124,7 +125,9 @@ class Sibit
|
|
124
125
|
)
|
125
126
|
data = json['data']
|
126
127
|
raise Sibit::Error, "The address #{hash} not found" if data.nil?
|
127
|
-
data['list']
|
128
|
+
txns = data['list']
|
129
|
+
next if txns.nil?
|
130
|
+
txns.each do |u|
|
128
131
|
outs = Sibit::Json.new(http: @http, log: @log).get(
|
129
132
|
URI("https://chain.api.btc.com/v3/tx/#{u['tx_hash']}?verbose=3")
|
130
133
|
)['data']['outputs']
|
@@ -173,9 +176,13 @@ class Sibit
|
|
173
176
|
psize = 50
|
174
177
|
all = []
|
175
178
|
loop do
|
176
|
-
|
179
|
+
data = Sibit::Json.new(http: @http, log: @log).get(
|
177
180
|
URI("https://chain.api.btc.com/v3/block/#{hash}/tx?page=#{page}&pagesize=#{psize}")
|
178
|
-
)['data']
|
181
|
+
)['data']
|
182
|
+
raise Sibit::Error, "The block #{hash} has no data at page #{page}" if data.nil?
|
183
|
+
list = data['list']
|
184
|
+
raise Sibit::Error, "The list is empty for block #{hash} at page #{page}" if list.nil?
|
185
|
+
txns = list.map do |t|
|
179
186
|
{
|
180
187
|
hash: t['hash'],
|
181
188
|
outputs: t['outputs'].reject { |o| o['spent_by_tx'] }.map do |o|
|
data/lib/sibit/firstof.rb
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
|
+
require 'backtrace'
|
23
24
|
require_relative 'error'
|
24
25
|
require_relative 'log'
|
25
26
|
|
@@ -102,18 +103,22 @@ class Sibit
|
|
102
103
|
|
103
104
|
def first_of(method)
|
104
105
|
return yield @list unless @list.is_a?(Array)
|
106
|
+
errors = []
|
105
107
|
done = false
|
106
108
|
result = nil
|
107
109
|
@list.each do |api|
|
110
|
+
@log.info("Calling #{api.class.name}##{method}()...")
|
108
111
|
begin
|
109
112
|
result = yield api
|
110
113
|
done = true
|
111
114
|
break
|
112
115
|
rescue Sibit::Error => e
|
116
|
+
errors << e
|
113
117
|
@log.info("The API #{api.class.name} failed at #{method}(): #{e.message}") if @verbose
|
114
118
|
end
|
115
119
|
end
|
116
120
|
unless done
|
121
|
+
errors.each { |e| @log.info(Backtrace.new(e).to_s) }
|
117
122
|
raise Sibit::Error, "No APIs out of #{@list.length} managed to succeed at #{method}(): \
|
118
123
|
#{@list.map { |a| a.class.name }.join(', ')}"
|
119
124
|
end
|
data/lib/sibit/http.rb
CHANGED
@@ -33,7 +33,7 @@ class Sibit
|
|
33
33
|
def client(uri)
|
34
34
|
http = Net::HTTP.new(uri.host, uri.port)
|
35
35
|
http.use_ssl = true
|
36
|
-
http.read_timeout =
|
36
|
+
http.read_timeout = 240
|
37
37
|
http
|
38
38
|
end
|
39
39
|
end
|
@@ -47,7 +47,7 @@ class Sibit
|
|
47
47
|
def client(uri)
|
48
48
|
http = Net::HTTP.new(uri.host, uri.port, @host, @port.to_i)
|
49
49
|
http.use_ssl = true
|
50
|
-
http.read_timeout =
|
50
|
+
http.read_timeout = 240
|
51
51
|
http
|
52
52
|
end
|
53
53
|
end
|
data/lib/sibit/json.rb
CHANGED
@@ -62,7 +62,7 @@ class Sibit
|
|
62
62
|
unless accept.include?(res.code.to_i)
|
63
63
|
raise Sibit::Error, "Failed to retrieve #{uri} (#{res.code}): #{res.body}"
|
64
64
|
end
|
65
|
-
@log.info("GET #{uri}: #{res.code}/#{res.body.length}
|
65
|
+
@log.info("GET #{uri}: #{res.code}/#{length(res.body.length)} in #{age(start)}")
|
66
66
|
JSON.parse(res.body)
|
67
67
|
end
|
68
68
|
|
@@ -91,6 +91,16 @@ class Sibit
|
|
91
91
|
"#{((Time.now - start) * 1000).round}ms"
|
92
92
|
end
|
93
93
|
|
94
|
+
def length(bytes)
|
95
|
+
if bytes > 1024 * 1024
|
96
|
+
"#{bytes / (1024 * 1024)}mb"
|
97
|
+
elsif bytes > 1024
|
98
|
+
"#{bytes / 1024}kb"
|
99
|
+
else
|
100
|
+
"#{bytes}b"
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
94
104
|
def user_agent
|
95
105
|
"Anonymous/#{Sibit::VERSION}"
|
96
106
|
end
|
data/lib/sibit/log.rb
CHANGED
@@ -34,7 +34,7 @@ class Sibit
|
|
34
34
|
# provide anything, the console will be used. The object you provide
|
35
35
|
# has to respond to the method +info+ or +puts+ in order to receive logging
|
36
36
|
# messages.
|
37
|
-
def initialize(log =
|
37
|
+
def initialize(log = $stdout)
|
38
38
|
@log = log
|
39
39
|
end
|
40
40
|
|
data/lib/sibit/version.rb
CHANGED
data/sibit.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
32
32
|
end
|
33
33
|
s.rubygems_version = '2.2'
|
34
|
-
s.required_ruby_version = '>= 2.
|
34
|
+
s.required_ruby_version = '>= 2.5'
|
35
35
|
s.name = 'sibit'
|
36
36
|
s.version = Sibit::VERSION
|
37
37
|
s.license = 'MIT'
|
@@ -49,20 +49,18 @@ and Ruby 2.3+.'
|
|
49
49
|
s.rdoc_options = ['--charset=UTF-8']
|
50
50
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
51
51
|
s.add_runtime_dependency 'backtrace', '~> 0.3'
|
52
|
-
s.add_runtime_dependency 'bitcoin', '0.2.0'
|
53
52
|
s.add_runtime_dependency 'bitcoin-ruby', '0.0.19'
|
54
53
|
s.add_runtime_dependency 'json', '~> 2'
|
55
54
|
s.add_runtime_dependency 'retriable_proxy', '1.0.2'
|
56
55
|
s.add_runtime_dependency 'slop', '~> 4.6'
|
57
|
-
s.add_development_dependency 'aruba', '~> 0
|
58
|
-
s.add_development_dependency 'codecov', '0.
|
59
|
-
s.add_development_dependency 'cucumber', '~> 1
|
60
|
-
s.add_development_dependency 'debase', '0.2
|
61
|
-
s.add_development_dependency 'minitest', '5.
|
62
|
-
s.add_development_dependency 'rake', '
|
63
|
-
s.add_development_dependency 'rspec-rails', '
|
64
|
-
s.add_development_dependency 'rubocop', '0.
|
65
|
-
s.add_development_dependency 'rubocop-rspec', '1.
|
66
|
-
s.add_development_dependency '
|
67
|
-
s.add_development_dependency 'webmock', '3.7.6'
|
56
|
+
s.add_development_dependency 'aruba', '~> 1.0'
|
57
|
+
s.add_development_dependency 'codecov', '0.2.11'
|
58
|
+
s.add_development_dependency 'cucumber', '~> 5.1'
|
59
|
+
s.add_development_dependency 'debase', '~> 0.2'
|
60
|
+
s.add_development_dependency 'minitest', '5.14.2'
|
61
|
+
s.add_development_dependency 'rake', '13.0.1'
|
62
|
+
s.add_development_dependency 'rspec-rails', '4.0.1'
|
63
|
+
s.add_development_dependency 'rubocop', '0.91.0'
|
64
|
+
s.add_development_dependency 'rubocop-rspec', '1.43.2'
|
65
|
+
s.add_development_dependency 'webmock', '3.9.1'
|
68
66
|
end
|
data/test/test__helper.rb
CHANGED
data/test/test_blockchain.rb
CHANGED
@@ -45,4 +45,13 @@ class TestBlockchain < Minitest::Test
|
|
45
45
|
assert_equal('h1', json[:txns][0][:hash])
|
46
46
|
assert(json[:txns][0][:outputs].is_a?(Array))
|
47
47
|
end
|
48
|
+
|
49
|
+
def test_next_of
|
50
|
+
hash = '0000000000000000000f676241aabc9b62b748d26192a44bc25720c34de27d19'
|
51
|
+
stub_request(:get, "https://blockchain.info/rawblock/#{hash}")
|
52
|
+
.to_return(body: '{"next_block": "nxt"}')
|
53
|
+
sibit = Sibit::Blockchain.new
|
54
|
+
nxt = sibit.next_of(hash)
|
55
|
+
assert_equal('nxt', nxt)
|
56
|
+
end
|
48
57
|
end
|
data/test/test_btc.rb
CHANGED
@@ -86,6 +86,18 @@ class TestBtc < Minitest::Test
|
|
86
86
|
assert_equal(123, balance)
|
87
87
|
end
|
88
88
|
|
89
|
+
def test_fetch_block_broken
|
90
|
+
hash = '000000000000000007341915521967247f1dec17b3a311b8a8f4495392f1439b'
|
91
|
+
stub_request(:get, "https://chain.api.btc.com/v3/block/#{hash}")
|
92
|
+
.to_return(body: '{"data": {"next_block_hash": "n", "hash": "h", "prev_block_hash": "p"}}')
|
93
|
+
stub_request(:get, "https://chain.api.btc.com/v3/block/#{hash}/tx?page=1&pagesize=50")
|
94
|
+
.to_return(body: '{}')
|
95
|
+
sibit = Sibit::Btc.new
|
96
|
+
assert_raises Sibit::Error do
|
97
|
+
sibit.block(hash)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
89
101
|
def test_fetch_block
|
90
102
|
hash = '000000000000000007341915521967247f1dec17b3a311b8a8f4495392f1439b'
|
91
103
|
stub_request(:get, "https://chain.api.btc.com/v3/block/#{hash}")
|
data/test/test_live.rb
CHANGED
@@ -107,7 +107,7 @@ class TestLive < Minitest::Test
|
|
107
107
|
json = api.utxos(['12fCwqBN4XsHq4iu2Wbfgq5e8YhqEGP3ee'])
|
108
108
|
assert_equal(3, json.length)
|
109
109
|
assert(json.find { |t| t[:value] == 16_200_000 }, 'UTXO not found')
|
110
|
-
assert(json.find { |t| t[:script].
|
110
|
+
assert(json.find { |t| t[:script].unpack1('H*').start_with?('76a9141231e760') })
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
@@ -130,11 +130,9 @@ class TestLive < Minitest::Test
|
|
130
130
|
require_relative '../lib/sibit/bitcoinchain'
|
131
131
|
apis << Sibit::Bitcoinchain.new
|
132
132
|
apis.each do |api|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
puts Backtrace.new(e).to_s
|
137
|
-
end
|
133
|
+
yield api
|
134
|
+
rescue Sibit::Error => e
|
135
|
+
puts Backtrace.new(e).to_s
|
138
136
|
end
|
139
137
|
end
|
140
138
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sibit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.3'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bitcoin
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.2.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bitcoin-ruby
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,154 +86,140 @@ dependencies:
|
|
100
86
|
requirements:
|
101
87
|
- - "~>"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0
|
89
|
+
version: '1.0'
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
94
|
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0
|
96
|
+
version: '1.0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: codecov
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - '='
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
103
|
+
version: 0.2.11
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
108
|
- - '='
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
110
|
+
version: 0.2.11
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: cucumber
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - "~>"
|
130
116
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1
|
117
|
+
version: '5.1'
|
132
118
|
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
122
|
- - "~>"
|
137
123
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1
|
124
|
+
version: '5.1'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: debase
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
|
-
- -
|
129
|
+
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.2
|
131
|
+
version: '0.2'
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
|
-
- -
|
136
|
+
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.2
|
138
|
+
version: '0.2'
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
140
|
name: minitest
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
143
|
- - '='
|
158
144
|
- !ruby/object:Gem::Version
|
159
|
-
version: 5.
|
145
|
+
version: 5.14.2
|
160
146
|
type: :development
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
150
|
- - '='
|
165
151
|
- !ruby/object:Gem::Version
|
166
|
-
version: 5.
|
152
|
+
version: 5.14.2
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
154
|
name: rake
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
170
156
|
requirements:
|
171
157
|
- - '='
|
172
158
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
159
|
+
version: 13.0.1
|
174
160
|
type: :development
|
175
161
|
prerelease: false
|
176
162
|
version_requirements: !ruby/object:Gem::Requirement
|
177
163
|
requirements:
|
178
164
|
- - '='
|
179
165
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
166
|
+
version: 13.0.1
|
181
167
|
- !ruby/object:Gem::Dependency
|
182
168
|
name: rspec-rails
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
184
170
|
requirements:
|
185
171
|
- - '='
|
186
172
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
173
|
+
version: 4.0.1
|
188
174
|
type: :development
|
189
175
|
prerelease: false
|
190
176
|
version_requirements: !ruby/object:Gem::Requirement
|
191
177
|
requirements:
|
192
178
|
- - '='
|
193
179
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
180
|
+
version: 4.0.1
|
195
181
|
- !ruby/object:Gem::Dependency
|
196
182
|
name: rubocop
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
198
184
|
requirements:
|
199
185
|
- - '='
|
200
186
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0.
|
187
|
+
version: 0.91.0
|
202
188
|
type: :development
|
203
189
|
prerelease: false
|
204
190
|
version_requirements: !ruby/object:Gem::Requirement
|
205
191
|
requirements:
|
206
192
|
- - '='
|
207
193
|
- !ruby/object:Gem::Version
|
208
|
-
version: 0.
|
194
|
+
version: 0.91.0
|
209
195
|
- !ruby/object:Gem::Dependency
|
210
196
|
name: rubocop-rspec
|
211
197
|
requirement: !ruby/object:Gem::Requirement
|
212
198
|
requirements:
|
213
199
|
- - '='
|
214
200
|
- !ruby/object:Gem::Version
|
215
|
-
version: 1.
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - '='
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 1.31.0
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: ruby-debug-ide
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - '='
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: 0.6.1
|
201
|
+
version: 1.43.2
|
230
202
|
type: :development
|
231
203
|
prerelease: false
|
232
204
|
version_requirements: !ruby/object:Gem::Requirement
|
233
205
|
requirements:
|
234
206
|
- - '='
|
235
207
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
208
|
+
version: 1.43.2
|
237
209
|
- !ruby/object:Gem::Dependency
|
238
210
|
name: webmock
|
239
211
|
requirement: !ruby/object:Gem::Requirement
|
240
212
|
requirements:
|
241
213
|
- - '='
|
242
214
|
- !ruby/object:Gem::Version
|
243
|
-
version: 3.
|
215
|
+
version: 3.9.1
|
244
216
|
type: :development
|
245
217
|
prerelease: false
|
246
218
|
version_requirements: !ruby/object:Gem::Requirement
|
247
219
|
requirements:
|
248
220
|
- - '='
|
249
221
|
- !ruby/object:Gem::Version
|
250
|
-
version: 3.
|
222
|
+
version: 3.9.1
|
251
223
|
description: |-
|
252
224
|
This is a simple Bitcoin client, to use from command line
|
253
225
|
or from your Ruby app. You don't need to run any Bitcoin software,
|
@@ -324,7 +296,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
324
296
|
requirements:
|
325
297
|
- - ">="
|
326
298
|
- !ruby/object:Gem::Version
|
327
|
-
version: '2.
|
299
|
+
version: '2.5'
|
328
300
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
329
301
|
requirements:
|
330
302
|
- - ">="
|