ezclient 1.3.0 → 1.4.0
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 +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +9 -11
- data/README.md +1 -1
- data/Rakefile +3 -1
- data/ezclient.gemspec +1 -1
- data/lib/ezclient/request.rb +6 -1
- data/lib/ezclient/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eed245dc5cd1ca59aeda6408ae0b96747aa91fce6ba9770d37cb4cd68bced3b
|
4
|
+
data.tar.gz: 0b2503d2655fbbafa14ce64ce109aca3408fdb9fdaa92511d7627931eb5018b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 819359caed5c59b4865ec5785b8369c7f851ef8b7a313e618b52ee45d9001bc8d1e02405df2b1d846e7038eb3c8945db4ad2b72b5c2b069c4d3149bcb1ea8aaf
|
7
|
+
data.tar.gz: c4374e5f61f5b76aa49f1c6d03fdaa9836bb67d08157ab99a8948c3a616229a96e024378ca102eda7b3fa37888ece5cca7af34ce233561166b7e47f6fd460ab3
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
2
3
|
sudo: false
|
3
|
-
|
4
|
+
|
5
|
+
rvm:
|
6
|
+
- 2.4
|
7
|
+
- 2.5
|
8
|
+
- 2.6
|
9
|
+
- ruby-head
|
10
|
+
|
4
11
|
before_install: gem install bundler
|
5
|
-
|
6
|
-
script: bundle exec $SUITE
|
12
|
+
|
7
13
|
matrix:
|
8
14
|
fast_finish: true
|
9
|
-
include:
|
10
|
-
- rvm: 2.3
|
11
|
-
- rvm: 2.4
|
12
|
-
- rvm: 2.5
|
13
|
-
- rvm: 2.6
|
14
|
-
- rvm: ruby-head
|
15
|
-
- rvm: 2.6
|
16
|
-
env: SUITE="rubocop"
|
17
15
|
allow_failures:
|
18
16
|
- rvm: ruby-head
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ Valid client options are:
|
|
43
43
|
- `on_retry` – callback called on request retry
|
44
44
|
- `retry_exceptions` – an array of exception classes to retry
|
45
45
|
- `ssl_context` – ssl context for requests (an `OpenSSL::SSL::SSLContext` instance)
|
46
|
-
- `timeout` – timeout for requests in seconds
|
46
|
+
- `timeout` – timeout for requests in seconds or hash like `{ read: 5, write: 5, connect: 1 }`
|
47
47
|
- `follow` - enable following redirects (`true` or hash with options – e.g. `{ max_hops: 1, strict: false}`)
|
48
48
|
|
49
49
|
All these options are passed to each request made by this client but can be overriden on per-request basis.
|
data/Rakefile
CHANGED
data/ezclient.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require "ezclient/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.required_ruby_version = ">= 2.
|
8
|
+
spec.required_ruby_version = ">= 2.4.0"
|
9
9
|
|
10
10
|
spec.name = "ezclient"
|
11
11
|
spec.version = EzClient::VERSION
|
data/lib/ezclient/request.rb
CHANGED
@@ -139,7 +139,12 @@ class EzClient::Request
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def timeout
|
142
|
-
options[:timeout]
|
142
|
+
case options[:timeout]
|
143
|
+
when Hash
|
144
|
+
options[:timeout].transform_values! { |value| value&.to_f }
|
145
|
+
else
|
146
|
+
options[:timeout]&.to_f
|
147
|
+
end
|
143
148
|
end
|
144
149
|
|
145
150
|
def on_complete
|
data/lib/ezclient/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuri Smirnov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -174,14 +174,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
174
|
requirements:
|
175
175
|
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
|
-
version: 2.
|
177
|
+
version: 2.4.0
|
178
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
179
|
requirements:
|
180
180
|
- - ">="
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
|
-
rubygems_version: 3.0.
|
184
|
+
rubygems_version: 3.0.6
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: An HTTP gem wrapper for easy persistent connections and more.
|