routemaster-drain 1.0.3 → 1.0.4

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
  SHA1:
3
- metadata.gz: 50e4d376f02c7798065f67014ec62d18449c6d66
4
- data.tar.gz: 1e2444101e74ad434072c619993f976305f55141
3
+ metadata.gz: e9452c2ba0c6f31936f6876817ee7d67ec770b2f
4
+ data.tar.gz: 7eb4da8f25e7780b2cdef784a499d2c2407f6334
5
5
  SHA512:
6
- metadata.gz: 1d4132d8ab3caf5f414ea7debb91d501681633c84b04cc90343671f72d079d5a643f89c0670415d15b767cb00bb489e0d48c2f56a1bf9127f5f3bd74f250b05b
7
- data.tar.gz: d8a3c4e15f8e1b7ff2fb1b65461c513d1abcb4253fe1cc6641048a7318f0110eaae0e122aaba6d118c265f7f42a09e22e6cfe23b762b4c1c87d8b4aabf20f7ef
6
+ metadata.gz: 457ae9942fff794fbffc636263e4e1619f867badc0ba474ee217ffb48376aa40c4cfe887898eefe5fa1e2be44f64fe451a0677972e6a91336f0eeb6dc7459d02
7
+ data.tar.gz: cf88b0164f7292afd1e46641c07f59f0489307d55b1b4f2dd4268e037b30c2c60ad4818156206853334fe25fb07261b5a243e54918030d6831584e2f6e7dbff1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- routemaster-drain (1.0.3)
4
+ routemaster-drain (1.0.4)
5
5
  faraday (>= 0.9.0)
6
6
  faraday_middleware
7
7
  hashie
data/README.md CHANGED
@@ -67,8 +67,8 @@ Optional:
67
67
  `server1:user:p4ss,server2:user:p4ass`.
68
68
  - `ROUTEMASTER_QUEUE_NAME`: if using the cache, on which Resque queue the cache
69
69
  population jobs should be enqueued.
70
-
71
-
70
+ - `ROUTEMASTER_CACHE_TIMEOUT`: if using the cache, how long before Faraday will timeout fetching the resource. Defaults to 1 second.
71
+ - `ROUTEMASTER_CACHE_VERIFY_SSL`: if using the cache, whether to verify SSL when fetching the resource. Defaults to false.
72
72
 
73
73
  ## Illustrated use cases
74
74
 
@@ -1,5 +1,5 @@
1
1
  module Routemaster
2
2
  module Drain
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
@@ -39,7 +39,7 @@ module Routemaster
39
39
  end
40
40
 
41
41
  private
42
-
42
+
43
43
  def _connection
44
44
  @_connection ||= Faraday.new do |f|
45
45
  f.request :retry, max: 2, interval: 100e-3, backoff_factor: 2
@@ -48,10 +48,9 @@ module Routemaster
48
48
  f.response :json, content_type: /\bjson/
49
49
  f.adapter :net_http_persistent
50
50
 
51
- # TODO: make these configurable
52
- f.options.timeout = 1.0
53
- f.options.open_timeout = 1.0
54
- f.ssl.verify = false
51
+ f.options.timeout = ENV.fetch('ROUTEMASTER_CACHE_TIMEOUT', 1).to_f
52
+ f.options.open_timeout = ENV.fetch('ROUTEMASTER_CACHE_TIMEOUT', 1).to_f
53
+ f.ssl.verify = ENV.fetch('ROUTEMASTER_CACHE_VERIFY_SSL', 'false') == 'true'
55
54
  end
56
55
  end
57
56
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routemaster-drain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday