diff options
| author | mokha <mokha@cisco.com> | 2018-08-14 12:02:32 -0600 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-08-14 12:02:32 -0600 |
| commit | 7a2723c988601449c032712421a8cbff690f5ca4 (patch) | |
| tree | 8731839952e7326d10ae61291c4b01e540221936 | |
| parent | 59f8fbc873af687358be7a71e5f656a1a8f5ead7 (diff) | |
allow read_timeout override.
| -rw-r--r-- | lib/net/hippie/client.rb | 4 | ||||
| -rw-r--r-- | lib/net/hippie/version.rb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/net/hippie/client.rb b/lib/net/hippie/client.rb index 21a6cb5..2760d74 100644 --- a/lib/net/hippie/client.rb +++ b/lib/net/hippie/client.rb @@ -11,6 +11,7 @@ module Net }.freeze attr_accessor :mapper + attr_accessor :read_timeout def initialize( certificate: nil, @@ -24,6 +25,7 @@ module Net @key = key @mapper = ContentTypeMapper.new @passphrase = passphrase + @read_timeout = 30 @verify_mode = verify_mode end @@ -66,7 +68,7 @@ module Net def http_for(uri) http = Net::HTTP.new(uri.host, uri.port) - http.read_timeout = 30 + http.read_timeout = read_timeout http.use_ssl = uri.scheme == 'https' http.verify_mode = verify_mode http.set_debug_output(Net::Hippie.logger) diff --git a/lib/net/hippie/version.rb b/lib/net/hippie/version.rb index 3d28817..afbc35d 100644 --- a/lib/net/hippie/version.rb +++ b/lib/net/hippie/version.rb @@ -2,6 +2,6 @@ module Net module Hippie - VERSION = '0.1.8' + VERSION = '0.1.9' end end |
