codat 0.1.6.1 → 0.1.6.2

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: 70707b14ad426a89a08c86266fbad954d69621817a08185405c890f8862c82e3
4
- data.tar.gz: 9a8e92a6563be17ec4f9ceb92045077b8bc14fb39a9b97aeb875c6196c47e532
3
+ metadata.gz: ae2c228ff23319fc43317fba5c36ad7b383076fc9a697f7c26b1d37295d51682
4
+ data.tar.gz: 0b200e0fbcdbe681a49598687ecc08296dba9716659e5a41a13f703aab2b63b0
5
5
  SHA512:
6
- metadata.gz: ccbb595335689a4a424e4c767e7710046a1a6d3dc06f507e93ff0d37df5bfe7ea808e3bdde29ebe31103174dd067fcd51e98a507e7b2aef25eb5dc104e6fe3d2
7
- data.tar.gz: 1054a5856b663c9168138c044d5cf3b5eacff7c492ce220f93fc51e31a37e1290286bfc2cbe65908d929911633ee9cf752ce39590442d3b0e47b9c44050de51c
6
+ metadata.gz: 5832aeab0c143032910b46dea8148272861f232c676568b50478cbd78ab74dc14b621f5547c2d4510ec5a353ff3231d41e2ec44b11f0761496b70fae598d57e2
7
+ data.tar.gz: e9d6b74f9f6832ebe928c6bbbb905ea2924370c94b8f92101eee23d170a584006c219b5c349a13241672d21f13833640862476dfe60a94d8e0830b5eb656ca97
data/lib/codat/client.rb CHANGED
@@ -11,10 +11,6 @@ module Codat
11
11
  uat: 'https://api-uat.codat.io/'
12
12
  }.freeze
13
13
 
14
- def initialize
15
- Faraday::Request.register_middleware codat_auth: -> { Codat::FaradayCodatAuth }
16
- end
17
-
18
14
  def get(path, params = {})
19
15
  connection.get(path, params)
20
16
  end
@@ -25,7 +21,7 @@ module Codat
25
21
 
26
22
  def connection
27
23
  @connection ||= Faraday.new(url: api_url) do |conn|
28
- conn.request :codat_auth, Codat.configuration.api_key
24
+ conn.use Codat::FaradayCodatAuth, Codat.configuration.api_key
29
25
  conn.response :json, parser_options: { symbolize_names: true }
30
26
  # conn.response :logger # if Codat.configuration.debug?
31
27
  conn.adapter Faraday.default_adapter
data/lib/codat/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Codat
4
- VERSION = '0.1.6.1'
4
+ VERSION = '0.1.6.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.1
4
+ version: 0.1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero