soaspec 0.0.74 → 0.0.75
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.rb +17 -5
- data/lib/soaspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a8fec6c74ba6ad782e2dce4d39a49d1dbc719ee
|
4
|
+
data.tar.gz: 919092a45ef2d124747918a65377b326f0ea1394
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2925eca0d16b2598d2f441a0f897d218203eacc55f218ae83e4dd8e245cddb453274bc0bddb421ecff3349b3fcaeedd29128278627c385f9005c68aed5603c0f
|
7
|
+
data.tar.gz: a495c1ac581a044b6df14abc29ecb871d03bc0b1ed804b3aa78f29f951cb4f1a4176ec37175cad0e7749b5fcbac8f9e4aeb3a0cc1258bb4ee9a86e32947ea505
|
data/ChangeLog
CHANGED
data/lib/soaspec/exchange.rb
CHANGED
@@ -13,6 +13,17 @@ module ExchangeAccessors
|
|
13
13
|
handler_class.new name, params_used
|
14
14
|
end
|
15
15
|
end
|
16
|
+
|
17
|
+
# Set retry_for_success to true, retrying response until a successful status code is returned
|
18
|
+
def expect_positive_status(retry_count: 3)
|
19
|
+
define_method('retry_count') do
|
20
|
+
retry_count
|
21
|
+
end
|
22
|
+
define_method('retry_for_success?') do
|
23
|
+
true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
16
27
|
end
|
17
28
|
|
18
29
|
# This represents a request / response pair
|
@@ -105,7 +116,7 @@ class Exchange
|
|
105
116
|
# @param [Symbol] name Name of method to use to access this value within handler
|
106
117
|
# @param [String] value Path to value to store
|
107
118
|
def store(name, value)
|
108
|
-
|
119
|
+
exchange_handler.store(name, self[value])
|
109
120
|
end
|
110
121
|
|
111
122
|
# Retrieve the stored value from the Api Handler
|
@@ -137,7 +148,7 @@ class Exchange
|
|
137
148
|
# Get status code from api class. This is http response for Web Api
|
138
149
|
# @return [Integer] Status code from api class
|
139
150
|
def status_code
|
140
|
-
|
151
|
+
exchange_handler.status_code_for(response)
|
141
152
|
end
|
142
153
|
|
143
154
|
# Dummy request used to make a request without verifying it and ignoring WSDL errors
|
@@ -163,7 +174,7 @@ class Exchange
|
|
163
174
|
# @param [Object] path Path to return element for api class E.g - for SOAP this is XPath string. For JSON, this is Hash dig Array
|
164
175
|
# @return [String] Value at path
|
165
176
|
def [](path)
|
166
|
-
|
177
|
+
exchange_handler.value_from_path(response, path.to_s)
|
167
178
|
end
|
168
179
|
|
169
180
|
# Set a parameter request in the request body.
|
@@ -175,8 +186,8 @@ class Exchange
|
|
175
186
|
end
|
176
187
|
|
177
188
|
# Implement undefined setter with []= for FactoryBot to use without needing to define params to set
|
178
|
-
# @param [Object] method_name
|
179
|
-
# @param [Object] args
|
189
|
+
# @param [Object] method_name Name of method not defined
|
190
|
+
# @param [Object] args Arguments passed to method
|
180
191
|
# @param [Object] block
|
181
192
|
def method_missing(method_name, *args, &block)
|
182
193
|
if method_name[-1] == '=' # A setter method
|
@@ -201,6 +212,7 @@ class Exchange
|
|
201
212
|
# Used by FactoryBot
|
202
213
|
# @return [Self]
|
203
214
|
def save!
|
215
|
+
@retry_for_success = true # Assume using Factory you'll want a positive response
|
204
216
|
call
|
205
217
|
self
|
206
218
|
end
|
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.0.
|
4
|
+
version: 0.0.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|