zold 0.23.1 → 0.23.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fixtures/scripts/push-and-pull.sh +2 -0
- data/lib/zold/commands/rebase.rb +2 -1
- data/lib/zold/version.rb +1 -1
- data/test/commands/test_rebase.rb +4 -0
- 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: 80fd01894077496778a2d3822bfc7769d0c4131624451c8c7b78eaab893d9f91
|
4
|
+
data.tar.gz: 3f37c9fd37e3f90441924e2007108407185b195e2a70c065a2bb03ae4dde019f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a8a94e45d6887cebdba5290d87d4f453076b9c950528b5e8ed10de4bdd5a66ae670e784eab926adbfe481a78e157857d963b86218ede7a03c92693d50871c8b
|
7
|
+
data.tar.gz: fffd910f78c3de62a67f88e41e3a11c7c3042897949e482949bbc5e98851cd3fe5bda0335433840fc69effe6d270c2a5a2d4aae126060345ce24aad448b9af88
|
data/lib/zold/commands/rebase.rb
CHANGED
@@ -64,11 +64,12 @@ Available options:"
|
|
64
64
|
def rebase(id, _)
|
65
65
|
start = Time.now
|
66
66
|
patch = Patch.new(@wallets, log: @log)
|
67
|
-
@wallets.acq(id) do |wallet|
|
67
|
+
@wallets.acq(id, exclusive: true) do |wallet|
|
68
68
|
patch.join(wallet) do |txn|
|
69
69
|
@log.debug("Paying wallet #{txn.bnf} file is absent: #{txn.to_text}")
|
70
70
|
false
|
71
71
|
end
|
72
|
+
patch.save(wallet.path, overwrite: true)
|
72
73
|
@log.debug("Wallet #{wallet.mnemo} rebased in #{Age.new(start)}")
|
73
74
|
end
|
74
75
|
end
|
data/lib/zold/version.rb
CHANGED
@@ -25,6 +25,7 @@ require 'tmpdir'
|
|
25
25
|
require_relative '../test__helper'
|
26
26
|
require_relative '../fake_home'
|
27
27
|
require_relative '../../lib/zold/commands/rebase'
|
28
|
+
require_relative '../../lib/zold/commands/pay'
|
28
29
|
|
29
30
|
# REBASE test.
|
30
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
@@ -34,6 +35,9 @@ class TestRebase < Zold::Test
|
|
34
35
|
def test_rebases_wallet
|
35
36
|
FakeHome.new(log: test_log).run do |home|
|
36
37
|
wallet = home.create_wallet
|
38
|
+
Zold::Pay.new(wallets: home.wallets, copies: home.dir, remotes: home.remotes, log: test_log).run(
|
39
|
+
['pay', wallet.id.to_s, "NOPREFIX@#{Zold::Id.new}", '14.95', '--force', '--private-key=fixtures/id_rsa']
|
40
|
+
)
|
37
41
|
Zold::Rebase.new(wallets: home.wallets, log: test_log).run(
|
38
42
|
['rebase', wallet.id.to_s]
|
39
43
|
)
|
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.23.
|
4
|
+
version: 0.23.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -753,7 +753,7 @@ licenses:
|
|
753
753
|
- MIT
|
754
754
|
metadata: {}
|
755
755
|
post_install_message: |-
|
756
|
-
Thanks for installing Zold 0.23.
|
756
|
+
Thanks for installing Zold 0.23.2!
|
757
757
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
758
758
|
Read our blog posts: https://blog.zold.io
|
759
759
|
Try ZLD online wallet at: https://wts.zold.io
|