zold 0.16.27 → 0.16.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/zold +19 -8
- data/fixtures/scripts/distribute-wallet.sh +1 -1
- data/fixtures/scripts/pull-on-start.sh +1 -1
- data/fixtures/scripts/push-and-pull.sh +1 -1
- data/fixtures/scripts/spread-wallets.sh +1 -1
- data/lib/zold/commands/alias.rb +4 -1
- data/lib/zold/commands/calculate.rb +4 -1
- data/lib/zold/commands/clean.rb +1 -1
- data/lib/zold/commands/create.rb +6 -3
- data/lib/zold/commands/diff.rb +4 -1
- data/lib/zold/commands/fetch.rb +4 -1
- data/lib/zold/commands/invoice.rb +4 -1
- data/lib/zold/commands/list.rb +12 -4
- data/lib/zold/commands/merge.rb +8 -1
- data/lib/zold/commands/next.rb +4 -1
- data/lib/zold/commands/node.rb +6 -3
- data/lib/zold/commands/pay.rb +4 -1
- data/lib/zold/commands/propagate.rb +4 -1
- data/lib/zold/commands/pull.rb +4 -1
- data/lib/zold/commands/push.rb +4 -1
- data/lib/zold/commands/remote.rb +6 -3
- data/lib/zold/commands/remove.rb +4 -1
- data/lib/zold/commands/routines/reconnect.rb +1 -1
- data/lib/zold/commands/routines/spread.rb +1 -1
- data/lib/zold/commands/show.rb +7 -3
- data/lib/zold/commands/taxes.rb +4 -1
- data/lib/zold/commands/thread_badge.rb +47 -0
- data/lib/zold/copies.rb +1 -1
- data/lib/zold/endless.rb +1 -1
- data/lib/zold/http.rb +3 -3
- data/lib/zold/key.rb +3 -0
- data/lib/zold/log.rb +52 -111
- data/lib/zold/metronome.rb +12 -10
- data/lib/zold/node/async_entrance.rb +2 -2
- data/lib/zold/node/entrance.rb +1 -1
- data/lib/zold/node/farm.rb +1 -1
- data/lib/zold/node/farmers.rb +1 -1
- data/lib/zold/node/front.rb +5 -5
- data/lib/zold/node/nodup_entrance.rb +1 -1
- data/lib/zold/node/spread_entrance.rb +1 -1
- data/lib/zold/node/sync_entrance.rb +1 -1
- data/lib/zold/patch.rb +2 -2
- data/lib/zold/remotes.rb +1 -1
- data/lib/zold/signature.rb +5 -1
- data/lib/zold/sync_wallets.rb +1 -1
- data/lib/zold/upgrades.rb +1 -1
- data/lib/zold/verbose_thread.rb +1 -1
- data/lib/zold/version.rb +1 -1
- data/lib/zold/version_file.rb +1 -1
- data/lib/zold/wallet.rb +2 -2
- data/resources/root.pub +14 -0
- data/test/commands/test_list.rb +2 -1
- data/test/commands/test_remote.rb +35 -4
- data/test/commands/test_show.rb +1 -1
- data/test/fake_home.rb +1 -1
- data/test/node/fake_node.rb +3 -2
- data/test/node/test_farm.rb +1 -1
- data/test/test__helper.rb +4 -3
- data/test/test_dir_items.rb +1 -1
- data/test/test_http.rb +44 -6
- data/test/test_key.rb +7 -0
- data/test/test_log.rb +12 -1
- data/test/test_remotes.rb +1 -1
- data/test/test_signature.rb +1 -0
- data/test/test_verbose_thread.rb +3 -3
- data/test/test_zold.rb +4 -3
- data/zold.gemspec +3 -2
- metadata +8 -5
data/test/test_key.rb
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
require 'minitest/autorun'
|
24
24
|
require 'tmpdir'
|
25
25
|
require 'openssl'
|
26
|
+
require_relative 'test__helper'
|
26
27
|
require_relative '../lib/zold/key'
|
27
28
|
|
28
29
|
# Key test.
|
@@ -44,6 +45,12 @@ class TestKey < Zold::Test
|
|
44
45
|
assert(key.to_pub.end_with?('Sg=='))
|
45
46
|
end
|
46
47
|
|
48
|
+
def test_reads_public_root_rsa
|
49
|
+
key = Zold::Key::ROOT
|
50
|
+
assert(key.to_pub.start_with?('MIICIjANBgkqhkiG9'))
|
51
|
+
assert(key.to_pub.end_with?('3Tp1UCAwEAAQ=='))
|
52
|
+
end
|
53
|
+
|
47
54
|
def test_signs_and_verifies
|
48
55
|
pub = Zold::Key.new(file: 'fixtures/id_rsa.pub')
|
49
56
|
pvt = Zold::Key.new(file: 'fixtures/id_rsa')
|
data/test/test_log.rb
CHANGED
@@ -32,7 +32,18 @@ require_relative '../lib/zold/log'
|
|
32
32
|
class TestLog < Zold::Test
|
33
33
|
def test_prints_from_many_threads
|
34
34
|
Threads.new(20).assert do
|
35
|
-
test_log.debug(
|
35
|
+
test_log.debug("This is debug\nand it is multi\nline")
|
36
|
+
test_log.info('This is info')
|
37
|
+
test_log.error('This is error')
|
36
38
|
end
|
37
39
|
end
|
40
|
+
|
41
|
+
def test_prints_with_various_formatters
|
42
|
+
log = Zold::Log::VERBOSE.dup
|
43
|
+
log.formatter = Zold::Log::FULL
|
44
|
+
log.debug("This is info\nand it is multi\nline")
|
45
|
+
log.debug('Works fine?')
|
46
|
+
log.debug(true)
|
47
|
+
log.debug(1)
|
48
|
+
end
|
38
49
|
end
|
data/test/test_remotes.rb
CHANGED
@@ -77,7 +77,7 @@ class TestRemotes < Zold::Test
|
|
77
77
|
remotes = Zold::Remotes.new(file: file)
|
78
78
|
ips = (0..50)
|
79
79
|
ips.each { |i| remotes.add("0.0.0.#{i}", 9999) }
|
80
|
-
remotes.iterate(Zold::Log::
|
80
|
+
remotes.iterate(Zold::Log::NULL) { raise 'Intended' }
|
81
81
|
ips.each { |i| assert(1, remotes.all[i][:errors]) }
|
82
82
|
end
|
83
83
|
end
|
data/test/test_signature.rb
CHANGED
data/test/test_verbose_thread.rb
CHANGED
@@ -31,7 +31,7 @@ require_relative '../lib/zold/verbose_thread'
|
|
31
31
|
class TestVerboseThread < Zold::Test
|
32
32
|
def test_exceptions_are_logged
|
33
33
|
assert_raises RuntimeError do
|
34
|
-
Zold::VerboseThread.new(Zold::Log::
|
34
|
+
Zold::VerboseThread.new(Zold::Log::NULL).run do
|
35
35
|
raise 'Intentional'
|
36
36
|
end
|
37
37
|
end
|
@@ -39,7 +39,7 @@ class TestVerboseThread < Zold::Test
|
|
39
39
|
|
40
40
|
def test_syntax_exceptions_are_logged
|
41
41
|
assert_raises NoMethodError do
|
42
|
-
Zold::VerboseThread.new(Zold::Log::
|
42
|
+
Zold::VerboseThread.new(Zold::Log::NULL).run do
|
43
43
|
this_method_doesnt_exist(1)
|
44
44
|
end
|
45
45
|
end
|
@@ -47,7 +47,7 @@ class TestVerboseThread < Zold::Test
|
|
47
47
|
|
48
48
|
def test_grammar_exceptions_are_logged
|
49
49
|
assert_raises NameError do
|
50
|
-
Zold::VerboseThread.new(Zold::Log::
|
50
|
+
Zold::VerboseThread.new(Zold::Log::NULL).run do
|
51
51
|
the syntax is broken here
|
52
52
|
end
|
53
53
|
end
|
data/test/test_zold.rb
CHANGED
@@ -36,7 +36,7 @@ class TestZold < Zold::Test
|
|
36
36
|
Dir.new('fixtures/scripts').select { |f| f =~ /\.sh$/ && !f.start_with?('_') }.each do |f|
|
37
37
|
define_method("test_#{f.gsub(/\.sh$/, '').gsub(/[^a-z]/, '_')}") do
|
38
38
|
start = Time.now
|
39
|
-
test_log.
|
39
|
+
test_log.info("\n\n#{f} running...")
|
40
40
|
Dir.mktmpdir do |dir|
|
41
41
|
FileUtils.cp('fixtures/id_rsa.pub', dir)
|
42
42
|
FileUtils.cp('fixtures/id_rsa', dir)
|
@@ -49,7 +49,7 @@ class TestZold < Zold::Test
|
|
49
49
|
stdin.close
|
50
50
|
until stdout.eof?
|
51
51
|
line = stdout.gets
|
52
|
-
test_log.
|
52
|
+
test_log.info(line)
|
53
53
|
out << line
|
54
54
|
end
|
55
55
|
code = thr.value.to_i
|
@@ -57,7 +57,8 @@ class TestZold < Zold::Test
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
60
|
-
test_log.
|
60
|
+
test_log.info("\n\n#{f} done in #{Zold::Age.new(start)}")
|
61
|
+
sleep 1
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
data/zold.gemspec
CHANGED
@@ -54,7 +54,8 @@ and suggests a different architecture for digital wallet maintenance.'
|
|
54
54
|
Read our blog posts: https://blog.zold.io
|
55
55
|
Try online wallet at: https://wts.zold.io
|
56
56
|
Stay in touch with the community: https://t.me/zold_io
|
57
|
-
Follow us on Twitter: https://twitter.com/0crat
|
57
|
+
Follow us on Twitter: https://twitter.com/0crat
|
58
|
+
If you have any issues, report to our GitHub repo: https://github.com/zold-io/zold"
|
58
59
|
s.files = `git ls-files`.split($RS)
|
59
60
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
60
61
|
s.test_files = s.files.grep(%r{^(test|features)/})
|
@@ -64,7 +65,7 @@ and suggests a different architecture for digital wallet maintenance.'
|
|
64
65
|
s.add_runtime_dependency 'concurrent-ruby', '1.1.2'
|
65
66
|
s.add_runtime_dependency 'cucumber', '3.1.2' # has to stay here for Heroku
|
66
67
|
s.add_runtime_dependency 'diffy', '3.2.1'
|
67
|
-
s.add_runtime_dependency 'futex', '0.4.
|
68
|
+
s.add_runtime_dependency 'futex', '0.4.2'
|
68
69
|
s.add_runtime_dependency 'get_process_mem', '0.2.3'
|
69
70
|
s.add_runtime_dependency 'json', '2.1.0'
|
70
71
|
s.add_runtime_dependency 'memory_profiler', '0.9.12'
|
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.16.
|
4
|
+
version: 0.16.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.4.
|
75
|
+
version: 0.4.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.4.
|
82
|
+
version: 0.4.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: get_process_mem
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -580,6 +580,7 @@ files:
|
|
580
580
|
- lib/zold/commands/routines/spread.rb
|
581
581
|
- lib/zold/commands/show.rb
|
582
582
|
- lib/zold/commands/taxes.rb
|
583
|
+
- lib/zold/commands/thread_badge.rb
|
583
584
|
- lib/zold/copies.rb
|
584
585
|
- lib/zold/dir_items.rb
|
585
586
|
- lib/zold/endless.rb
|
@@ -621,6 +622,7 @@ files:
|
|
621
622
|
- lib/zold/wallet.rb
|
622
623
|
- lib/zold/wallets.rb
|
623
624
|
- resources/remotes
|
625
|
+
- resources/root.pub
|
624
626
|
- test/commands/routines/test_reconnect.rb
|
625
627
|
- test/commands/routines/test_spread.rb
|
626
628
|
- test/commands/test_alias.rb
|
@@ -695,12 +697,13 @@ licenses:
|
|
695
697
|
- MIT
|
696
698
|
metadata: {}
|
697
699
|
post_install_message: |-
|
698
|
-
Thanks for installing Zold 0.16.
|
700
|
+
Thanks for installing Zold 0.16.28!
|
699
701
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
700
702
|
Read our blog posts: https://blog.zold.io
|
701
703
|
Try online wallet at: https://wts.zold.io
|
702
704
|
Stay in touch with the community: https://t.me/zold_io
|
703
705
|
Follow us on Twitter: https://twitter.com/0crat
|
706
|
+
If you have any issues, report to our GitHub repo: https://github.com/zold-io/zold
|
704
707
|
rdoc_options:
|
705
708
|
- "--charset=UTF-8"
|
706
709
|
require_paths:
|