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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c8d9ab1d922956520548b518f1174c388de2f3d7a34fa05c0ad2cbe8974a90e
4
- data.tar.gz: 95375ab61faa94f9453602a96b7b9f02d2bff5801778069031f5f275bbaeec29
3
+ metadata.gz: 13a83ec1ad275804e344e78a0aa6df69e79624c4e91572eb40855be41b0d98b2
4
+ data.tar.gz: 5514e6de26b8ffb454ca892662d86c1b05df243c2e84f9d9073aa970e060c39a
5
5
  SHA512:
6
- metadata.gz: 9b034558c8ccf930036bfabfb71b6d790ff7407aac2335b82696119ea6e244051fe98b7c8f196752ff96cb0ccdde61605c1c3f23a7c674d85a7d3f31c39b7658
7
- data.tar.gz: c6423d94323ed8cc222588c3cfdb9d3621b59620f6a60b9b5333004d0053e7678a6de1ba05c0fce7cda1c19e1657918d6552039d9a15b1d2f909cfb25836cc35
6
+ metadata.gz: 9b6816924492ecbf025c434ab248046b394b927e44777a1ccd63de7e6fda5db120520a2fa4817e0e70e7f5a61de4057facbfa0eab91242d321b13c62f1e79ae1
7
+ data.tar.gz: 9070352224a96331b615a1e67598436dfe1df2ed77d2e979b730ab4b2cc23355b4b01926339d65b0a0bfadedc0dbb441ecf0063489a6c43ebc71db6785caf7a0
@@ -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
@@ -25,7 +25,7 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.29.31'
28
+ VERSION = '0.29.32'
29
29
  PROTOCOL = 2
30
30
  REPO = 'zold-io/zold'
31
31
  end
@@ -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.31
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-09-30 00:00:00.000000000 Z
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.31!
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