zold 0.31.2 → 0.31.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fea49da6a5daff42ee6e9d429a0f8a27b3b930ea5394d67bfd1ef11932bddaa
4
- data.tar.gz: be7c0b568ea2119d083b0cc6e0a2761166b20475cdf63a72d4e5cce02f24f791
3
+ metadata.gz: f86367b55fc3eb30911e64f63c88c58e086dbe3dceebe73c277e3b17230f06cd
4
+ data.tar.gz: a98f1f7e5587d25ae2f6b50efaf01bed6986c69f6a5b8b426efb28e1dac7fb5b
5
5
  SHA512:
6
- metadata.gz: 3e44bbb2a8dad04e0407c3d2fc7d965cd5a574fed98ae6b8872ad1bc6c6f27dff2f7317f95a86f2c3151ddae32287e74da7a30cfb3e675a3ac36a9bad667d063
7
- data.tar.gz: b5081ec8bb0db18d78107d6dccd05e01450f126bc6582665d4bfd469cf0e73a32e9dd2983ed062d792f76c33ea68470d803342800b6c9b75bca777c3284c756c
6
+ metadata.gz: 0d7d873e69e4c7b604a0a377c8cf86653e3801e42dcae5037c0d70279b07692e3577508cb5f4943ea49c9363c3f248a85310b8bb38625427bb23f91a42d97549
7
+ data.tar.gz: 2eb0da768f4acc1b4ccb8ba3bb79f2e105853a38e87a6dbc38f6c716ca4d47ca5417c1fe9e439d3ac4371c239ff7b160e22a99ade47f469da8c1baa6eb7bf45b
@@ -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?)
@@ -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
- if opts['ignore-score-weakness']
195
- @log.debug('We ignore score weakeness...')
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
- raise CantAssert, "Score #{score.value} is too small (<#{min}): #{score.reduced(4)}" if score.value < min
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
@@ -25,7 +25,7 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.31.2'
28
+ VERSION = '0.31.3'
29
29
  PROTOCOL = 2
30
30
  REPO = 'zold-io/zold'
31
31
  end
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.2
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.2!
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