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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b4f5a9cc3330167fe47b5f4dcb6fff51215a81d94439ffdbe159065295e378d
4
- data.tar.gz: dd61f0f4467050adb2240bbafa682b4f9bda1c0580e02537b768387f06b52097
3
+ metadata.gz: 80fd01894077496778a2d3822bfc7769d0c4131624451c8c7b78eaab893d9f91
4
+ data.tar.gz: 3f37c9fd37e3f90441924e2007108407185b195e2a70c065a2bb03ae4dde019f
5
5
  SHA512:
6
- metadata.gz: dc5a1f8a43116d52968671c0429d9d9e2de264528b380cb9070dccc5a565a8413870e68b62a7f8bb1c84e77aa646e99c0da37727cdc6632a4b6d3b14c4c2ba64
7
- data.tar.gz: 5f82cc14d56c47c726c30b628f77407e1feed795e194bb6c364d4642d8226f6dc59d2286bac185b894f41cd46ff3fc52bde586d3eed943ef1f6e73563d009181
6
+ metadata.gz: 3a8a94e45d6887cebdba5290d87d4f453076b9c950528b5e8ed10de4bdd5a66ae670e784eab926adbfe481a78e157857d963b86218ede7a03c92693d50871c8b
7
+ data.tar.gz: fffd910f78c3de62a67f88e41e3a11c7c3042897949e482949bbc5e98851cd3fe5bda0335433840fc69effe6d270c2a5a2d4aae126060345ce24aad448b9af88
@@ -39,6 +39,8 @@ zold fetch --tolerate-edges --tolerate-quorum=1
39
39
  zold diff 0000000000000000
40
40
  zold merge
41
41
  zold merge 0000000000000000
42
+ zold rebase
43
+ zold rebase 0000000000000000
42
44
  zold clean
43
45
  zold clean 0000000000000000
44
46
  zold remove
@@ -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
@@ -25,7 +25,7 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.23.1'
28
+ VERSION = '0.23.2'
29
29
  PROTOCOL = 2
30
30
  REPO = 'zold-io/zold'
31
31
  end
@@ -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.1
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.1!
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