sibit 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/cli.feature +8 -0
- data/lib/sibit/version.rb +1 -1
- data/lib/sibit.rb +31 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca6545ba86de32ef32e697433524c11c8b563757cb8de20dc23093df29597ba5
|
4
|
+
data.tar.gz: a711ec74da8e12b4791d09733df3f058d574cea2baef1959060099999c336932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e4ee0809688604f0e9202fb15d7f68da9afaa8f2944d938d42c65c745afe28395dddc907073cd63f25d81ea7866a77f5ec92234557bacdeaf4a0ebff44e7f98
|
7
|
+
data.tar.gz: 396b574af7310831460c0ef6248002f9a3d5a493ee879ce1252ede5827f3e1a527e138dc93cdd7dbda2d91fec1a1103bd61484e18955d64764c09737f89e9333
|
data/features/cli.feature
CHANGED
@@ -6,6 +6,14 @@ Feature: Command Line Processing
|
|
6
6
|
Then Exit code is zero
|
7
7
|
And Stdout contains "--help"
|
8
8
|
|
9
|
+
Scenario: Bitcoin price can be retrieved
|
10
|
+
When I run bin/sibit with "price"
|
11
|
+
Then Exit code is zero
|
12
|
+
|
13
|
+
Scenario: Bitcoin latest block hash can be retrieved
|
14
|
+
When I run bin/sibit with "latest"
|
15
|
+
Then Exit code is zero
|
16
|
+
|
9
17
|
Scenario: Bitcoin private key can be generated
|
10
18
|
When I run bin/sibit with "generate"
|
11
19
|
Then Exit code is zero
|
data/lib/sibit/version.rb
CHANGED
data/lib/sibit.rb
CHANGED
@@ -37,6 +37,37 @@ class Sibit
|
|
37
37
|
# If something goes wrong.
|
38
38
|
class Error < StandardError; end
|
39
39
|
|
40
|
+
# Fake one, which is useful for testing.
|
41
|
+
class Fake
|
42
|
+
def price(_cur = 'USD')
|
43
|
+
4_000
|
44
|
+
end
|
45
|
+
|
46
|
+
def generate
|
47
|
+
'fd2333686f49d8647e1ce8d5ef39c304520b08f3c756b67068b30a3db217dcb2'
|
48
|
+
end
|
49
|
+
|
50
|
+
def create(_pvt)
|
51
|
+
'1JvCsJtLmCxEk7ddZFnVkGXpr9uhxZPmJi'
|
52
|
+
end
|
53
|
+
|
54
|
+
def balance(_address)
|
55
|
+
100_000_000
|
56
|
+
end
|
57
|
+
|
58
|
+
def pay(_amount, _fee, _sources, _target, _change)
|
59
|
+
'9dfe55a30b5ee732005158c589179a398117117a68d21531fb6c78b85b544c54'
|
60
|
+
end
|
61
|
+
|
62
|
+
def latest
|
63
|
+
'00000000000000000008df8a6e1b61d1136803ac9791b8725235c9f780b4ed71'
|
64
|
+
end
|
65
|
+
|
66
|
+
def get_json(_uri)
|
67
|
+
{}
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
40
71
|
# Constructor.
|
41
72
|
#
|
42
73
|
# You may provide the log you want to see the messages in. If you don't
|
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.7.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: 2019-04-
|
11
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|