eezee 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/eezee/client/requester.rb +11 -6
- data/lib/eezee/request.rb +3 -1
- data/lib/eezee/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b7c682c3a866eb358e65f38a97f231cdb94fff7f09fdd390d354d7b1345fd0f
|
4
|
+
data.tar.gz: a265ae175efd2676f61437347501821ae7dde110df4405f7166e509cb740c2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6f92103ef4b0673c71080b52389c1587f2714b6825117bfc27c3b4e03f14b81378e765ff17d1c5a019d9e31fb8fbaae8c5eaee5b1f513914a37983bd403ea59
|
7
|
+
data.tar.gz: 5344e9609432588e8ef717bf528b11017765fdee25957a0034cac4bd1a4b71d4bb3cb0e24e6f4c7bbd109d123bcb97b943732a394c17dc0eac09fb5bb213d716
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -180,7 +180,7 @@ Here are the list of available options and about them:
|
|
180
180
|
| `logger` | No | `false` | If you want to log the request, response, and error | `true` |
|
181
181
|
| `url_encoded` | No | `false` | If you want to send request body as form_url_encoded | `true` |
|
182
182
|
| `preserve_url_params` | No | `false` | The query params will be preserved if the url or path has a nested param like `:character_id` this value will be not replaced | `true` |
|
183
|
-
|
183
|
+
| `ddtrace` | No | `nil` | Support for [DataDog apm](http://gems.datadoghq.com/trace/docs/#Faraday) | `{}` |
|
184
184
|
|
185
185
|
### Services
|
186
186
|
|
@@ -72,14 +72,19 @@ module Eezee
|
|
72
72
|
|
73
73
|
def build_faraday_client(request)
|
74
74
|
Faraday.new(request.uri) do |config|
|
75
|
-
config
|
76
|
-
config.use(Faraday::Response::RaiseError) if request.raise_error
|
77
|
-
config.headers = request.headers if request.headers
|
78
|
-
config.options[:open_timeout] = request.open_timeout if request.open_timeout
|
79
|
-
config.options[:timeout] = request.timeout if request.timeout
|
80
|
-
config.adapter(Faraday.default_adapter)
|
75
|
+
faraday_client_options!(config, request)
|
81
76
|
end
|
82
77
|
end
|
78
|
+
|
79
|
+
def faraday_client_options!(config, request)
|
80
|
+
config.request :url_encoded if request.url_encoded
|
81
|
+
config.use(Faraday::Response::RaiseError) if request.raise_error
|
82
|
+
config.headers = request.headers if request.headers
|
83
|
+
config.options[:open_timeout] = request.open_timeout if request.open_timeout
|
84
|
+
config.options[:timeout] = request.timeout if request.timeout
|
85
|
+
config.adapter(Faraday.default_adapter)
|
86
|
+
config.use(:ddtrace, request.ddtrace) if request.ddtrace.any?
|
87
|
+
end
|
83
88
|
end
|
84
89
|
end
|
85
90
|
end
|
data/lib/eezee/request.rb
CHANGED
@@ -17,6 +17,7 @@ module Eezee
|
|
17
17
|
url
|
18
18
|
url_encoded
|
19
19
|
preserve_url_params
|
20
|
+
ddtrace
|
20
21
|
].freeze
|
21
22
|
|
22
23
|
DEFAULT = {
|
@@ -26,7 +27,8 @@ module Eezee
|
|
26
27
|
payload: {},
|
27
28
|
raise_error: false,
|
28
29
|
url_encoded: false,
|
29
|
-
preserve_url_params: false
|
30
|
+
preserve_url_params: false,
|
31
|
+
ddtrace: {}
|
30
32
|
}.freeze
|
31
33
|
|
32
34
|
attr_accessor(*(ACCESSORS | %i[uri method]))
|
data/lib/eezee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eezee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linqueta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -233,6 +233,7 @@ executables: []
|
|
233
233
|
extensions: []
|
234
234
|
extra_rdoc_files: []
|
235
235
|
files:
|
236
|
+
- CHANGELOG.md
|
236
237
|
- MIT-LICENSE
|
237
238
|
- README.md
|
238
239
|
- lib/eezee.rb
|