handsoap 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 1
4
- :patch: 2
4
+ :patch: 3
5
5
  :build:
@@ -20,7 +20,9 @@ module Handsoap
20
20
  @curl.url = url
21
21
  else
22
22
  @curl = ::Curl::Easy.new(url)
23
+ @curl.timeout = Handsoap.timeout
23
24
  @curl.enable_cookies = @enable_cookies
25
+ @curl.verbose = true
24
26
  end
25
27
  @curl
26
28
  end
@@ -28,9 +28,14 @@ module Handsoap
28
28
  else
29
29
  raise "Unsupported request method #{request.http_method}"
30
30
  end
31
+
31
32
  http_client = Net::HTTP.new(url.host, url.port)
33
+
34
+ #http_client.read_timeout = 120
35
+ http_client.read_timeout = Handsoap.timeout
36
+
32
37
  http_client.use_ssl = true if url.scheme == 'https'
33
- http_client.read_timeout = 120
38
+
34
39
  if request.username && request.password
35
40
  # TODO: http://codesnippets.joyent.com/posts/show/1075
36
41
  http_request.basic_auth request.username, request.password
@@ -24,6 +24,17 @@ module Handsoap
24
24
  def self.xml_query_driver=(driver)
25
25
  @xml_query_driver = Handsoap::XmlQueryFront.load_driver!(driver)
26
26
  end
27
+
28
+ # Sets the timeout
29
+ def self.timeout=(timeout)
30
+ @timeout = timeout
31
+ end
32
+
33
+ # fetches the timeout
34
+ # the default timeout is set to 60seconds
35
+ def self.timeout
36
+ @timeout || (self.timeout = 60)
37
+ end
27
38
 
28
39
  # Wraps SOAP errors in a standard class.
29
40
  class Fault < StandardError
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handsoap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-10-22 00:00:00 +02:00
13
+ date: 2009-11-04 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies: []
16
16