zold 0.10.23 → 0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/bin/zold-nohup +24 -0
- data/lib/zold/amount.rb +2 -2
- data/lib/zold/version.rb +1 -1
- data/test/test_amount.rb +14 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ce4ce27a96a2d3e7a2963085d9e8491e05da7ad
|
4
|
+
data.tar.gz: 9d076c04d1069838250f23e2aadeaab2fe82885b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d31759b7f5e16ed3701b05a97599dbf65172afc36ff72f7df85892cf123cd8c0cda09565b60ebe433c0593b56be397a73c19ddf30bc48097dee91b1eb9d40cc
|
7
|
+
data.tar.gz: 2fa2524412411a98fdf9c90e34655913e83e2081c1fe1db1873ed6a7cf2d0d8ea80a26053018889ad82779817c3252f2e3d1f39d3bb703e6d83fa55157f93bac
|
data/README.md
CHANGED
@@ -91,25 +91,26 @@ In order to do that just run (with your own wallet ID, of course,
|
|
91
91
|
and your own public IP address instead of `4.4.4.4`):
|
92
92
|
|
93
93
|
```bash
|
94
|
-
$ zold
|
94
|
+
$ zold --trace --verbose --invoice=5f96e731e48ae21f --host=4.4.4.4
|
95
95
|
```
|
96
96
|
|
97
97
|
Then, open the page `4.4.4.4:4096` in your browser
|
98
98
|
(you may need to open the inbound port at your
|
99
99
|
[IP firewall](https://www.howtogeek.com/177621/the-beginners-guide-to-iptables-the-linux-firewall/)).
|
100
100
|
If you see a simple JSON document, everything is fine.
|
101
|
-
Next, hit <kbd>Ctrl</kbd>+<kbd>c</kbd> and run
|
102
|
-
|
103
|
-
(replace `CMD` with the command you just executed before):
|
101
|
+
Next, hit <kbd>Ctrl</kbd>+<kbd>c</kbd> and run it again, but instead
|
102
|
+
of `zold` say `zold-nohup` and add an ampersand (`&`) at the end:
|
104
103
|
|
105
104
|
```bash
|
106
|
-
$ nohup
|
105
|
+
$ zold-nohup --trace --verbose --invoice=5f96e731e48ae21f --host=4.4.4.4 &
|
107
106
|
```
|
108
107
|
|
109
|
-
|
108
|
+
Now you can close console, it will work in the background, saving the
|
109
|
+
output logs to `nohup.out`. The software will update itself automatically to new versions.
|
110
110
|
|
111
111
|
Grateful users of the system will pay "taxes" to your wallet
|
112
|
-
for the maintenance of their wallets
|
112
|
+
for the maintenance of their wallets, and the system will occasionally
|
113
|
+
send you rewards for keeping the node online (approximately 1 ZLD per day).
|
113
114
|
|
114
115
|
## Frequently Asked Questions
|
115
116
|
|
data/bin/zold-nohup
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
# Copyright (c) 2018 Yegor Bugayenko
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
6
|
+
# in the Software without restriction, including without limitation the rights
|
7
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
# copies of the Software, and to permit persons to whom the Software is
|
9
|
+
# furnished to do so, subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
# SOFTWARE.
|
21
|
+
|
22
|
+
args=$@
|
23
|
+
|
24
|
+
nohup bash -c 'while zold ${args}; do gem install zold; done'
|
data/lib/zold/amount.rb
CHANGED
data/lib/zold/version.rb
CHANGED
data/test/test_amount.rb
CHANGED
@@ -35,6 +35,20 @@ class TestAmount < Minitest::Test
|
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
|
+
def test_prints_zld_with_many_digits
|
39
|
+
amount = Zold::Amount.new(zld: 0.12345678)
|
40
|
+
assert_equal('0.123', amount.to_zld(3))
|
41
|
+
assert_equal('0.1235', amount.to_zld(4))
|
42
|
+
assert_equal('0.12346', amount.to_zld(5))
|
43
|
+
assert_equal('0.123457', amount.to_zld(6))
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_compares_with_zero
|
47
|
+
amount = Zold::Amount.new(zld: 0.00001)
|
48
|
+
assert(!amount.zero?)
|
49
|
+
assert(amount != Zold::Amount::ZERO)
|
50
|
+
end
|
51
|
+
|
38
52
|
def test_parses_coins
|
39
53
|
amount = Zold::Amount.new(coins: 900_000_000)
|
40
54
|
assert(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.11'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -266,6 +266,7 @@ description: Non-blockchain cryptocurrency
|
|
266
266
|
email: yegor256@gmail.com
|
267
267
|
executables:
|
268
268
|
- zold
|
269
|
+
- zold-nohup
|
269
270
|
extensions: []
|
270
271
|
extra_rdoc_files:
|
271
272
|
- README.md
|
@@ -289,6 +290,7 @@ files:
|
|
289
290
|
- Rakefile
|
290
291
|
- appveyor.yml
|
291
292
|
- bin/zold
|
293
|
+
- bin/zold-nohup
|
292
294
|
- cucumber.yml
|
293
295
|
- deploy.sh
|
294
296
|
- features/cli.feature
|