adequate_crypto_address 0.1.7 → 0.1.8

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: 317e610de2701baca977b7cb48ea5fa4b76d97935df0f932a2d3c1bdba4d3910
4
- data.tar.gz: 8f8c8f1fa6eaa3bdb4df6e4dca49dd83f0bb1c6a6096cefcdb16bc8c10c91f3c
3
+ metadata.gz: 454d13bbd68af39b638c32a2ec39e2b0d94f71a0c5479cb01a3f0f00fd89abe0
4
+ data.tar.gz: 0b6fc0a2ea85706723f8242514d5703a62720be74ab9e0d8379b61f17b4f369f
5
5
  SHA512:
6
- metadata.gz: 971aa5e40bdda01d44da458389afb144df70b4109ed199e5b7f81e254a603fcbe09c10dc48636b5d458c921c05297838e4aeb8bd994f6d3bb61d883bb7862f22
7
- data.tar.gz: e280c85592e69cb724cef1fa4c5ca4ebfe409771cade548169355ad6ef45b100406e2fe7f62ab967f844483b326f75cb4be5bec356826513dd325db789e2295b
6
+ metadata.gz: 8b82dd552389025f66a26671515b43974ec9dbd442f7556c8e179fac8c0743f059ce0bd1a9706d750821dc7a151e91e6286c489f69cdb3a9c7bae20532937cd0
7
+ data.tar.gz: f5ff8a4f9c8de4da94f28247c8f9a24ddbbdf1294e064c98056e96a84b7b2dce11e123830b02be08a271c36bd4f280ca1d8486b11c70f2346d84781e3eefad73
data/Makefile CHANGED
@@ -3,4 +3,4 @@ build:
3
3
  gem build adequate_crypto_address.gemspec
4
4
 
5
5
  push:
6
- gem push adequate_crypto_address-0.1.7.gem
6
+ gem push adequate_crypto_address-0.1.8.gem
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AdequateCryptoAddress
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.8'
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AdequateCryptoAddress
4
- class Monero
4
+ class Xmr
5
5
  attr_reader :address, :type
6
6
 
7
7
  def initialize(address)
@@ -31,4 +31,5 @@ module AdequateCryptoAddress
31
31
  address.match(/^4[1-9A-HJ-NP-Za-km-z]{105}(?:[1-9A-HJ-NP-Za-km-z]{30})?$/)
32
32
  end
33
33
  end
34
+ Monero = Xmr
34
35
  end
@@ -12,7 +12,7 @@ require 'adequate_crypto_address/dash'
12
12
  require 'adequate_crypto_address/zec'
13
13
  require 'adequate_crypto_address/ltc'
14
14
  require 'adequate_crypto_address/ton'
15
- require 'adequate_crypto_address/monero'
15
+ require 'adequate_crypto_address/xmr'
16
16
 
17
17
  module AdequateCryptoAddress
18
18
  class UnknownCurrency < StandardError; end
@@ -191,12 +191,21 @@ RSpec.describe(AdequateCryptoAddress) do
191
191
 
192
192
  context 'Monero' do
193
193
  it 'validates addresses' do
194
+ expect(described_class).to be_valid('4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQVmzCh57', :XMR)
194
195
  expect(described_class).to be_valid('4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQVmzCh57', :monero)
196
+ expect(described_class).to be_valid('4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQVmzCh57', :Xmr)
197
+ expect(described_class).to be_valid('4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQjpXCZedGfVQVmzCh57', :xmr)
195
198
  expect(described_class).to be_valid('4TZ76dT4mbsizsTtJzy7kYBo9f8xduc8wTsWb86pCmx5Cmh43CDxNS1FRcMrE3CNQ2ZT17vzCudc5TbNYBzizwqZFah5K1Js7VpL88qPSi', :monero)
199
+ expect(described_class).to be_valid('4TZ76dT4mbsizsTtJzy7kYBo9f8xduc8wTsWb86pCmx5Cmh43CDxNS1FRcMrE3CNQ2ZT17vzCudc5TbNYBzizwqZFah5K1Js7VpL88qPSi', :Xmr)
200
+ expect(described_class).to be_valid('4TZ76dT4mbsizsTtJzy7kYBo9f8xduc8wTsWb86pCmx5Cmh43CDxNS1FRcMrE3CNQ2ZT17vzCudc5TbNYBzizwqZFah5K1Js7VpL88qPSi', :Xmr)
201
+ expect(described_class).to be_valid('4TZ76dT4mbsizsTtJzy7kYBo9f8xduc8wTsWb86pCmx5Cmh43CDxNS1FRcMrE3CNQ2ZT17vzCudc5TbNYBzizwqZFah5K1Js7VpL88qPSi', :xmr)
196
202
  end
197
203
 
198
204
  it 'validates wrong addresses' do
199
205
  expect(described_class).not_to be_valid('NOT_VALID_4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjp', :monero)
206
+ expect(described_class).not_to be_valid('NOT_VALID_4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjp', :Xmr)
207
+ expect(described_class).not_to be_valid('NOT_VALID_4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjp', :XMR)
208
+ expect(described_class).not_to be_valid('NOT_VALID_4BKnGLZNZ5pjpXCZedGfVQjpXCZedGfVQjp', :xmr)
200
209
  end
201
210
  end
202
211
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adequate_crypto_address
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - vtm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-31 00:00:00.000000000 Z
11
+ date: 2022-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base58
@@ -91,11 +91,11 @@ files:
91
91
  - lib/adequate_crypto_address/dash.rb
92
92
  - lib/adequate_crypto_address/eth.rb
93
93
  - lib/adequate_crypto_address/ltc.rb
94
- - lib/adequate_crypto_address/monero.rb
95
94
  - lib/adequate_crypto_address/ton.rb
96
95
  - lib/adequate_crypto_address/utils/bch.rb
97
96
  - lib/adequate_crypto_address/utils/bech32.rb
98
97
  - lib/adequate_crypto_address/version.rb
98
+ - lib/adequate_crypto_address/xmr.rb
99
99
  - lib/adequate_crypto_address/xrp.rb
100
100
  - lib/adequate_crypto_address/zec.rb
101
101
  - spec/adequate_crypto_address/bch_spec.rb