zold 0.18.3 → 0.18.4

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: 698a768b9b3f876914ba5ebdc8138b4efb44b935a7e4919570ef1c6a77acd07a
4
- data.tar.gz: a8e8bf6f982a0f94f9e4fda31e688614eb7a6621114f97b2aacfbaf8f5037e08
3
+ metadata.gz: caa27451b7402bdf03dd157ca5e95cf41178e56ca7d7e83c8269b15c758b3fa9
4
+ data.tar.gz: db13826b8a36fe66407b52b62bcaf2fb33113e1964582fb78916591c1adb429a
5
5
  SHA512:
6
- metadata.gz: 34bfc8d3fbf0d6d5bf4f42c8c23522d50bdaaa7a4b274a212906fb3acf96d0f194bd40330c4bc72c53a9af5c36cbc637c0f4d7d92058f2d26655fe3151d68f3b
7
- data.tar.gz: 700621299bcb866e6a98f89a3c777077616fd7cd9b27a94cbee87581249406c1aa8a41443d68bf1e595384163b2c9bc3311626a8d8bfc7d78dbe12f5ba53b7a9
6
+ metadata.gz: c45a552acbce84ddcdc730cf667cbc6e4cad3a8e36374b97ef05b30d6ddc2642634ee3b165b9a4af8c0e6dd37f3eabd6d794d4827fcf15a1890228a75da28e19
7
+ data.tar.gz: d1ef9b356816c1ad0a835f50694c6efc0d1cffa8c0faada91d95ab554ee6e7bc3428812befcc79a6d69da69ffd57b834213c12317f5b4d53d868089c8d2ee44c
@@ -308,7 +308,7 @@ from #{request.ip} in #{Age.new(@start, limit: 1)}")
308
308
  end
309
309
 
310
310
  get %r{/wallet/(?<id>[A-Fa-f0-9]{16})/txns.json} do
311
- fetch { |w| w.txns.map(&:to_json) }
311
+ fetch { |w| pretty(w.txns.map(&:to_json)) }
312
312
  end
313
313
 
314
314
  get %r{/wallet/(?<id>[A-Fa-f0-9]{16})\.txt} do
data/lib/zold/version.rb CHANGED
@@ -25,6 +25,6 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.18.3'
28
+ VERSION = '0.18.4'
29
29
  PROTOCOL = 2
30
30
  end
data/test/fake_home.rb CHANGED
@@ -53,11 +53,20 @@ class FakeHome
53
53
  Zold::SyncWallets.new(Zold::CachedWallets.new(Zold::Wallets.new(@dir)), log: @log)
54
54
  end
55
55
 
56
- def create_wallet(id = Zold::Id.new, dir = @dir)
56
+ def create_wallet(id = Zold::Id.new, dir = @dir, txns: 0)
57
57
  target = Zold::Wallet.new(File.join(dir, id.to_s + Zold::Wallet::EXT))
58
58
  wallets.acq(id, exclusive: true) do |w|
59
59
  w.init(id, Zold::Key.new(file: File.expand_path(File.join(__dir__, '../fixtures/id_rsa.pub'))))
60
60
  IO.write(target.path, IO.read(w.path))
61
+ txns.times do |i|
62
+ w.add(
63
+ Zold::Txn.new(
64
+ 1, Time.now,
65
+ Zold::Amount.new(zld: (i + 1).to_f),
66
+ 'NOPREFIX', Zold::Id.new, '-'
67
+ )
68
+ )
69
+ end
61
70
  end
62
71
  target
63
72
  end
@@ -144,10 +144,9 @@ class FrontTest < Zold::Test
144
144
  def test_renders_wallet_pages
145
145
  FakeHome.new(log: test_log).run do |home|
146
146
  FakeNode.new(log: test_log).run(['--ignore-score-weakness', '--standalone']) do |port|
147
- wallet = home.create_wallet
147
+ wallet = home.create_wallet(txns: 2)
148
148
  base = "http://localhost:#{port}"
149
- response = Zold::Http.new(uri: "#{base}/wallet/#{wallet.id}")
150
- .put(IO.read(wallet.path))
149
+ response = Zold::Http.new(uri: "#{base}/wallet/#{wallet.id}").put(IO.read(wallet.path))
151
150
  assert_equal(200, response.status, response.body)
152
151
  assert_equal_wait(200) { Zold::Http.new(uri: "#{base}/wallet/#{wallet.id}").get.status }
153
152
  [
data/zold.gemspec CHANGED
@@ -85,7 +85,7 @@ and suggests a different architecture for digital wallet maintenance.'
85
85
  s.add_runtime_dependency 'usagewatch_ext', '0.2.1'
86
86
  s.add_runtime_dependency 'xcop', '0.6'
87
87
  s.add_runtime_dependency 'zache', '0.4.0'
88
- s.add_runtime_dependency 'zold-score', '0.4.2'
88
+ s.add_runtime_dependency 'zold-score', '0.4.3'
89
89
  s.add_development_dependency 'codecov', '0.1.13'
90
90
  s.add_development_dependency 'minitest', '5.11.3'
91
91
  s.add_development_dependency 'minitest-fail-fast', '0.1.0'
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.18.3
4
+ version: 0.18.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -352,14 +352,14 @@ dependencies:
352
352
  requirements:
353
353
  - - '='
354
354
  - !ruby/object:Gem::Version
355
- version: 0.4.2
355
+ version: 0.4.3
356
356
  type: :runtime
357
357
  prerelease: false
358
358
  version_requirements: !ruby/object:Gem::Requirement
359
359
  requirements:
360
360
  - - '='
361
361
  - !ruby/object:Gem::Version
362
- version: 0.4.2
362
+ version: 0.4.3
363
363
  - !ruby/object:Gem::Dependency
364
364
  name: codecov
365
365
  requirement: !ruby/object:Gem::Requirement
@@ -703,7 +703,7 @@ licenses:
703
703
  - MIT
704
704
  metadata: {}
705
705
  post_install_message: |-
706
- Thanks for installing Zold 0.18.3!
706
+ Thanks for installing Zold 0.18.4!
707
707
  Study our White Paper: https://papers.zold.io/wp.pdf
708
708
  Read our blog posts: https://blog.zold.io
709
709
  Try online wallet at: https://wts.zold.io