auger 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.3
1
+ 1.2.4
@@ -10,7 +10,7 @@ module Auger
10
10
  end
11
11
 
12
12
  def initialize(port)
13
- @options = {:port => port}
13
+ @options = {:port => port, :timeout => 5}
14
14
  @roles = []
15
15
  @requests = []
16
16
  end
@@ -20,6 +20,11 @@ module Auger
20
20
  @roles
21
21
  end
22
22
 
23
+ ## explicit method to override use of timeout.rb in modules
24
+ def timeout(secs)
25
+ @options[:timeout] = secs
26
+ end
27
+
23
28
  def method_missing(method, arg)
24
29
  @options[method] = arg
25
30
  end
data/lib/plugins/http.rb CHANGED
@@ -25,6 +25,8 @@ module Auger
25
25
  http = Net::HTTP.new(host, options[:port])
26
26
  http.use_ssl = options[:ssl]
27
27
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE if options[:insecure]
28
+ http.open_timeout = options[:timeout]
29
+ http.read_timeout = options[:timeout]
28
30
  http.start
29
31
  http
30
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-08 00:00:00.000000000 Z
13
+ date: 2012-06-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json