zold 0.31.7 → 0.31.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.0pdd.yml +20 -0
- data/.github/workflows/actionlint.yml +41 -0
- data/.github/workflows/codecov.yml +23 -4
- data/.github/workflows/copyrights.yml +30 -0
- data/.github/workflows/pdd.yml +26 -3
- data/.github/workflows/rake.yml +24 -2
- data/.github/workflows/xcop.yml +21 -2
- data/.github/workflows/yamllint.yml +34 -0
- data/.gitignore +2 -1
- data/.rubocop.yml +22 -1
- data/.ruby-version +1 -1
- data/.rultor.yml +35 -5
- data/.simplecov +1 -1
- data/Dockerfile +29 -3
- data/Gemfile +10 -10
- data/Gemfile.lock +340 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +9 -12
- data/bin/zold +1 -1
- data/cucumber.yml +20 -0
- data/deploy.sh +20 -0
- data/features/step_definitions/steps.rb +1 -1
- data/features/support/env.rb +1 -1
- data/fixtures/merge/asserts.rb +1 -1
- data/fixtures/merge/into_no_wallet/assert.rb +1 -1
- data/fixtures/merge/legacy_negatives_stay/assert.rb +1 -1
- data/fixtures/merge/missed_wallets/assert.rb +1 -1
- data/fixtures/merge/negative_overwriting/assert.rb +1 -1
- data/fixtures/merge/negatives_in_between/assert.rb +1 -1
- data/fixtures/merge/random_expenses/assert.rb +1 -1
- data/fixtures/merge/simple_case/assert.rb +1 -1
- data/fixtures/merge/unconfirmed_income/assert.rb +1 -1
- data/fixtures/scripts/_head.sh +21 -1
- data/fixtures/scripts/calculate-scores.sh +19 -0
- data/fixtures/scripts/distribute-wallet.sh +19 -0
- data/fixtures/scripts/print-helps.sh +19 -0
- data/fixtures/scripts/pull-on-start.sh +19 -0
- data/fixtures/scripts/push-and-pull.sh +19 -0
- data/fixtures/scripts/redeploy-on-upgrade.sh +19 -0
- data/fixtures/scripts/spread-wallets.sh +19 -0
- data/lib/zold/age.rb +2 -2
- data/lib/zold/amount.rb +2 -2
- data/lib/zold/cached_wallets.rb +3 -3
- data/lib/zold/commands/alias.rb +20 -0
- data/lib/zold/commands/args.rb +2 -2
- data/lib/zold/commands/calculate.rb +2 -2
- data/lib/zold/commands/clean.rb +2 -2
- data/lib/zold/commands/create.rb +3 -2
- data/lib/zold/commands/diff.rb +2 -2
- data/lib/zold/commands/fetch.rb +2 -2
- data/lib/zold/commands/invoice.rb +2 -2
- data/lib/zold/commands/list.rb +2 -2
- data/lib/zold/commands/merge.rb +2 -2
- data/lib/zold/commands/next.rb +2 -2
- data/lib/zold/commands/node.rb +2 -2
- data/lib/zold/commands/pay.rb +2 -2
- data/lib/zold/commands/propagate.rb +2 -2
- data/lib/zold/commands/pull.rb +2 -2
- data/lib/zold/commands/push.rb +2 -2
- data/lib/zold/commands/remote.rb +2 -2
- data/lib/zold/commands/remove.rb +2 -2
- data/lib/zold/commands/routines/audit.rb +2 -2
- data/lib/zold/commands/routines/gc.rb +2 -2
- data/lib/zold/commands/routines/reconcile.rb +2 -2
- data/lib/zold/commands/routines/reconnect.rb +2 -2
- data/lib/zold/commands/routines/retire.rb +2 -2
- data/lib/zold/commands/routines/spread.rb +2 -2
- data/lib/zold/commands/routines.rb +2 -2
- data/lib/zold/commands/show.rb +2 -2
- data/lib/zold/commands/taxes.rb +2 -2
- data/lib/zold/commands/thread_badge.rb +3 -3
- data/lib/zold/copies.rb +2 -2
- data/lib/zold/dir_items.rb +2 -2
- data/lib/zold/endless.rb +2 -2
- data/lib/zold/gem.rb +2 -2
- data/lib/zold/hands.rb +2 -2
- data/lib/zold/head.rb +3 -3
- data/lib/zold/hexnum.rb +2 -2
- data/lib/zold/http.rb +3 -3
- data/lib/zold/hungry_wallets.rb +2 -2
- data/lib/zold/id.rb +4 -3
- data/lib/zold/json_page.rb +2 -2
- data/lib/zold/key.rb +2 -2
- data/lib/zold/log.rb +2 -2
- data/lib/zold/metronome.rb +2 -2
- data/lib/zold/node/async_entrance.rb +2 -2
- data/lib/zold/node/entrance.rb +2 -2
- data/lib/zold/node/farm.rb +2 -2
- data/lib/zold/node/farmers.rb +2 -2
- data/lib/zold/node/front.rb +3 -3
- data/lib/zold/node/journaled_pipeline.rb +2 -2
- data/lib/zold/node/nodup_entrance.rb +2 -2
- data/lib/zold/node/nospam_entrance.rb +2 -2
- data/lib/zold/node/pipeline.rb +2 -2
- data/lib/zold/node/safe_entrance.rb +2 -2
- data/lib/zold/node/soft_error.rb +2 -2
- data/lib/zold/node/spread_entrance.rb +2 -2
- data/lib/zold/node/sync_entrance.rb +2 -2
- data/lib/zold/node/trace.rb +2 -2
- data/lib/zold/patch.rb +2 -2
- data/lib/zold/prefixes.rb +2 -2
- data/lib/zold/remotes.rb +2 -2
- data/lib/zold/signature.rb +2 -2
- data/lib/zold/size.rb +2 -2
- data/lib/zold/sync_wallets.rb +2 -2
- data/lib/zold/tax.rb +2 -2
- data/lib/zold/thread_pool.rb +2 -2
- data/lib/zold/tree_wallets.rb +2 -2
- data/lib/zold/txn.rb +2 -2
- data/lib/zold/txns.rb +3 -3
- data/lib/zold/upgrades.rb +1 -1
- data/lib/zold/verbose_thread.rb +2 -2
- data/lib/zold/version.rb +3 -3
- data/lib/zold/version_file.rb +1 -1
- data/lib/zold/wallet.rb +2 -2
- data/lib/zold/wallets.rb +2 -2
- data/lib/zold.rb +2 -2
- data/test/commands/routines/test_audit.rb +4 -4
- data/test/commands/routines/test_gc.rb +8 -8
- data/test/commands/routines/test_reconcile.rb +4 -4
- data/test/commands/routines/test_reconnect.rb +3 -3
- data/test/commands/routines/test_retire.rb +3 -3
- data/test/commands/test_alias.rb +26 -6
- data/test/commands/test_calculate.rb +3 -3
- data/test/commands/test_clean.rb +10 -10
- data/test/commands/test_create.rb +3 -3
- data/test/commands/test_diff.rb +5 -5
- data/test/commands/test_fetch.rb +9 -9
- data/test/commands/test_invoice.rb +3 -3
- data/test/commands/test_list.rb +3 -3
- data/test/commands/test_merge.rb +12 -12
- data/test/commands/test_node.rb +6 -6
- data/test/commands/test_pay.rb +19 -19
- data/test/commands/test_propagate.rb +5 -5
- data/test/commands/test_pull.rb +6 -6
- data/test/commands/test_push.rb +9 -9
- data/test/commands/test_remote.rb +11 -11
- data/test/commands/test_remove.rb +10 -10
- data/test/commands/test_show.rb +3 -3
- data/test/commands/test_taxes.rb +4 -4
- data/test/fake_home.rb +2 -2
- data/test/node/fake_entrance.rb +2 -2
- data/test/node/fake_node.rb +57 -40
- data/test/node/test_async_entrance.rb +10 -10
- data/test/node/test_entrance.rb +8 -8
- data/test/node/test_farm.rb +11 -11
- data/test/node/test_farmers.rb +5 -5
- data/test/node/test_front.rb +29 -28
- data/test/node/test_nodup_entrance.rb +4 -4
- data/test/node/test_nospam_entrance.rb +3 -3
- data/test/node/test_safe_entrance.rb +4 -4
- data/test/node/test_spread_entrance.rb +8 -8
- data/test/node/test_sync_entrance.rb +4 -4
- data/test/node/test_trace.rb +2 -2
- data/test/test__helper.rb +4 -4
- data/test/test_age.rb +2 -2
- data/test/test_amount.rb +2 -2
- data/test/test_cached_wallets.rb +2 -2
- data/test/test_copies.rb +12 -12
- data/test/test_dir_items.rb +4 -4
- data/test/test_gem.rb +20 -0
- data/test/test_hands.rb +2 -2
- data/test/test_hexnum.rb +2 -2
- data/test/test_http.rb +8 -8
- data/test/test_hungry_wallets.rb +11 -11
- data/test/test_id.rb +11 -2
- data/test/test_json_page.rb +2 -2
- data/test/test_key.rb +2 -2
- data/test/test_log.rb +5 -5
- data/test/test_metronome.rb +6 -6
- data/test/test_patch.rb +14 -14
- data/test/test_prefixes.rb +3 -3
- data/test/test_remotes.rb +9 -9
- data/test/test_signature.rb +2 -2
- data/test/test_size.rb +2 -2
- data/test/test_sync_wallets.rb +3 -3
- data/test/test_tax.rb +9 -9
- data/test/test_thread_pool.rb +8 -8
- data/test/test_tree_wallets.rb +2 -2
- data/test/test_txn.rb +2 -2
- data/test/test_upgrades.rb +2 -2
- data/test/test_verbose_thread.rb +2 -2
- data/test/test_version.rb +20 -0
- data/test/test_wallet.rb +22 -22
- data/test/test_wallets.rb +5 -5
- data/test/test_zold.rb +5 -5
- data/test/upgrades/test_delete_banned_wallets.rb +4 -4
- data/test/upgrades/test_protocol_up.rb +4 -4
- data/upgrades/2.rb +1 -1
- data/upgrades/delete_banned_wallets.rb +1 -1
- data/upgrades/move_wallets_into_tree.rb +1 -1
- data/upgrades/protocol_up.rb +1 -1
- data/upgrades/rename_foreign_wallets.rb +1 -1
- data/zold.gemspec +23 -23
- metadata +7 -3
data/test/test_wallet.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -35,11 +35,11 @@ require_relative '../lib/zold/commands/pay'
|
|
35
35
|
|
36
36
|
# Wallet test.
|
37
37
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
38
|
-
# Copyright:: Copyright (c) 2018
|
38
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
39
39
|
# License:: MIT
|
40
40
|
class TestWallet < Zold::Test
|
41
41
|
def test_reads_empty_wallet
|
42
|
-
FakeHome.new(log:
|
42
|
+
FakeHome.new(log: fake_log).run do |home|
|
43
43
|
wallet = home.create_wallet
|
44
44
|
assert(wallet.txns.empty?)
|
45
45
|
assert_equal(Zold::Amount::ZERO, wallet.balance)
|
@@ -47,7 +47,7 @@ class TestWallet < Zold::Test
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_generates_memo
|
50
|
-
FakeHome.new(log:
|
50
|
+
FakeHome.new(log: fake_log).run do |home|
|
51
51
|
wallet = home.create_wallet
|
52
52
|
assert(!wallet.mnemo.nil?)
|
53
53
|
end
|
@@ -55,7 +55,7 @@ class TestWallet < Zold::Test
|
|
55
55
|
|
56
56
|
def test_reads_large_wallet
|
57
57
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
58
|
-
FakeHome.new(log:
|
58
|
+
FakeHome.new(log: fake_log).run do |home|
|
59
59
|
wallet = home.create_wallet(Zold::Id.new('448b451bc62e8e16'))
|
60
60
|
FileUtils.cp('fixtures/448b451bc62e8e16.z', wallet.path)
|
61
61
|
start = Time.now
|
@@ -67,7 +67,7 @@ class TestWallet < Zold::Test
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def test_adds_transaction
|
70
|
-
FakeHome.new(log:
|
70
|
+
FakeHome.new(log: fake_log).run do |home|
|
71
71
|
wallet = home.create_wallet
|
72
72
|
amount = Zold::Amount.new(zld: 39.99)
|
73
73
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
@@ -82,7 +82,7 @@ class TestWallet < Zold::Test
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def test_adds_similar_transaction
|
85
|
-
FakeHome.new(log:
|
85
|
+
FakeHome.new(log: fake_log).run do |home|
|
86
86
|
wallet = home.create_wallet
|
87
87
|
amount = Zold::Amount.new(zld: 39.99)
|
88
88
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
@@ -100,7 +100,7 @@ class TestWallet < Zold::Test
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def test_checks_similar_transaction
|
103
|
-
FakeHome.new(log:
|
103
|
+
FakeHome.new(log: fake_log).run do |home|
|
104
104
|
wallet = home.create_wallet
|
105
105
|
amount = Zold::Amount.new(zld: 39.99)
|
106
106
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
@@ -113,7 +113,7 @@ class TestWallet < Zold::Test
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def test_refurbishes_wallet
|
116
|
-
FakeHome.new(log:
|
116
|
+
FakeHome.new(log: fake_log).run do |home|
|
117
117
|
wallet = home.create_wallet
|
118
118
|
amount = Zold::Amount.new(zld: 5.99)
|
119
119
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
@@ -128,7 +128,7 @@ class TestWallet < Zold::Test
|
|
128
128
|
end
|
129
129
|
|
130
130
|
def test_refurbishes_empty_wallet
|
131
|
-
FakeHome.new(log:
|
131
|
+
FakeHome.new(log: fake_log).run do |home|
|
132
132
|
wallet = home.create_wallet
|
133
133
|
before = File.read(wallet.path)
|
134
134
|
File.write(wallet.path, "#{File.read(wallet.path)}\n\n\n")
|
@@ -138,7 +138,7 @@ class TestWallet < Zold::Test
|
|
138
138
|
end
|
139
139
|
|
140
140
|
def test_positive_transactions_go_first
|
141
|
-
FakeHome.new(log:
|
141
|
+
FakeHome.new(log: fake_log).run do |home|
|
142
142
|
wallet = home.create_wallet
|
143
143
|
time = Time.now
|
144
144
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
@@ -151,7 +151,7 @@ class TestWallet < Zold::Test
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def test_validate_key_on_payment
|
154
|
-
FakeHome.new(log:
|
154
|
+
FakeHome.new(log: fake_log).run do |home|
|
155
155
|
wallet = home.create_wallet
|
156
156
|
amount = Zold::Amount.new(zld: 39.99)
|
157
157
|
key = Zold::Key.new(file: 'fixtures/id_rsa-2')
|
@@ -162,7 +162,7 @@ class TestWallet < Zold::Test
|
|
162
162
|
end
|
163
163
|
|
164
164
|
def test_adds_transaction_and_reads_back
|
165
|
-
FakeHome.new(log:
|
165
|
+
FakeHome.new(log: fake_log).run do |home|
|
166
166
|
wallet = home.create_wallet
|
167
167
|
amount = Zold::Amount.new(zld: 39.99)
|
168
168
|
key = Zold::Key.new(file: 'fixtures/id_rsa')
|
@@ -173,7 +173,7 @@ class TestWallet < Zold::Test
|
|
173
173
|
end
|
174
174
|
|
175
175
|
def test_calculates_wallet_age_in_hours
|
176
|
-
FakeHome.new(log:
|
176
|
+
FakeHome.new(log: fake_log).run do |home|
|
177
177
|
wallet = home.create_wallet
|
178
178
|
hours = 100
|
179
179
|
wallet.add(
|
@@ -189,7 +189,7 @@ class TestWallet < Zold::Test
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def test_flushes_and_reads_again
|
192
|
-
FakeHome.new(log:
|
192
|
+
FakeHome.new(log: fake_log).run do |home|
|
193
193
|
wallet = home.create_wallet
|
194
194
|
wallet.add(
|
195
195
|
Zold::Txn.new(
|
@@ -208,14 +208,14 @@ class TestWallet < Zold::Test
|
|
208
208
|
end
|
209
209
|
|
210
210
|
def test_returns_modified_time
|
211
|
-
FakeHome.new(log:
|
211
|
+
FakeHome.new(log: fake_log).run do |home|
|
212
212
|
wallet = home.create_wallet
|
213
213
|
assert(wallet.mtime > Time.now - (60 * 60))
|
214
214
|
end
|
215
215
|
end
|
216
216
|
|
217
217
|
def test_returns_digest
|
218
|
-
FakeHome.new(log:
|
218
|
+
FakeHome.new(log: fake_log).run do |home|
|
219
219
|
wallet = home.create_wallet
|
220
220
|
assert_equal(64, wallet.digest.length)
|
221
221
|
end
|
@@ -235,14 +235,14 @@ class TestWallet < Zold::Test
|
|
235
235
|
end
|
236
236
|
|
237
237
|
def test_returns_protocol
|
238
|
-
FakeHome.new(log:
|
238
|
+
FakeHome.new(log: fake_log).run do |home|
|
239
239
|
wallet = home.create_wallet
|
240
240
|
assert_equal(Zold::PROTOCOL, wallet.protocol)
|
241
241
|
end
|
242
242
|
end
|
243
243
|
|
244
244
|
def test_iterates_income_transactions
|
245
|
-
FakeHome.new(log:
|
245
|
+
FakeHome.new(log: fake_log).run do |home|
|
246
246
|
wallet = home.create_wallet
|
247
247
|
wallet.add(
|
248
248
|
Zold::Txn.new(
|
@@ -268,7 +268,7 @@ class TestWallet < Zold::Test
|
|
268
268
|
end
|
269
269
|
|
270
270
|
def test_sorts_them_always_right
|
271
|
-
FakeHome.new(log:
|
271
|
+
FakeHome.new(log: fake_log).run do |home|
|
272
272
|
time = Time.now
|
273
273
|
txns = []
|
274
274
|
50.times do
|
@@ -306,13 +306,13 @@ class TestWallet < Zold::Test
|
|
306
306
|
GC.start
|
307
307
|
wallet.id
|
308
308
|
wallet.txns.count
|
309
|
-
|
309
|
+
fake_log.debug("Memory: #{GetProcessMem.new.bytes.to_i}") if (i % 5).zero?
|
310
310
|
end
|
311
311
|
end
|
312
312
|
GC.stress = true
|
313
313
|
diff = GetProcessMem.new.bytes.to_i - start
|
314
314
|
GC.stress = false
|
315
|
-
|
315
|
+
fake_log.debug("Memory diff is #{diff}")
|
316
316
|
assert(diff < 20_000_000)
|
317
317
|
end
|
318
318
|
end
|
data/test/test_wallets.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -31,11 +31,11 @@ require_relative '../lib/zold/amount'
|
|
31
31
|
|
32
32
|
# Wallets test.
|
33
33
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
34
|
-
# Copyright:: Copyright (c) 2018
|
34
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
35
35
|
# License:: MIT
|
36
36
|
class TestWallets < Zold::Test
|
37
37
|
def test_adds_wallet
|
38
|
-
FakeHome.new(log:
|
38
|
+
FakeHome.new(log: fake_log).run do |home|
|
39
39
|
wallets = home.wallets
|
40
40
|
id = Zold::Id.new
|
41
41
|
wallets.acq(id) do |wallet|
|
@@ -46,7 +46,7 @@ class TestWallets < Zold::Test
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def test_lists_wallets_and_ignores_garbage
|
49
|
-
FakeHome.new(log:
|
49
|
+
FakeHome.new(log: fake_log).run do |home|
|
50
50
|
wallets = home.wallets
|
51
51
|
FileUtils.touch(File.join(home.dir, '0xaaaaaaaaaaaaaaaaaaahello'))
|
52
52
|
FileUtils.mkdir_p(File.join(home.dir, 'a/b/c'))
|
@@ -76,7 +76,7 @@ class TestWallets < Zold::Test
|
|
76
76
|
assert_equal(5, wallets.count)
|
77
77
|
end
|
78
78
|
end
|
79
|
-
FakeHome.new(log:
|
79
|
+
FakeHome.new(log: fake_log).run do |home|
|
80
80
|
wallets = home.wallets
|
81
81
|
home.create_wallet
|
82
82
|
assert_equal(1, wallets.count)
|
data/test/test_zold.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -30,14 +30,14 @@ require_relative '../lib/zold/age'
|
|
30
30
|
|
31
31
|
# Zold main module test.
|
32
32
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
33
|
-
# Copyright:: Copyright (c) 2018
|
33
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
34
34
|
# License:: MIT
|
35
35
|
class TestZold < Zold::Test
|
36
36
|
Dir.new('fixtures/scripts').select { |f| f =~ /\.sh$/ && !f.start_with?('_') }.each do |f|
|
37
37
|
method = "test_#{f.gsub(/\.sh$/, '').gsub(/[^a-z]/, '_')}"
|
38
38
|
define_method(method) do
|
39
39
|
start = Time.now
|
40
|
-
|
40
|
+
fake_log.info("\n\n#{method} running (script at #{f})...")
|
41
41
|
Dir.mktmpdir do |dir|
|
42
42
|
FileUtils.cp('fixtures/id_rsa.pub', dir)
|
43
43
|
FileUtils.cp('fixtures/id_rsa', dir)
|
@@ -50,7 +50,7 @@ class TestZold < Zold::Test
|
|
50
50
|
stdin.close
|
51
51
|
until stdout.eof?
|
52
52
|
line = stdout.gets
|
53
|
-
|
53
|
+
fake_log.info(line)
|
54
54
|
out << line
|
55
55
|
end
|
56
56
|
code = thr.value.to_i
|
@@ -59,7 +59,7 @@ class TestZold < Zold::Test
|
|
59
59
|
end
|
60
60
|
sleep 1 # It's a workaround, I can't fix the bug (tests crash sporadically)
|
61
61
|
end
|
62
|
-
|
62
|
+
fake_log.info("\n\n#{f} done in #{Zold::Age.new(start)}")
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,19 +28,19 @@ require_relative '../fake_home'
|
|
28
28
|
|
29
29
|
# Delete banned wallets.
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
-
# Copyright:: Copyright (c) 2018
|
31
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
32
32
|
# License:: MIT
|
33
33
|
class TestDeleteBannedWallets < Zold::Test
|
34
34
|
def test_delete_them
|
35
35
|
id = Zold::Id.new(Zold::Id::BANNED[0])
|
36
|
-
FakeHome.new(log:
|
36
|
+
FakeHome.new(log: fake_log).run do |home|
|
37
37
|
home.create_wallet(id)
|
38
38
|
FileUtils.mkdir_p(File.join(home.dir, 'a/b/c'))
|
39
39
|
File.rename(
|
40
40
|
File.join(home.dir, "#{id}#{Zold::Wallet::EXT}"),
|
41
41
|
File.join(home.dir, "a/b/c/#{id}#{Zold::Wallet::EXT}")
|
42
42
|
)
|
43
|
-
Zold::DeleteBannedWallets.new(home.dir,
|
43
|
+
Zold::DeleteBannedWallets.new(home.dir, fake_log).exec
|
44
44
|
assert(File.exist?(File.join(home.dir, "a/b/c/#{id}#{Zold::Wallet::EXT}-banned")))
|
45
45
|
end
|
46
46
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -27,13 +27,13 @@ require_relative '../fake_home'
|
|
27
27
|
|
28
28
|
# Protocol up.
|
29
29
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
30
|
-
# Copyright:: Copyright (c) 2018
|
30
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
31
31
|
# License:: MIT
|
32
32
|
class TestProtocolUp < Zold::Test
|
33
33
|
def test_upgrades_protocol_in_wallet
|
34
|
-
FakeHome.new(log:
|
34
|
+
FakeHome.new(log: fake_log).run do |home|
|
35
35
|
id = home.create_wallet.id
|
36
|
-
Zold::ProtocolUp.new(home.dir,
|
36
|
+
Zold::ProtocolUp.new(home.dir, fake_log).exec
|
37
37
|
home.wallets.acq(id) do |wallet|
|
38
38
|
assert_equal(Zold::PROTOCOL, wallet.protocol)
|
39
39
|
end
|
data/upgrades/2.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/upgrades/protocol_up.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/zold.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -58,26 +58,26 @@ and suggests a different architecture for digital wallet maintenance."
|
|
58
58
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
59
59
|
s.rdoc_options = ['--charset=UTF-8']
|
60
60
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
61
|
-
s.
|
62
|
-
s.
|
63
|
-
s.
|
64
|
-
s.
|
65
|
-
s.
|
66
|
-
s.
|
67
|
-
s.
|
68
|
-
s.
|
69
|
-
s.
|
70
|
-
s.
|
71
|
-
s.
|
72
|
-
s.
|
73
|
-
s.
|
74
|
-
s.
|
75
|
-
s.
|
76
|
-
s.
|
77
|
-
s.
|
78
|
-
s.
|
79
|
-
s.
|
80
|
-
s.
|
81
|
-
s.
|
82
|
-
s.
|
61
|
+
s.add_dependency 'backtrace', '~>0.3'
|
62
|
+
s.add_dependency 'concurrent-ruby', '~>1.1'
|
63
|
+
s.add_dependency 'diffy', '~>3.3'
|
64
|
+
s.add_dependency 'futex', '~>0.8'
|
65
|
+
s.add_dependency 'get_process_mem', '~>0.2'
|
66
|
+
s.add_dependency 'haml', '~>5.0'
|
67
|
+
s.add_dependency 'json', '~>2.2'
|
68
|
+
s.add_dependency 'memory_profiler', '~>1.0'
|
69
|
+
s.add_dependency 'mimic', '~>0.4'
|
70
|
+
s.add_dependency 'openssl', '>=1.0'
|
71
|
+
s.add_dependency 'rainbow', '~>3.0'
|
72
|
+
s.add_dependency 'semantic', '~>1.6'
|
73
|
+
s.add_dependency 'sinatra', '~>3.0'
|
74
|
+
s.add_dependency 'slop', '~>4.6'
|
75
|
+
s.add_dependency 'sys-proctable', '~>1.2'
|
76
|
+
s.add_dependency 'thin', '~>1.7'
|
77
|
+
s.add_dependency 'threads', '~>0.3'
|
78
|
+
s.add_dependency 'total', '~>0.3'
|
79
|
+
s.add_dependency 'typhoeus', '~>1.3'
|
80
|
+
s.add_dependency 'usagewatch_ext', '~>0.2'
|
81
|
+
s.add_dependency 'zache', '~>0.12'
|
82
|
+
s.add_dependency 'zold-score', '~>0.5'
|
83
83
|
end
|
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.31.
|
4
|
+
version: 0.31.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|
@@ -337,10 +337,13 @@ extra_rdoc_files:
|
|
337
337
|
files:
|
338
338
|
- ".0pdd.yml"
|
339
339
|
- ".gitattributes"
|
340
|
+
- ".github/workflows/actionlint.yml"
|
340
341
|
- ".github/workflows/codecov.yml"
|
342
|
+
- ".github/workflows/copyrights.yml"
|
341
343
|
- ".github/workflows/pdd.yml"
|
342
344
|
- ".github/workflows/rake.yml"
|
343
345
|
- ".github/workflows/xcop.yml"
|
346
|
+
- ".github/workflows/yamllint.yml"
|
344
347
|
- ".gitignore"
|
345
348
|
- ".pdd"
|
346
349
|
- ".rubocop.yml"
|
@@ -349,6 +352,7 @@ files:
|
|
349
352
|
- ".simplecov"
|
350
353
|
- Dockerfile
|
351
354
|
- Gemfile
|
355
|
+
- Gemfile.lock
|
352
356
|
- Guardfile
|
353
357
|
- INSTALL.md
|
354
358
|
- LICENSE.txt
|
@@ -597,7 +601,7 @@ licenses:
|
|
597
601
|
- MIT
|
598
602
|
metadata: {}
|
599
603
|
post_install_message: |-
|
600
|
-
Thanks for installing Zold 0.31.
|
604
|
+
Thanks for installing Zold 0.31.9!
|
601
605
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
602
606
|
Read our blog posts: https://blog.zold.io
|
603
607
|
Try ZLD online wallet at: https://wts.zold.io
|