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 +4 -4
- data/lib/zold/node/front.rb +1 -1
- data/lib/zold/version.rb +1 -1
- data/test/fake_home.rb +10 -1
- data/test/node/test_front.rb +2 -3
- data/zold.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caa27451b7402bdf03dd157ca5e95cf41178e56ca7d7e83c8269b15c758b3fa9
|
4
|
+
data.tar.gz: db13826b8a36fe66407b52b62bcaf2fb33113e1964582fb78916591c1adb429a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c45a552acbce84ddcdc730cf667cbc6e4cad3a8e36374b97ef05b30d6ddc2642634ee3b165b9a4af8c0e6dd37f3eabd6d794d4827fcf15a1890228a75da28e19
|
7
|
+
data.tar.gz: d1ef9b356816c1ad0a835f50694c6efc0d1cffa8c0faada91d95ab554ee6e7bc3428812befcc79a6d69da69ffd57b834213c12317f5b4d53d868089c8d2ee44c
|
data/lib/zold/node/front.rb
CHANGED
@@ -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
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
|
data/test/node/test_front.rb
CHANGED
@@ -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.
|
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.
|
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.
|
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.
|
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.
|
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
|