soaspec 0.3.9 → 0.3.10
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 +9 -4
- 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: 8a68172ce21318f8672a99f1495ebbce59fecc4617e0e3bc91505658fab127dd
|
4
|
+
data.tar.gz: 7f6aa9f1a6850a8733220ab1e0443b247b2edea75f4fcdd2d96d74b9a8c8d51d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 751fbd2a339bdc59490befd592becc2319dd7ca165f6887f8640d8fb6e1cbe87b224a235b0dce0cbc4bad255048ad2d8d320895926846199b9fd66b00cf82681
|
7
|
+
data.tar.gz: fa62bc0cc31a907168583dbd09dda939f3e3f000c420044e45a34a2cadeef19b9c81abd42451c9d25dc1347b298404fa8f18c01cb289b28dde14e8644f9005aa
|
data/ChangeLog
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
Version 0.3.10
|
2
|
+
* Enhancement
|
3
|
+
* Create `body_params` method on RestRequest object to return Hash of parameters used to form request body
|
4
|
+
|
1
5
|
Version 0.3.9
|
2
6
|
* Enhancement
|
3
7
|
* Have default RestHandler::RestRequest::MAX_SOCKET_RETRIES to handle intermittent SocketErrors
|
@@ -13,6 +13,10 @@ module Soaspec
|
|
13
13
|
# {"test":5}
|
14
14
|
# @return [String] Body of request sent. Payload that will be sent in request
|
15
15
|
attr_accessor :body
|
16
|
+
# These can be used to verify components of a request are as expected or other operations that
|
17
|
+
# are useful with a Hash
|
18
|
+
# @return [Hash] Parameters that will be used to form request string
|
19
|
+
attr_accessor :body_params
|
16
20
|
# @return [String] Name given to test to describe it
|
17
21
|
attr_accessor :test_name
|
18
22
|
# @return [String] User used in basic auth
|
@@ -140,11 +144,12 @@ module Soaspec
|
|
140
144
|
def post_data
|
141
145
|
option = rest_handler.request_option
|
142
146
|
body = if option == :hash && !@overall_params[:payload]
|
143
|
-
|
147
|
+
self.body_params = rest_handler.hash_used_in_request(@overall_params[:body])
|
148
|
+
@overall_params[:payload] = JSON.generate(body_params)
|
144
149
|
elsif option == :template
|
145
|
-
test_values = nil
|
146
|
-
|
147
|
-
Soaspec::TemplateReader.new.render_body(rest_handler.template_name,
|
150
|
+
test_values = @overall_params[:body] ? @overall_params[:body].dup : nil
|
151
|
+
self.body_params = test_values || @overall_params
|
152
|
+
Soaspec::TemplateReader.new.render_body(rest_handler.template_name, body_params)
|
148
153
|
else
|
149
154
|
@overall_params[:payload]
|
150
155
|
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.3.
|
4
|
+
version: 0.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|