mixin_bot 0.7.11 → 0.7.12

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: 3b4b77d94221e1120da8c18fadd70bcf5898d083e2bd95c469cee8c96084c76f
4
- data.tar.gz: '039f44131a984c10b1f527b6c45766a3660af6efc40e2e66e132b46e1cbc8428'
3
+ metadata.gz: 13c4f9ce40bbee325eed32c0a8a3c928911e3f3f2fc1acf3481b8a483d768e0d
4
+ data.tar.gz: 916d23e4ddc9bcc9f7eea588b9b00cd46a099cbc5d7ed955f74ec45077c41f00
5
5
  SHA512:
6
- metadata.gz: 22470467c1b5955e2e2352788fecbf14bf307abdba0283796a2b86525660a8f479670135bd9d594b59462a2058956214036025f9881833b57b21f59f28644876
7
- data.tar.gz: e88226bd6042e3ff224ff5805d1982df1ee4a6b17186440d3edeae820c9f804e1952b3da83dc2b29258a97f5be7685b6d3e163bbab242d83752e468a0d1a4908
6
+ metadata.gz: 5283924b083f585b4a49486f39ecf668db803b3a3f975293bd421d5edbf92c370decaa113fc3893f2c79eaffc9f78c45aa2257d93ec4b1ee0eabcd5163c1cada
7
+ data.tar.gz: 72208f22e2b8a9a26814ca2a4bc2f260e461cc25f9231746ede4fbd638519242b8fada5604e325b467acd16be05eb88809053300067d7f54d0b56cd140033b46
@@ -11,13 +11,7 @@ module MixinBot
11
11
 
12
12
  desc 'unique UUIDS', 'generate unique UUID for two or more UUIDs'
13
13
  def unique(*uuids)
14
- uuids.sort
15
- r = uuids.first
16
- uuids.each_with_index do |uuid, i|
17
- r = MixinBot::Utils.unique_uuid(r, uuid) if i.positive?
18
- end
19
-
20
- log r
14
+ log MixinBot::Utils.unique_uuid *uuids
21
15
  end
22
16
 
23
17
  desc 'generatetrace HASH', 'generate trace ID from Tx hash'
@@ -17,7 +17,7 @@ module MixinBot
17
17
  NFT_MASK = 0x00
18
18
  NULL_UUID = '00000000-0000-0000-0000-000000000000'
19
19
 
20
- def unique_uuid(uuid_1, uuid_2)
20
+ def generate_unique_uuid(uuid_1, uuid_2)
21
21
  md5 = Digest::MD5.new
22
22
  md5 << [uuid_1, uuid_2].min
23
23
  md5 << [uuid_1, uuid_2].max
@@ -37,6 +37,16 @@ module MixinBot
37
37
  )
38
38
  end
39
39
 
40
+ def unique_uuid(*uuids)
41
+ uuids.sort
42
+ r = uuids.first
43
+ uuids.each_with_index do |uuid, i|
44
+ r = MixinBot::Utils.generate_unique_uuid(r, uuid) if i.positive?
45
+ end
46
+
47
+ r
48
+ end
49
+
40
50
  def generate_trace_from_hash(hash, output_index = 0)
41
51
  md5 = Digest::MD5.new
42
52
  md5 << hash
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MixinBot
4
- VERSION = '0.7.11'
4
+ VERSION = '0.7.12'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixin_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.11
4
+ version: 0.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-07 00:00:00.000000000 Z
11
+ date: 2022-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport