zold 0.29.31 → 0.29.32
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 +13 -0
- data/lib/zold/version.rb +1 -1
- data/test/node/test_front.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13a83ec1ad275804e344e78a0aa6df69e79624c4e91572eb40855be41b0d98b2
|
4
|
+
data.tar.gz: 5514e6de26b8ffb454ca892662d86c1b05df243c2e84f9d9073aa970e060c39a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b6816924492ecbf025c434ab248046b394b927e44777a1ccd63de7e6fda5db120520a2fa4817e0e70e7f5a61de4057facbfa0eab91242d321b13c62f1e79ae1
|
7
|
+
data.tar.gz: 9070352224a96331b615a1e67598436dfe1df2ed77d2e979b730ab4b2cc23355b4b01926339d65b0a0bfadedc0dbb441ecf0063489a6c43ebc71db6785caf7a0
|
data/lib/zold/node/front.rb
CHANGED
@@ -27,6 +27,7 @@ require 'thin'
|
|
27
27
|
require 'haml'
|
28
28
|
require 'shellwords'
|
29
29
|
require 'json'
|
30
|
+
require 'digest'
|
30
31
|
require 'sinatra/base'
|
31
32
|
require 'concurrent'
|
32
33
|
require 'backtrace'
|
@@ -210,6 +211,7 @@ from #{request.ip} in #{Age.new(@start, limit: 1)}")
|
|
210
211
|
score: score.to_h,
|
211
212
|
pid: Process.pid,
|
212
213
|
processes: processes_count,
|
214
|
+
checksum: checksum,
|
213
215
|
cpus: settings.zache.get(:cpus) do
|
214
216
|
Concurrent.processor_count
|
215
217
|
end,
|
@@ -543,6 +545,17 @@ time to stop; use --skip-oom to never quit")
|
|
543
545
|
end
|
544
546
|
end
|
545
547
|
|
548
|
+
def checksum
|
549
|
+
settings.zache.get(:checksum, lifetime: settings.opts['no-cache'] ? 0 : 60) do
|
550
|
+
Digest::MD5.hexdigest(
|
551
|
+
Dir[File.join(__dir__, '../**/*')]
|
552
|
+
.reject { |f| File.directory?(f) }
|
553
|
+
.map { |f| File.read(f) }
|
554
|
+
.join
|
555
|
+
)
|
556
|
+
end
|
557
|
+
end
|
558
|
+
|
546
559
|
def all_remotes
|
547
560
|
settings.zache.get(:remotes, lifetime: settings.opts['no-cache'] ? 0 : 60) do
|
548
561
|
settings.remotes.all
|
data/lib/zold/version.rb
CHANGED
data/test/node/test_front.rb
CHANGED
@@ -379,6 +379,17 @@ class FrontTest < Zold::Test
|
|
379
379
|
end
|
380
380
|
end
|
381
381
|
|
382
|
+
def test_checksum_in_json
|
383
|
+
FakeNode.new(log: test_log).run(opts) do |port|
|
384
|
+
uri = URI("http://localhost:#{port}/")
|
385
|
+
response = Zold::Http.new(uri: uri).get
|
386
|
+
assert(
|
387
|
+
Zold::JsonPage.new(response.body).to_hash.key?('checksum'),
|
388
|
+
response.body
|
389
|
+
)
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
382
393
|
private
|
383
394
|
|
384
395
|
def opts(*extra)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.29.
|
4
|
+
version: 0.29.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|
@@ -827,7 +827,7 @@ licenses:
|
|
827
827
|
- MIT
|
828
828
|
metadata: {}
|
829
829
|
post_install_message: |-
|
830
|
-
Thanks for installing Zold 0.29.
|
830
|
+
Thanks for installing Zold 0.29.32!
|
831
831
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
832
832
|
Read our blog posts: https://blog.zold.io
|
833
833
|
Try ZLD online wallet at: https://wts.zold.io
|