zold 0.31.8 → 0.31.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/.0pdd.yml +20 -0
  3. data/.github/workflows/actionlint.yml +41 -0
  4. data/.github/workflows/codecov.yml +23 -4
  5. data/.github/workflows/copyrights.yml +30 -0
  6. data/.github/workflows/pdd.yml +26 -3
  7. data/.github/workflows/rake.yml +24 -2
  8. data/.github/workflows/xcop.yml +21 -2
  9. data/.github/workflows/yamllint.yml +34 -0
  10. data/.gitignore +2 -1
  11. data/.rubocop.yml +21 -0
  12. data/.ruby-version +1 -1
  13. data/.rultor.yml +35 -5
  14. data/.simplecov +1 -1
  15. data/Dockerfile +29 -3
  16. data/Gemfile +10 -10
  17. data/Gemfile.lock +340 -0
  18. data/LICENSE.txt +1 -1
  19. data/Rakefile +9 -12
  20. data/bin/zold +1 -1
  21. data/cucumber.yml +20 -0
  22. data/deploy.sh +20 -0
  23. data/features/step_definitions/steps.rb +1 -1
  24. data/features/support/env.rb +1 -1
  25. data/fixtures/merge/asserts.rb +1 -1
  26. data/fixtures/merge/into_no_wallet/assert.rb +1 -1
  27. data/fixtures/merge/legacy_negatives_stay/assert.rb +1 -1
  28. data/fixtures/merge/missed_wallets/assert.rb +1 -1
  29. data/fixtures/merge/negative_overwriting/assert.rb +1 -1
  30. data/fixtures/merge/negatives_in_between/assert.rb +1 -1
  31. data/fixtures/merge/random_expenses/assert.rb +1 -1
  32. data/fixtures/merge/simple_case/assert.rb +1 -1
  33. data/fixtures/merge/unconfirmed_income/assert.rb +1 -1
  34. data/fixtures/scripts/_head.sh +21 -1
  35. data/fixtures/scripts/calculate-scores.sh +19 -0
  36. data/fixtures/scripts/distribute-wallet.sh +19 -0
  37. data/fixtures/scripts/print-helps.sh +19 -0
  38. data/fixtures/scripts/pull-on-start.sh +19 -0
  39. data/fixtures/scripts/push-and-pull.sh +19 -0
  40. data/fixtures/scripts/redeploy-on-upgrade.sh +19 -0
  41. data/fixtures/scripts/spread-wallets.sh +19 -0
  42. data/lib/zold/age.rb +2 -2
  43. data/lib/zold/amount.rb +2 -2
  44. data/lib/zold/cached_wallets.rb +3 -3
  45. data/lib/zold/commands/alias.rb +20 -0
  46. data/lib/zold/commands/args.rb +2 -2
  47. data/lib/zold/commands/calculate.rb +2 -2
  48. data/lib/zold/commands/clean.rb +2 -2
  49. data/lib/zold/commands/create.rb +2 -2
  50. data/lib/zold/commands/diff.rb +2 -2
  51. data/lib/zold/commands/fetch.rb +2 -2
  52. data/lib/zold/commands/invoice.rb +2 -2
  53. data/lib/zold/commands/list.rb +2 -2
  54. data/lib/zold/commands/merge.rb +2 -2
  55. data/lib/zold/commands/next.rb +2 -2
  56. data/lib/zold/commands/node.rb +2 -2
  57. data/lib/zold/commands/pay.rb +2 -2
  58. data/lib/zold/commands/propagate.rb +2 -2
  59. data/lib/zold/commands/pull.rb +2 -2
  60. data/lib/zold/commands/push.rb +2 -2
  61. data/lib/zold/commands/remote.rb +2 -2
  62. data/lib/zold/commands/remove.rb +2 -2
  63. data/lib/zold/commands/routines/audit.rb +2 -2
  64. data/lib/zold/commands/routines/gc.rb +2 -2
  65. data/lib/zold/commands/routines/reconcile.rb +2 -2
  66. data/lib/zold/commands/routines/reconnect.rb +2 -2
  67. data/lib/zold/commands/routines/retire.rb +2 -2
  68. data/lib/zold/commands/routines/spread.rb +2 -2
  69. data/lib/zold/commands/routines.rb +2 -2
  70. data/lib/zold/commands/show.rb +2 -2
  71. data/lib/zold/commands/taxes.rb +2 -2
  72. data/lib/zold/commands/thread_badge.rb +3 -3
  73. data/lib/zold/copies.rb +2 -2
  74. data/lib/zold/dir_items.rb +2 -2
  75. data/lib/zold/endless.rb +2 -2
  76. data/lib/zold/gem.rb +2 -2
  77. data/lib/zold/hands.rb +2 -2
  78. data/lib/zold/head.rb +3 -3
  79. data/lib/zold/hexnum.rb +2 -2
  80. data/lib/zold/http.rb +3 -3
  81. data/lib/zold/hungry_wallets.rb +2 -2
  82. data/lib/zold/id.rb +2 -2
  83. data/lib/zold/json_page.rb +2 -2
  84. data/lib/zold/key.rb +2 -2
  85. data/lib/zold/log.rb +2 -2
  86. data/lib/zold/metronome.rb +2 -2
  87. data/lib/zold/node/async_entrance.rb +2 -2
  88. data/lib/zold/node/entrance.rb +2 -2
  89. data/lib/zold/node/farm.rb +2 -2
  90. data/lib/zold/node/farmers.rb +2 -2
  91. data/lib/zold/node/front.rb +3 -3
  92. data/lib/zold/node/journaled_pipeline.rb +2 -2
  93. data/lib/zold/node/nodup_entrance.rb +2 -2
  94. data/lib/zold/node/nospam_entrance.rb +2 -2
  95. data/lib/zold/node/pipeline.rb +2 -2
  96. data/lib/zold/node/safe_entrance.rb +2 -2
  97. data/lib/zold/node/soft_error.rb +2 -2
  98. data/lib/zold/node/spread_entrance.rb +2 -2
  99. data/lib/zold/node/sync_entrance.rb +2 -2
  100. data/lib/zold/node/trace.rb +2 -2
  101. data/lib/zold/patch.rb +2 -2
  102. data/lib/zold/prefixes.rb +2 -2
  103. data/lib/zold/remotes.rb +2 -2
  104. data/lib/zold/signature.rb +2 -2
  105. data/lib/zold/size.rb +2 -2
  106. data/lib/zold/sync_wallets.rb +2 -2
  107. data/lib/zold/tax.rb +2 -2
  108. data/lib/zold/thread_pool.rb +2 -2
  109. data/lib/zold/tree_wallets.rb +2 -2
  110. data/lib/zold/txn.rb +2 -2
  111. data/lib/zold/txns.rb +3 -3
  112. data/lib/zold/upgrades.rb +1 -1
  113. data/lib/zold/verbose_thread.rb +2 -2
  114. data/lib/zold/version.rb +3 -3
  115. data/lib/zold/version_file.rb +1 -1
  116. data/lib/zold/wallet.rb +2 -2
  117. data/lib/zold/wallets.rb +2 -2
  118. data/lib/zold.rb +2 -2
  119. data/test/commands/routines/test_audit.rb +4 -4
  120. data/test/commands/routines/test_gc.rb +8 -8
  121. data/test/commands/routines/test_reconcile.rb +4 -4
  122. data/test/commands/routines/test_reconnect.rb +3 -3
  123. data/test/commands/routines/test_retire.rb +3 -3
  124. data/test/commands/test_alias.rb +26 -6
  125. data/test/commands/test_calculate.rb +3 -3
  126. data/test/commands/test_clean.rb +10 -10
  127. data/test/commands/test_create.rb +3 -3
  128. data/test/commands/test_diff.rb +5 -5
  129. data/test/commands/test_fetch.rb +9 -9
  130. data/test/commands/test_invoice.rb +3 -3
  131. data/test/commands/test_list.rb +3 -3
  132. data/test/commands/test_merge.rb +12 -12
  133. data/test/commands/test_node.rb +6 -6
  134. data/test/commands/test_pay.rb +19 -19
  135. data/test/commands/test_propagate.rb +5 -5
  136. data/test/commands/test_pull.rb +6 -6
  137. data/test/commands/test_push.rb +9 -9
  138. data/test/commands/test_remote.rb +11 -11
  139. data/test/commands/test_remove.rb +10 -10
  140. data/test/commands/test_show.rb +3 -3
  141. data/test/commands/test_taxes.rb +4 -4
  142. data/test/fake_home.rb +2 -2
  143. data/test/node/fake_entrance.rb +2 -2
  144. data/test/node/fake_node.rb +57 -40
  145. data/test/node/test_async_entrance.rb +10 -10
  146. data/test/node/test_entrance.rb +8 -8
  147. data/test/node/test_farm.rb +11 -11
  148. data/test/node/test_farmers.rb +5 -5
  149. data/test/node/test_front.rb +29 -28
  150. data/test/node/test_nodup_entrance.rb +4 -4
  151. data/test/node/test_nospam_entrance.rb +3 -3
  152. data/test/node/test_safe_entrance.rb +4 -4
  153. data/test/node/test_spread_entrance.rb +8 -8
  154. data/test/node/test_sync_entrance.rb +4 -4
  155. data/test/node/test_trace.rb +2 -2
  156. data/test/test__helper.rb +4 -4
  157. data/test/test_age.rb +2 -2
  158. data/test/test_amount.rb +2 -2
  159. data/test/test_cached_wallets.rb +2 -2
  160. data/test/test_copies.rb +12 -12
  161. data/test/test_dir_items.rb +4 -4
  162. data/test/test_gem.rb +20 -0
  163. data/test/test_hands.rb +2 -2
  164. data/test/test_hexnum.rb +2 -2
  165. data/test/test_http.rb +8 -8
  166. data/test/test_hungry_wallets.rb +11 -11
  167. data/test/test_id.rb +2 -2
  168. data/test/test_json_page.rb +2 -2
  169. data/test/test_key.rb +2 -2
  170. data/test/test_log.rb +5 -5
  171. data/test/test_metronome.rb +6 -6
  172. data/test/test_patch.rb +14 -14
  173. data/test/test_prefixes.rb +3 -3
  174. data/test/test_remotes.rb +9 -9
  175. data/test/test_signature.rb +2 -2
  176. data/test/test_size.rb +2 -2
  177. data/test/test_sync_wallets.rb +3 -3
  178. data/test/test_tax.rb +9 -9
  179. data/test/test_thread_pool.rb +8 -8
  180. data/test/test_tree_wallets.rb +2 -2
  181. data/test/test_txn.rb +2 -2
  182. data/test/test_upgrades.rb +2 -2
  183. data/test/test_verbose_thread.rb +2 -2
  184. data/test/test_version.rb +20 -0
  185. data/test/test_wallet.rb +22 -22
  186. data/test/test_wallets.rb +5 -5
  187. data/test/test_zold.rb +5 -5
  188. data/test/upgrades/test_delete_banned_wallets.rb +4 -4
  189. data/test/upgrades/test_protocol_up.rb +4 -4
  190. data/upgrades/2.rb +1 -1
  191. data/upgrades/delete_banned_wallets.rb +1 -1
  192. data/upgrades/move_wallets_into_tree.rb +1 -1
  193. data/upgrades/protocol_up.rb +1 -1
  194. data/upgrades/rename_foreign_wallets.rb +1 -1
  195. data/zold.gemspec +23 -23
  196. 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-2023 Zerocracy
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 Yegor Bugayenko
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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
- test_log.debug("Memory: #{GetProcessMem.new.bytes.to_i}") if (i % 5).zero?
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
- test_log.debug("Memory diff is #{diff}")
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-2023 Zerocracy
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 Yegor Bugayenko
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: test_log).run do |home|
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: test_log).run do |home|
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: test_log).run do |home|
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-2023 Zerocracy
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 Yegor Bugayenko
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
- test_log.info("\n\n#{method} running (script at #{f})...")
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
- test_log.info(line)
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
- test_log.info("\n\n#{f} done in #{Zold::Age.new(start)}")
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-2023 Zerocracy
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 Yegor Bugayenko
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: test_log).run do |home|
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, test_log).exec
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-2023 Zerocracy
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 Yegor Bugayenko
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: test_log).run do |home|
34
+ FakeHome.new(log: fake_log).run do |home|
35
35
  id = home.create_wallet.id
36
- Zold::ProtocolUp.new(home.dir, test_log).exec
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-2023 Zerocracy
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-2023 Zerocracy
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-2023 Zerocracy
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-2023 Zerocracy
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-2023 Zerocracy
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-2023 Zerocracy
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.add_runtime_dependency 'backtrace', '~>0.3'
62
- s.add_runtime_dependency 'concurrent-ruby', '~>1.1'
63
- s.add_runtime_dependency 'diffy', '~>3.3'
64
- s.add_runtime_dependency 'futex', '~>0.8'
65
- s.add_runtime_dependency 'get_process_mem', '~>0.2'
66
- s.add_runtime_dependency 'haml', '~>5.0'
67
- s.add_runtime_dependency 'json', '~>2.2'
68
- s.add_runtime_dependency 'memory_profiler', '~>1.0'
69
- s.add_runtime_dependency 'mimic', '~>0.4'
70
- s.add_runtime_dependency 'openssl', '>=1.0'
71
- s.add_runtime_dependency 'rainbow', '~>3.0'
72
- s.add_runtime_dependency 'semantic', '~>1.6'
73
- s.add_runtime_dependency 'sinatra', '~>3.0'
74
- s.add_runtime_dependency 'slop', '~>4.6'
75
- s.add_runtime_dependency 'sys-proctable', '~>1.2'
76
- s.add_runtime_dependency 'thin', '~>1.7'
77
- s.add_runtime_dependency 'threads', '~>0.3'
78
- s.add_runtime_dependency 'total', '~>0.3'
79
- s.add_runtime_dependency 'typhoeus', '~>1.3'
80
- s.add_runtime_dependency 'usagewatch_ext', '~>0.2'
81
- s.add_runtime_dependency 'zache', '~>0.12'
82
- s.add_runtime_dependency 'zold-score', '~>0.5'
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.8
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: 2023-12-07 00:00:00.000000000 Z
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.8!
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