zold 0.14.6 → 0.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe27c493a3594f3ad04a4d024d87c918c54a27c5
4
- data.tar.gz: b862fc9b4598e823f994c8705407c66895a5f41a
3
+ metadata.gz: fe5dfb0c10d55bd3baccfdeb9fcdf48fa2c71b5f
4
+ data.tar.gz: 72eb0acf988ec8e6e58eb7e9f341c286ab7c5732
5
5
  SHA512:
6
- metadata.gz: 4ad796318f03c00a569968618259c56e366dd4ef142a3aea108a143085aa84b4f7a4280079db4d4434bf7eb40742ca56f8417628cbeef461b5749cc7add113a4
7
- data.tar.gz: 3f48555b78d03a02664637dfee238e970e764844993341c6c1ed6521a212d285729366f8c73b9a32b23b6eb14c76ac0da9eb5f1701c1b260f5b2ca206058a7f4
6
+ metadata.gz: a0c43f1bbf63ac32f535b2d3f5b5bb84b851395ef9445ea311fa2eda9467f4aae101862ab326fd90f1bac7e7fcd90eafa23f324502efeffa12647a7ebe49d19c
7
+ data.tar.gz: 44fac93b3e27a4f3687d06fe4b2e6097503abbda9d280a392fd47c1b38a46d43a64ed505eab526ebb60cf36ddd1ae0333a7d1ef0c9666cc04bb3c697437e523a
data/.simplecov CHANGED
@@ -35,6 +35,6 @@ else
35
35
  SimpleCov.start do
36
36
  add_filter "/test/"
37
37
  add_filter "/features/"
38
- minimum_coverage 30
38
+ # minimum_coverage 30
39
39
  end
40
40
  end
@@ -61,10 +61,10 @@ module Zold
61
61
  wallet = Wallet.new(f.path)
62
62
  wallet.refurbish
63
63
  unless wallet.protocol == Zold::PROTOCOL
64
- raise "The protocol mismatch, the wallet is in '#{wallet.protocol}', we are in '#{Zold::PROTOCOL}'"
64
+ raise "Protocol mismatch, #{wallet.id} is in '#{wallet.protocol}', we are in '#{Zold::PROTOCOL}'"
65
65
  end
66
66
  unless wallet.network == @network
67
- raise "The network name mismatch, the wallet is in '#{wallet.network}', we are in '#{@network}'"
67
+ raise "Network name mismatch, #{wallet.id} is in '#{wallet.network}', we are in '#{@network}'"
68
68
  end
69
69
  balance = wallet.balance
70
70
  if balance.negative? && !wallet.root?
@@ -94,12 +94,14 @@ module Zold
94
94
  end
95
95
 
96
96
  def push(id, body)
97
- @entrance.push(id, body).each do |m|
97
+ mods = @entrance.push(id, body)
98
+ (mods + [id]).each do |m|
98
99
  next if @seen.include?(m)
99
100
  @seen << m
100
101
  @modified.push(m)
101
102
  @log.debug("Push scheduled for #{m}, queue size is #{@modified.size}")
102
103
  end
104
+ mods
103
105
  end
104
106
  end
105
107
  end
@@ -23,6 +23,6 @@
23
23
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Zold
26
- VERSION = '0.14.6'.freeze
26
+ VERSION = '0.14.7'.freeze
27
27
  PROTOCOL = 2
28
28
  end
@@ -52,7 +52,7 @@ class TestSpreadEntrance < Minitest::Test
52
52
  remotes.add('localhost', port)
53
53
  Zold::SpreadEntrance.new(FakeEntrance.new, home.wallets, remotes, 'x', log: test_log).start do |e|
54
54
  8.times { e.push(wallet.id, File.read(wallet.path)) }
55
- assert(e.to_json[:modified] < 2)
55
+ assert(e.to_json[:modified] < 2, "It's too big: #{e.to_json[:modified]}")
56
56
  end
57
57
  end
58
58
  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.14.6
4
+ version: 0.14.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko