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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46140352fd22984ff4f5dd0b58e103145560e0c49483a2b478decdfce5ba03f4
4
- data.tar.gz: 29d4c1767beb1637a84c8ddb227ce29fba8b58a4de00456eaf0c5a617968ecae
3
+ metadata.gz: 6f998ff3e28801676c732fa44df93e18f651e96eb986c857c61b7f25b312a2c1
4
+ data.tar.gz: a122064cb630a664489629ef658d5ecde917ced4cdc43a600b49d0e18e00bea7
5
5
  SHA512:
6
- metadata.gz: 9e62d17adf91634bbf1ee4799c7915674135812c53e31e447a0a5edece1853973399e69eecafeb87f8c6a510f0a3e593da7f7b075aae63d6c10b74e7dcfc36c9
7
- data.tar.gz: 43631bee9b0ecee7d4132cc624464066bec35ec762a0531801d4ab1dfb97f2299b598bd45835c0bce1a9bbf94bae9ad38f88519c6efdb9ff8c5f295bfed8e4e5
6
+ metadata.gz: 7801c96d794f08ad03b9ad204f8e7c8b611300922b12714ce7864a33c5a6268bc47c42e66b86c410358f17a0439d382c358ba15283eee07ff092d19a1f86a8be
7
+ data.tar.gz: 78b2c804251fb6aaee270d9c894ff36b7b8dc7bb777148de55963255847fc28adcdbff9c7132352c5448bef7b9980fd72e6a14ffceda38540d661aceaf1e5e9d
@@ -14,6 +14,14 @@
14
14
  ### Breaks
15
15
 
16
16
 
17
+ ## 1.4.0 - (2020-06-12)
18
+ ---
19
+
20
+ ### New
21
+ * Use strict TCP keepalive probing by default (5s/5s)
22
+ * Adapter accepts curl request opts
23
+
24
+
17
25
  ## 1.3.4 - (2020-03-22)
18
26
  ---
19
27
 
@@ -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
- @options = kwargs
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(**@options)
41
+ @hydra ||= ::Typhoeus::Hydra.new(**@kwargs)
35
42
  end
36
43
 
37
44
  def convert_request(req)
38
- request = ::Typhoeus::Request.new req.url,
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?
@@ -3,8 +3,8 @@
3
3
  module Acfs
4
4
  module VERSION
5
5
  MAJOR = 1
6
- MINOR = 3
7
- PATCH = 4
6
+ MINOR = 4
7
+ PATCH = 0
8
8
  STAGE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join('.')
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.3.4
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-03-22 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack