biilabs-client 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4206f66e9bbcde9a87cad33c09a81f7e63247b98cd6a5368aa9decb76fb7577
4
- data.tar.gz: 510d8be4d7964f8434ae7aa44fd0636f5c0738437bbcd5daab802be13c4e3d71
3
+ metadata.gz: 2ab56f344af93912e0e7e356070c693daad2592ad17bcaf147c4242200850b2c
4
+ data.tar.gz: a34cbc8143504693ca460f89a48407fb96991da48d98a4c68b581f2baa7ae135
5
5
  SHA512:
6
- metadata.gz: 54845ebcfd2d0df2151575a282139ca20d000e6f30908942701ac3f751e1f046afa0e8d10cb7048fdfe4fbd5f2bc6323b1817ddc476de849fa93b8b8ee7dfd97
7
- data.tar.gz: d5f940afe71f7f713aff16ad58b46de11056039e308f976b4811be96594422c34b53e7c1bc083c8335dd01e9a6b239f06a4bc753ff2432253d59fffe50375cff
6
+ metadata.gz: 6a77b7a14c360586562ae8dd1ca24acf8a7971d284749fe5c08b0050c8ce36a2361de944fda1375b95db8c61f891bf82b66ec481f022c8d2b5d07b6ce9e286f5
7
+ data.tar.gz: 44b89bab99af485ee99843cd6947ad4e9266e0ca68abe4ed501b4d17d15bd137be005ea554ee8702b1f8d0c1316d6d537aa3515a85bfe54ea9b7a8048ea682da
@@ -34,7 +34,8 @@ class BiilabsClient
34
34
  end
35
35
 
36
36
  def get_tangle_by_tag(tag)
37
- path = "/tag/#{tag.to_trytes.value}"
37
+ tag_id = (tag.to_trytes.value + "9" * 27)[0..26]
38
+ path = "/tag/#{tag_id}"
38
39
  resp = connection.get(path)
39
40
  response_handler(resp)
40
41
  end
@@ -1,9 +1,10 @@
1
1
  describe BiilabsClient do
2
- before(:all) do
2
+ before(:each) do
3
3
  @client = BiilabsClient.new
4
4
  @tag = 'my tag'
5
5
  @mssage = 'my document digest'
6
6
  end
7
+
7
8
  describe '.post_tangle' do
8
9
  it 'should return tangle info' do
9
10
  result = @client.post_tangle(@tag, @mssage)
@@ -15,7 +16,7 @@ describe BiilabsClient do
15
16
 
16
17
  describe '.get_tangle' do
17
18
  it 'should return tangle info' do
18
- tangle_id = 'QTIQXETRPHVP9WNATWGT9CHEMMBVMEYJWXWQ9OCETLPFI9YEJEYFZMIQCPKGKNVPIQZNWDIS9FSEA9999'
19
+ tangle_id = 'MYZHHPILCLXDSJNAMPGETUEKWRQCKBWQJIMNEZSQPF9ANGRNVOIVOQJNTJRNPLVPNEVLWVVGMLRK99999'
19
20
  result = @client.get_tangle(tangle_id)
20
21
  expect(result['hash'].to_trytes.value).to eq(tangle_id)
21
22
  expect(result['tag'].to_trytes.to_string).to eq(@tag)
@@ -26,7 +27,7 @@ describe BiilabsClient do
26
27
  describe '.get_tangle_by_tag' do
27
28
  it 'should return tangles with same tag' do
28
29
  result = @client.get_tangle_by_tag(@tag)
29
- expect(result['transactions'].first['tag'].to_trytes.to_string).to eq(@tag)
30
+ expect(result.first['tag'].to_trytes.to_string).to eq(@tag)
30
31
  end
31
32
  end
32
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biilabs-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-18 00:00:00.000000000 Z
11
+ date: 2019-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -64,7 +64,7 @@ files:
64
64
  - lib/string.rb
65
65
  - lib/trytes.rb
66
66
  - spec/biilabs-client_spec.rb
67
- homepage: https://github.com/redtear1115/biilabs-client
67
+ homepage: https://github.com/kdan-mobile-software-ltd/biilabs-client
68
68
  licenses:
69
69
  - MIT
70
70
  metadata: {}