cryptomate_api 0.1.1 → 0.1.3

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: 2934877f08fcb9cce9116549bf5bb460b64bb6d369eb2b64bc93240596aaa5b5
4
- data.tar.gz: 971f5a89e2daaf0d59259323bbd6d949084908a0485bd3dfad8979db66d52f99
3
+ metadata.gz: 199775a68145d85d1b95f122bc91c1a96a25a3da16b779fd6add53c438503f63
4
+ data.tar.gz: 8fe4b6f42b8ae304f70395db1fc78d2fa072ab1717b87ba1bbfed77076dfd2ef
5
5
  SHA512:
6
- metadata.gz: f56fe67a654ec7fe49f35e84b8320ebc8fd5415e96bda14876a1765a1ea8d9c10c3d099364734d7f5a0d29e7d1296b441a596a9df62b1f908f2a1d4eb6a59048
7
- data.tar.gz: e81cd4cd4d3085a0ef015bd53801d928219053c9b9700489859befd3693c55d9b0200c087261671b4d5cba50b1ab7c53333978b4db67c905a69195f310452229
6
+ metadata.gz: ff6ef0361d747f4882e52942cd07204bc9aa9d3e76b6d537016702004b36b86b070b35cf1ba08cc0bcda83a108e3ce9dfb14887532b65b8ebb846710f0e7ccdb
7
+ data.tar.gz: a80ba960eb60371ef13fb766a5a4eb4e3bd3a3105d3069878608b1459512c1a5421d897285ba6e3f654812a3a9c193631a775b19a3f59cc7e07e6d2c53ea3735
@@ -3,11 +3,12 @@ require 'httparty'
3
3
  module CryptomateApi
4
4
  class Base
5
5
  include HTTParty
6
- base_uri CryptomateApi.configuration.base_uri
7
6
 
8
7
  # Initializes the client with the given API key
9
- def initialize(api_key = CryptomateApi.configuration.api_key)
10
- @api_key = api_key
8
+ def initialize
9
+ CryptomateApi.configuration ||= CryptomateApi::Configuration.new
10
+ @api_key = CryptomateApi.configuration.api_key
11
+ self.class.base_uri CryptomateApi.configuration.base_uri
11
12
  self.class.headers "Authorization" => "Bearer #{@api_key}"
12
13
  end
13
14
  end
@@ -11,7 +11,7 @@ module CryptomateApi
11
11
  end
12
12
 
13
13
  class Configuration
14
- attr_accessor :api_key
14
+ attr_accessor :api_key, :base_uri
15
15
 
16
16
  def initialize
17
17
  @api_key = nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CryptomateApi
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'cryptomate_api/base'
4
3
  require_relative 'cryptomate_api/configuration'
4
+ require_relative 'cryptomate_api/base'
5
5
 
6
6
  Dir[File.join(__dir__, 'cryptomate_api/{management,mpc,nft}/**/*.rb')].sort.each { |file| require file }
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptomate_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Albarello
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
11
+ date: 2023-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty