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 +4 -4
- data/lib/codat/client.rb +1 -5
- data/lib/codat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae2c228ff23319fc43317fba5c36ad7b383076fc9a697f7c26b1d37295d51682
|
4
|
+
data.tar.gz: 0b200e0fbcdbe681a49598687ecc08296dba9716659e5a41a13f703aab2b63b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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