tangany 0.0.4 → 0.0.5

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: 11ac730b9808050a49fd90df37d7457e8cc7ee7b4699d4369a8de10297e1e55a
4
- data.tar.gz: 2332afcc59baa63989565780f5c60af0818b8284fdea3756861a6a3dde27dcc7
3
+ metadata.gz: a550ac4ad0ee694839dfc485b08ac2fc4c725424e5c5f5ee4c8b147fcfbb6f51
4
+ data.tar.gz: 1b9691bdd989ef0da04589592667fdfbefb3745ceccc584b079a52cb549a9914
5
5
  SHA512:
6
- metadata.gz: 216116b2b0dced95650747446398a5abb9993961f819efe779be0256ccf50f4a19cf06625204f9c48f0dc1f8fbf2eb59c43a1215e3e540c34dc1b9b69e8dee98
7
- data.tar.gz: fd45c8238d66ed47a513adb058754647ff38da1623aeb5bee678ff1b5eedb94d07737a4794bc21019329e98326ab1e0441db3cec660df9d6a2dc07942a0a9f2d
6
+ metadata.gz: 7243f013407ffbf5f7a4ffaec0313c50c7a541965002c4c265d00da0390a22eb0d904efcebf865794206d111e192cb883a698ae713d3b5838117ffc859f715ba
7
+ data.tar.gz: caf92195b2c5e85a0b5b41a85a0504a8f8c8487cadd8b20d3d8c47d8343eed1a623a1725e89606cd6b44ff03ef30cc39fba46b4f2d63d9d82b1c394f41e4f600
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.5 - 2023-01-16
4
+
5
+ ## What's Changed
6
+
7
+ - Customers client version header by [@panteo](https://github.com/panteo) in https://github.com/bitbond/tangany-ruby/pull/7
8
+
9
+ **Full Changelog**: https://github.com/bitbond/tangany-ruby/compare/v0.0.4...v0.0.5
10
+
3
11
  ## 0.0.4 - 2023-01-16
4
12
 
5
13
  ### What's Changed
@@ -10,7 +18,7 @@
10
18
 
11
19
  ## What's Changed
12
20
 
13
- - Better logging in test live by @panteo in https://github.com/bitbond/tangany-ruby/pull/6
21
+ - Better logging in test live by [@panteo](https://github.com/panteo) in https://github.com/bitbond/tangany-ruby/pull/6
14
22
 
15
23
  **Full Changelog**: https://github.com/bitbond/tangany-ruby/compare/v0.0.2...v0.0.3
16
24
 
@@ -18,7 +26,7 @@
18
26
 
19
27
  ### What's Changed
20
28
 
21
- - README badges and gemspec links by @panteo in https://github.com/bitbond/tangany-ruby/pull/5
29
+ - README badges and gemspec links by [@panteo](https://github.com/panteo) in https://github.com/bitbond/tangany-ruby/pull/5
22
30
 
23
31
  **Full Changelog**: https://github.com/bitbond/tangany-ruby/compare/v0.0.1...v0.0.2
24
32
 
@@ -56,6 +64,6 @@
56
64
 
57
65
  ### New Contributors
58
66
 
59
- - @panteo made their first contribution in https://github.com/bitbond/tangany-ruby/pull/2
67
+ - [@panteo](https://github.com/panteo) made their first contribution in https://github.com/bitbond/tangany-ruby/pull/2
60
68
 
61
69
  **Full Changelog**: https://github.com/bitbond/tangany-ruby/commits/v0.0.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tangany (0.0.4)
4
+ tangany (0.0.5)
5
5
  activesupport (>= 6.0, < 8.0.0)
6
6
  dry-struct (>= 1.6, < 2.0.0)
7
7
  dry-validation (>= 1.10, < 2.0.0)
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # Tangany Ruby Library
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/tangany.svg)](https://badge.fury.io/rb/tangany)
4
3
  [![CI](https://github.com/bitbond/tangany-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/bitbond/tangany-ruby/actions/workflows/ci.yml)
5
4
  ![Test coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
6
5
  ![Code quality](https://img.shields.io/badge/quality-93%25-green)
@@ -54,6 +53,7 @@ Tangany.client_secret = "..."
54
53
  Tangany.environment = "..." # mainnet or testnet
55
54
  Tangany.subscription = "..."
56
55
  Tangany.vault_url = "..."
56
+ Tangany.version = "..."
57
57
 
58
58
  customers_client = Tangany::Customers::Client.new
59
59
  custody_client = Tangany::Custody::Client.new
data/bin/console CHANGED
@@ -17,6 +17,7 @@ Tangany.client_secret = ENV.fetch("TEST_TANGANY_CLIENT_SECRET", "test")
17
17
  Tangany.environment = "testnet"
18
18
  Tangany.subscription = ENV.fetch("TEST_TANGANY_SUBSCRIPTION", "test")
19
19
  Tangany.vault_url = ENV.fetch("TEST_TANGANY_VAULT_URL", "test")
20
+ Tangany.version = ENV.fetch("TEST_TANGANY_VERSION", "1")
20
21
 
21
22
  require "irb"
22
23
  IRB.start(__FILE__)
data/bin/test-live CHANGED
@@ -21,6 +21,7 @@ Tangany.client_secret = ENV.fetch("TEST_TANGANY_CLIENT_SECRET", "test")
21
21
  Tangany.environment = "testnet"
22
22
  Tangany.subscription = ENV.fetch("TEST_TANGANY_SUBSCRIPTION", "test")
23
23
  Tangany.vault_url = ENV.fetch("TEST_TANGANY_VAULT_URL", "test")
24
+ Tangany.version = ENV.fetch("TEST_TANGANY_VERSION", "1")
24
25
 
25
26
  def safe_not_found(&block)
26
27
  yield
@@ -2,7 +2,7 @@ require "json"
2
2
 
3
3
  module Tangany
4
4
  class Config
5
- attr_accessor :client_id, :client_secret, :environment, :chain, :subscription, :vault_url
5
+ attr_accessor :client_id, :client_secret, :environment, :chain, :subscription, :vault_url, :version
6
6
 
7
7
  attr_reader :custody_base_url, :customers_base_url, :customers_version, :chains
8
8
 
@@ -3,11 +3,12 @@ require "faraday"
3
3
  module Tangany
4
4
  module Customers
5
5
  class Client
6
- attr_reader :adapter, :subscription
6
+ attr_reader :adapter, :subscription, :version
7
7
 
8
8
  def initialize(adapter: Faraday.default_adapter, stubs: nil)
9
9
  @adapter = adapter
10
10
  @subscription = Tangany.subscription
11
+ @version = Tangany.version
11
12
 
12
13
  @stubs = stubs
13
14
  end
@@ -4,7 +4,10 @@ module Tangany
4
4
  private
5
5
 
6
6
  def default_headers
7
- {"tangany-subscription" => client.subscription}
7
+ {
8
+ "tangany-subscription" => client.subscription,
9
+ "tangany-version" => client.version
10
+ }
8
11
  end
9
12
  end
10
13
  end
@@ -1,3 +1,3 @@
1
1
  module Tangany
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/tangany.rb CHANGED
@@ -26,7 +26,9 @@ module Tangany
26
26
  :subscription,
27
27
  :subscription=,
28
28
  :vault_url,
29
- :vault_url=
29
+ :vault_url=,
30
+ :version,
31
+ :version=
30
32
  end
31
33
  end
32
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tangany
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bitbond