zold 0.4.3 → 0.4.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/commands/node.rb +4 -0
- data/lib/zold/commands/push.rb +5 -1
- data/lib/zold/node/front.rb +2 -3
- data/lib/zold/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 148ca4cd62aba20f6f36418633367a7e40507ba8
|
4
|
+
data.tar.gz: a3f2c6133d23487bacb37b4ba9dddaf4a1035d2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e53c293c80ad8ac94f4270f2cb6501265c7bade6fa2b98e0bf55c4c8da1982c50a149736ce357c781379b0fc61dcbaf50a46edaa1929517abeeff24682f476
|
7
|
+
data.tar.gz: 16fe75629039be9c7ea748891900788a37a317fc64d800b29abd263bfeabf60547c081638a9a1276594a2573b43e6568466c0204d71a284cc2ea32b0260fb73c
|
data/lib/zold/commands/node.rb
CHANGED
data/lib/zold/commands/push.rb
CHANGED
@@ -60,7 +60,11 @@ Available options:"
|
|
60
60
|
@remotes.all.each do |r|
|
61
61
|
uri = URI("#{r[:home]}wallet/#{wallet.id}")
|
62
62
|
response = Http.new(uri).put(File.read(wallet.path))
|
63
|
-
if response.code
|
63
|
+
if response.code == '304'
|
64
|
+
@log.info("#{uri}: same version there")
|
65
|
+
next
|
66
|
+
end
|
67
|
+
unless response.code == '200'
|
64
68
|
@log.error("#{uri} failed as #{response.code}/#{response.message}")
|
65
69
|
next
|
66
70
|
end
|
data/lib/zold/node/front.rb
CHANGED
@@ -110,9 +110,7 @@ module Zold
|
|
110
110
|
body = request.body.read
|
111
111
|
if wallet.exists? && File.read(wallet.path) == body
|
112
112
|
status 304
|
113
|
-
return
|
114
|
-
version: VERSION, score: score.to_h
|
115
|
-
)
|
113
|
+
return
|
116
114
|
end
|
117
115
|
cps = copies(id)
|
118
116
|
cps.add(body, 'remote', Remotes::PORT, 0)
|
@@ -127,6 +125,7 @@ module Zold
|
|
127
125
|
log: settings.log
|
128
126
|
).run([id.to_s])
|
129
127
|
cps.remove('remote', Remotes::PORT)
|
128
|
+
require_relative '../commands/push'
|
130
129
|
modified.each do |m|
|
131
130
|
Zold::Push.new(
|
132
131
|
wallets: wallets, remotes: settings.remotes,
|
data/lib/zold/version.rb
CHANGED