acfs 1.3.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/acfs/adapter/typhoeus.rb +14 -4
- data/lib/acfs/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f998ff3e28801676c732fa44df93e18f651e96eb986c857c61b7f25b312a2c1
|
4
|
+
data.tar.gz: a122064cb630a664489629ef658d5ecde917ced4cdc43a600b49d0e18e00bea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7801c96d794f08ad03b9ad204f8e7c8b611300922b12714ce7864a33c5a6268bc47c42e66b86c410358f17a0439d382c358ba15283eee07ff092d19a1f86a8be
|
7
|
+
data.tar.gz: 78b2c804251fb6aaee270d9c894ff36b7b8dc7bb777148de55963255847fc28adcdbff9c7132352c5448bef7b9980fd72e6a14ffceda38540d661aceaf1e5e9d
|
data/CHANGELOG.md
CHANGED
@@ -4,11 +4,18 @@ require 'typhoeus'
|
|
4
4
|
|
5
5
|
module Acfs
|
6
6
|
module Adapter
|
7
|
+
DEFAULT_OPTIONS = {
|
8
|
+
tcp_keepalive: true,
|
9
|
+
tcp_keepidle: 5,
|
10
|
+
tcp_keepintvl: 5
|
11
|
+
}.freeze
|
12
|
+
|
7
13
|
# Adapter for Typhoeus.
|
8
14
|
#
|
9
15
|
class Typhoeus < Base
|
10
|
-
def initialize(**kwargs)
|
11
|
-
@
|
16
|
+
def initialize(opts: {}, **kwargs)
|
17
|
+
@opts = DEFAULT_OPTIONS.merge(opts)
|
18
|
+
@kwargs = kwargs
|
12
19
|
end
|
13
20
|
|
14
21
|
def start
|
@@ -31,11 +38,11 @@ module Acfs
|
|
31
38
|
protected
|
32
39
|
|
33
40
|
def hydra
|
34
|
-
@hydra ||= ::Typhoeus::Hydra.new(**@
|
41
|
+
@hydra ||= ::Typhoeus::Hydra.new(**@kwargs)
|
35
42
|
end
|
36
43
|
|
37
44
|
def convert_request(req)
|
38
|
-
|
45
|
+
opts = {
|
39
46
|
method: req.method,
|
40
47
|
params: req.params,
|
41
48
|
headers: req.headers.merge(
|
@@ -43,6 +50,9 @@ module Acfs
|
|
43
50
|
'Transfer-Encoding' => ''
|
44
51
|
),
|
45
52
|
body: req.body
|
53
|
+
}
|
54
|
+
|
55
|
+
request = ::Typhoeus::Request.new(req.url, **@opts.merge(opts))
|
46
56
|
|
47
57
|
request.on_complete do |response|
|
48
58
|
if response.timed_out?
|
data/lib/acfs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|