soaspec 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a62c78f628d87375f05c3dca678049737671a395cdc94cd0dc210ab24fd6e2e8
4
- data.tar.gz: 0d295df645f3ba7b66ca202d3fabf2b43d5e6a4f7d1e9fceda654a816ae7d26d
3
+ metadata.gz: 8a68172ce21318f8672a99f1495ebbce59fecc4617e0e3bc91505658fab127dd
4
+ data.tar.gz: 7f6aa9f1a6850a8733220ab1e0443b247b2edea75f4fcdd2d96d74b9a8c8d51d
5
5
  SHA512:
6
- metadata.gz: 7b026f3949b1cee51b90e17a72130106897d52e50b4d68d663aad32c76a3a9d57f3290fc8b1b31ee9bde4411a10364c90e35341e90abbadabd1f0684db5cc718
7
- data.tar.gz: 6e2efcdeb04dc8bb0b4afe6e15856a611e7f11525b16064a143c76673f9653c2e83715553b20371bfd47050a7ace7c64e950993458ec8076f33f7270f16bedd1
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
- @overall_params[:payload] = JSON.generate(rest_handler.hash_used_in_request(@overall_params[:body])).to_s
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
- test_values = @overall_params[:body].dup if @overall_params[:body]
147
- Soaspec::TemplateReader.new.render_body(rest_handler.template_name, test_values || @overall_params)
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Soaspec
4
4
  # @return [String] Version of the gem
5
- VERSION = '0.3.9'
5
+ VERSION = '0.3.10'
6
6
  end
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.9
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-03 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler