zold 0.31.2 → 0.31.3
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/pay.rb +4 -0
- data/lib/zold/commands/taxes.rb +5 -6
- 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: f86367b55fc3eb30911e64f63c88c58e086dbe3dceebe73c277e3b17230f06cd
|
|
4
|
+
data.tar.gz: a98f1f7e5587d25ae2f6b50efaf01bed6986c69f6a5b8b426efb28e1dac7fb5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d7d873e69e4c7b604a0a377c8cf86653e3801e42dcae5037c0d70279b07692e3577508cb5f4943ea49c9363c3f248a85310b8bb38625427bb23f91a42d97549
|
|
7
|
+
data.tar.gz: 2eb0da768f4acc1b4ccb8ba3bb79f2e105853a38e87a6dbc38f6c716ca4d47ca5417c1fe9e439d3ac4371c239ff7b160e22a99ade47f469da8c1baa6eb7bf45b
|
data/lib/zold/commands/pay.rb
CHANGED
|
@@ -82,6 +82,9 @@ Available options:"
|
|
|
82
82
|
o.bool '--ignore-score-weakness',
|
|
83
83
|
'Don\'t complain when their score is too weak (when paying taxes)',
|
|
84
84
|
default: false
|
|
85
|
+
o.bool '--ignore-score-size',
|
|
86
|
+
'Don\'t complain when their score is too small (when paying taxes)',
|
|
87
|
+
default: false
|
|
85
88
|
o.bool '--dont-pay-taxes',
|
|
86
89
|
'Don\'t pay taxes even if the wallet is in debt',
|
|
87
90
|
default: false
|
|
@@ -141,6 +144,7 @@ Available options:"
|
|
|
141
144
|
"--private-key=#{Shellwords.escape(opts['private-key'])}",
|
|
142
145
|
opts['pay-taxes-anyway'] ? '--pay-anyway' : '',
|
|
143
146
|
opts['ignore-score-weakness'] ? '--ignore-score-weakness' : '',
|
|
147
|
+
opts['ignore-score-size'] ? '--ignore-score-size' : '',
|
|
144
148
|
id.to_s,
|
|
145
149
|
"--keygap=#{Shellwords.escape(opts['keygap'])}"
|
|
146
150
|
].reject(&:empty?)
|
data/lib/zold/commands/taxes.rb
CHANGED
|
@@ -82,6 +82,9 @@ Available options:"
|
|
|
82
82
|
o.bool '--ignore-score-weakness',
|
|
83
83
|
'Don\'t complain when their score is too weak',
|
|
84
84
|
default: false
|
|
85
|
+
o.bool '--ignore-score-size',
|
|
86
|
+
'Don\'t complain when their score is too small',
|
|
87
|
+
default: false
|
|
85
88
|
o.string '--keygap',
|
|
86
89
|
'Keygap, if the private RSA key is not complete',
|
|
87
90
|
default: ''
|
|
@@ -191,12 +194,8 @@ the balance is #{wallet.balance}: #{tax.to_text}")
|
|
|
191
194
|
json = JsonPage.new(res.body, uri).to_hash
|
|
192
195
|
score = Score.parse_json(json['score'])
|
|
193
196
|
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)
|
|
197
|
+
r.assert_score_strength(score) unless opts['ignore-score-weakness']
|
|
198
|
+
r.assert_score_value(score, Tax::EXACT_SCORE) unless opts['ignore-score-size']
|
|
200
199
|
@log.info("#{r}: #{Rainbow(score.value).green} to #{score.invoice}")
|
|
201
200
|
best << score
|
|
202
201
|
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.3
|
|
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.3!
|
|
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
|