zold 0.31.2 → 0.31.4
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/lib/zold/commands/alias.rb +0 -1
- data/lib/zold/commands/calculate.rb +0 -1
- data/lib/zold/commands/clean.rb +0 -1
- data/lib/zold/commands/create.rb +0 -1
- data/lib/zold/commands/diff.rb +0 -1
- data/lib/zold/commands/fetch.rb +0 -1
- data/lib/zold/commands/invoice.rb +0 -1
- data/lib/zold/commands/merge.rb +0 -1
- data/lib/zold/commands/next.rb +0 -1
- data/lib/zold/commands/node.rb +0 -1
- data/lib/zold/commands/pay.rb +5 -2
- data/lib/zold/commands/propagate.rb +0 -1
- data/lib/zold/commands/push.rb +0 -1
- data/lib/zold/commands/remote.rb +0 -1
- data/lib/zold/commands/remove.rb +0 -1
- data/lib/zold/commands/show.rb +0 -1
- data/lib/zold/commands/taxes.rb +5 -7
- data/lib/zold/remotes.rb +5 -2
- data/lib/zold/version.rb +1 -1
- 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: 346ea55d69f9f0410a3c64f23ec4dc1cf357799943b626cb2aad5047b2408d80
|
|
4
|
+
data.tar.gz: c5b9048c9288a72f06c65fb468c56f6e83705be574ed5293da76b466f82df681
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9e869d86c20026e939bcb9853d11481ec1c2c1dcd2a3314fa3164daa730e46a5a8d1bcfcc6432e117935285c6f21f7b7c745a194bcc7af4434920b7f5523f48
|
|
7
|
+
data.tar.gz: c68c9eb1c103eb8606325a16ae6ffdf74a653bc9e968fc1f45fea01498cfd70f44b0152db3588720a2241e1bbd612d2befdf5bc6c3da96b7c8f7c05675b08b14
|
data/lib/zold/commands/alias.rb
CHANGED
data/lib/zold/commands/clean.rb
CHANGED
data/lib/zold/commands/create.rb
CHANGED
data/lib/zold/commands/diff.rb
CHANGED
data/lib/zold/commands/fetch.rb
CHANGED
data/lib/zold/commands/merge.rb
CHANGED
|
@@ -51,7 +51,6 @@ module Zold
|
|
|
51
51
|
|
|
52
52
|
# Returns the array of modified wallets (IDs)
|
|
53
53
|
def run(args = [])
|
|
54
|
-
@log.debug("Merge.run(#{args.join(' ')})")
|
|
55
54
|
opts = Slop.parse(args, help: true, suppress_errors: true) do |o|
|
|
56
55
|
o.banner = "Usage: zold merge [ID...] [options]
|
|
57
56
|
Available options:"
|
data/lib/zold/commands/next.rb
CHANGED
data/lib/zold/commands/node.rb
CHANGED
data/lib/zold/commands/pay.rb
CHANGED
|
@@ -48,7 +48,6 @@ module Zold
|
|
|
48
48
|
# Sends a payment and returns the transaction just created in the
|
|
49
49
|
# paying wallet, an instance of Zold::Txn
|
|
50
50
|
def run(args = [])
|
|
51
|
-
@log.debug("Pay.run(#{args.join(' ')})")
|
|
52
51
|
opts = Slop.parse(args, help: true, suppress_errors: true) do |o|
|
|
53
52
|
o.banner = "Usage: zold pay wallet target amount [details] [options]
|
|
54
53
|
Where:
|
|
@@ -82,6 +81,9 @@ Available options:"
|
|
|
82
81
|
o.bool '--ignore-score-weakness',
|
|
83
82
|
'Don\'t complain when their score is too weak (when paying taxes)',
|
|
84
83
|
default: false
|
|
84
|
+
o.bool '--ignore-score-size',
|
|
85
|
+
'Don\'t complain when their score is too small (when paying taxes)',
|
|
86
|
+
default: false
|
|
85
87
|
o.bool '--dont-pay-taxes',
|
|
86
88
|
'Don\'t pay taxes even if the wallet is in debt',
|
|
87
89
|
default: false
|
|
@@ -141,8 +143,9 @@ Available options:"
|
|
|
141
143
|
"--private-key=#{Shellwords.escape(opts['private-key'])}",
|
|
142
144
|
opts['pay-taxes-anyway'] ? '--pay-anyway' : '',
|
|
143
145
|
opts['ignore-score-weakness'] ? '--ignore-score-weakness' : '',
|
|
146
|
+
opts['ignore-score-size'] ? '--ignore-score-size' : '',
|
|
144
147
|
id.to_s,
|
|
145
|
-
"--keygap=#{Shellwords.escape(opts['keygap'])}"
|
|
148
|
+
opts['keygap'].empty? ? '' : "--keygap=#{Shellwords.escape(opts['keygap'])}"
|
|
146
149
|
].reject(&:empty?)
|
|
147
150
|
)
|
|
148
151
|
end
|
|
@@ -46,7 +46,6 @@ module Zold
|
|
|
46
46
|
|
|
47
47
|
# Returns list of Wallet IDs which were affected
|
|
48
48
|
def run(args = [])
|
|
49
|
-
@log.debug("Propagate.run(#{args.join(' ')})")
|
|
50
49
|
opts = Slop.parse(args, help: true, suppress_errors: true) do |o|
|
|
51
50
|
o.banner = "Usage: zold propagate [ID...] [options]
|
|
52
51
|
Available options:"
|
data/lib/zold/commands/push.rb
CHANGED
data/lib/zold/commands/remote.rb
CHANGED
data/lib/zold/commands/remove.rb
CHANGED
data/lib/zold/commands/show.rb
CHANGED
data/lib/zold/commands/taxes.rb
CHANGED
|
@@ -61,7 +61,6 @@ module Zold
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def run(args = [])
|
|
64
|
-
@log.debug("Taxes.run(#{args.join(' ')})")
|
|
65
64
|
opts = Slop.parse(args, help: true, suppress_errors: true) do |o|
|
|
66
65
|
o.banner = "Usage: zold taxes command [options]
|
|
67
66
|
Available commands:
|
|
@@ -82,6 +81,9 @@ Available options:"
|
|
|
82
81
|
o.bool '--ignore-score-weakness',
|
|
83
82
|
'Don\'t complain when their score is too weak',
|
|
84
83
|
default: false
|
|
84
|
+
o.bool '--ignore-score-size',
|
|
85
|
+
'Don\'t complain when their score is too small',
|
|
86
|
+
default: false
|
|
85
87
|
o.string '--keygap',
|
|
86
88
|
'Keygap, if the private RSA key is not complete',
|
|
87
89
|
default: ''
|
|
@@ -191,12 +193,8 @@ the balance is #{wallet.balance}: #{tax.to_text}")
|
|
|
191
193
|
json = JsonPage.new(res.body, uri).to_hash
|
|
192
194
|
score = Score.parse_json(json['score'])
|
|
193
195
|
r.assert_valid_score(score)
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
else
|
|
197
|
-
r.assert_score_strength(score)
|
|
198
|
-
end
|
|
199
|
-
r.assert_score_value(score, Tax::EXACT_SCORE)
|
|
196
|
+
r.assert_score_strength(score) unless opts['ignore-score-weakness']
|
|
197
|
+
r.assert_score_value(score, Tax::EXACT_SCORE) unless opts['ignore-score-size']
|
|
200
198
|
@log.info("#{r}: #{Rainbow(score.value).green} to #{score.invoice}")
|
|
201
199
|
best << score
|
|
202
200
|
end
|
data/lib/zold/remotes.rb
CHANGED
|
@@ -99,11 +99,14 @@ at #{response.headers['X-Zold-Path']}"
|
|
|
99
99
|
|
|
100
100
|
def assert_score_strength(score)
|
|
101
101
|
return if score.strength >= Score::STRENGTH
|
|
102
|
-
raise CantAssert, "Score #{score.strength} is too weak (<#{Score::STRENGTH}): #{score.reduced(4)}
|
|
102
|
+
raise CantAssert, "Score #{score.strength} is too weak (<#{Score::STRENGTH}): #{score.reduced(4)}
|
|
103
|
+
(use --ignore-score-strength to suppress this check)"
|
|
103
104
|
end
|
|
104
105
|
|
|
105
106
|
def assert_score_value(score, min)
|
|
106
|
-
|
|
107
|
+
return if score.value >= min
|
|
108
|
+
raise CantAssert, "Score #{score.value} is too small (<#{min}): #{score.reduced(4)}
|
|
109
|
+
(use --ignore-score-size to suppress this check)"
|
|
107
110
|
end
|
|
108
111
|
end
|
|
109
112
|
|
data/lib/zold/version.rb
CHANGED
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.31.
|
|
4
|
+
version: 0.31.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
@@ -823,7 +823,7 @@ licenses:
|
|
|
823
823
|
- MIT
|
|
824
824
|
metadata: {}
|
|
825
825
|
post_install_message: |-
|
|
826
|
-
Thanks for installing Zold 0.31.
|
|
826
|
+
Thanks for installing Zold 0.31.4!
|
|
827
827
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
|
828
828
|
Read our blog posts: https://blog.zold.io
|
|
829
829
|
Try ZLD online wallet at: https://wts.zold.io
|