zold 0.22.5 → 0.22.6

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: 03bad0932b6c80df634b1a0dd7149220767feb14818e8b22e310dad000630c24
4
- data.tar.gz: eede3cc1a49152385f4ed01067343523719aaccb774e294a3f9b32987c53b155
3
+ metadata.gz: 193ffcae400705f2d5f2957ba17f591f33b2a9b51a323e7a4f83316a68b1587f
4
+ data.tar.gz: 9b7ce3f388c051857120385410230501753f3fcd0bfe57f8775fdfd95758cb66
5
5
  SHA512:
6
- metadata.gz: 3ff2d16edc4fa1319d41622c3362e38c2e586701670e71883e6a31cc7a4d42a1dbede754009de98b7f2386e212a6d501ca7f4a8abeb6a4d1317a61e7211ab1b8
7
- data.tar.gz: 492ddd34efe4982713b3db909d8a260dac6ca18021474a26fd60200860e2bfb02d6d1d5d0a0a5da822728ad59b49c63a8bb950a93eb84e9bf399f6e37d623269
6
+ metadata.gz: 959076ef2e3d3ba09df404fc013fa65a8ce36c4b62660194d4cc7abd76b48a4254dae3cba07ea2bd26705e19f2b2a8cc71c33f81cb8d3f21631feae7e7ba12c0
7
+ data.tar.gz: 68442b0b6d3823898ed9a026e57f93f0bfd88c793ceb92fe8f70c1ae8b9addfc0f86c0217cb67cf58592ea4768b47549b2d6f1ebd527fba6a2c5600af1f7a9da
data/lib/zold/id.rb CHANGED
@@ -40,6 +40,10 @@ module Zold
40
40
  # The ID of the root wallet.
41
41
  ROOT = Id.new('0000000000000000')
42
42
 
43
+ def root?
44
+ to_s == ROOT.to_s
45
+ end
46
+
43
47
  def eql?(other)
44
48
  raise 'Can only compare with Id' unless other.is_a?(Id)
45
49
  to_s == other.to_s
data/lib/zold/version.rb CHANGED
@@ -25,7 +25,7 @@
25
25
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Zold
28
- VERSION = '0.22.5'
28
+ VERSION = '0.22.6'
29
29
  PROTOCOL = 2
30
30
  REPO = 'zold-io/zold'
31
31
  end
data/test/test_id.rb CHANGED
@@ -22,6 +22,7 @@
22
22
 
23
23
  require 'minitest/autorun'
24
24
  require 'tmpdir'
25
+ require_relative 'test__helper'
25
26
  require_relative '../lib/zold/id'
26
27
 
27
28
  # ID test.
@@ -36,6 +37,10 @@ class TestId < Zold::Test
36
37
  end
37
38
  end
38
39
 
40
+ def test_checks_for_root
41
+ assert(Zold::Id::ROOT.root?)
42
+ end
43
+
39
44
  def test_generates_id_only_once
40
45
  id = Zold::Id.new
41
46
  before = id.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.5
4
+ version: 0.22.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -747,7 +747,7 @@ licenses:
747
747
  - MIT
748
748
  metadata: {}
749
749
  post_install_message: |-
750
- Thanks for installing Zold 0.22.5!
750
+ Thanks for installing Zold 0.22.6!
751
751
  Study our White Paper: https://papers.zold.io/wp.pdf
752
752
  Read our blog posts: https://blog.zold.io
753
753
  Try ZLD online wallet at: https://wts.zold.io