soaspec 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/soaspec/exchange_handlers/request/rest_request.rb +10 -0
- data/lib/soaspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a62c78f628d87375f05c3dca678049737671a395cdc94cd0dc210ab24fd6e2e8
|
4
|
+
data.tar.gz: 0d295df645f3ba7b66ca202d3fabf2b43d5e6a4f7d1e9fceda654a816ae7d26d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b026f3949b1cee51b90e17a72130106897d52e50b4d68d663aad32c76a3a9d57f3290fc8b1b31ee9bde4411a10364c90e35341e90abbadabd1f0684db5cc718
|
7
|
+
data.tar.gz: 6e2efcdeb04dc8bb0b4afe6e15856a611e7f11525b16064a143c76673f9653c2e83715553b20371bfd47050a7ace7c64e950993458ec8076f33f7270f16bedd1
|
data/ChangeLog
CHANGED
@@ -28,6 +28,10 @@ module Soaspec
|
|
28
28
|
attr_accessor :headers
|
29
29
|
# @return [Soaspec::RestHandler] RestHandler used for this request
|
30
30
|
attr_accessor :rest_handler
|
31
|
+
# @return [Integer] Maximum number of times to retry for a socket error
|
32
|
+
MAX_SOCKET_RETRIES = 3
|
33
|
+
# @return [Integer] Attempts to try socket
|
34
|
+
attr_accessor :socket_tries
|
31
35
|
|
32
36
|
# @return [String] Base url plus sub url
|
33
37
|
def full_url
|
@@ -62,6 +66,7 @@ module Soaspec
|
|
62
66
|
# @param [Hash] options Headers and basic auth options
|
63
67
|
# @param [< Soaspec::RestHandler] rest_handler RestHandler handling creation of this request
|
64
68
|
def initialize(overall, options, rest_handler)
|
69
|
+
self.socket_tries = 0
|
65
70
|
self.rest_handler = rest_handler
|
66
71
|
overall_params = interpret_parameters(overall)
|
67
72
|
@overall_params = overall_params.dup
|
@@ -123,6 +128,11 @@ module Soaspec
|
|
123
128
|
raise e unless e.respond_to? :response
|
124
129
|
|
125
130
|
e.response
|
131
|
+
rescue SocketError => e
|
132
|
+
self.socket_tries += 1
|
133
|
+
sleep 0.5
|
134
|
+
retry unless socket_tries > MAX_SOCKET_RETRIES
|
135
|
+
raise e
|
126
136
|
end
|
127
137
|
|
128
138
|
# Work out data to send based upon payload, template_name, or body
|
data/lib/soaspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soaspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|