soaspec 0.2.1 → 0.2.2
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 +4 -4
- data/ChangeLog +4 -0
- data/lib/soaspec.rb +1 -0
- data/lib/soaspec/exchange_handlers/rest_handler.rb +1 -2
- data/lib/soaspec/exchange_handlers/soap_handler.rb +1 -0
- data/lib/soaspec/indifferent_hash.rb +7 -0
- data/lib/soaspec/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1be796f9ede9ecbecec8effaa198c8e7393e3648
|
4
|
+
data.tar.gz: c80d4e76e7e5fc58e7457fa774e5a3bd7a3932c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dadb8d208c81c5158d33790d2f308be0dd940b9ee5585a04b94fd5e88ffbbd31c26b5ffc4ae9f5a0c0f3ae797b89918f1b0dd0bdb87377abe18bc2b69557511b
|
7
|
+
data.tar.gz: c21ab190b0e65a5c750d1d0127c95df18069e31416698e33b7feeafd574ab3a5127ae74866f9d30b200513e266773e6a3c0bb5ed09b1496ead2bb75ee8c427ce
|
data/ChangeLog
CHANGED
data/lib/soaspec.rb
CHANGED
@@ -10,10 +10,8 @@ require 'json'
|
|
10
10
|
require 'jsonpath'
|
11
11
|
require 'nori'
|
12
12
|
require 'erb'
|
13
|
-
require 'hashie/extensions/indifferent_access'
|
14
13
|
|
15
14
|
module Soaspec
|
16
|
-
|
17
15
|
# Wraps around Savon client defining default values dependent on the soap request
|
18
16
|
class RestHandler < ExchangeHandler
|
19
17
|
extend Soaspec::RestParameters
|
@@ -263,6 +261,7 @@ module Soaspec
|
|
263
261
|
test_values[:payload] = JSON.generate(hash_used_in_request(test_values[:body])).to_s
|
264
262
|
elsif @request_option == :template
|
265
263
|
test_values = test_values[:body].dup if test_values[:body]
|
264
|
+
test_values = IndifferentHash.new(test_values) # Allow test_values to be either Symbol or String
|
266
265
|
Soaspec::TemplateReader.new.render_body(template_name, binding)
|
267
266
|
else
|
268
267
|
test_values[:payload]
|
@@ -100,6 +100,7 @@ module Soaspec
|
|
100
100
|
# Call the SOAP operation with the request XML provided
|
101
101
|
begin
|
102
102
|
if @request_option == :template
|
103
|
+
test_values = IndifferentHash.new(test_values) # Allow test_values to be either Symbol or String
|
103
104
|
client.call(operation, xml: Soaspec::TemplateReader.new.render_body(template_name, binding))
|
104
105
|
elsif @request_option == :hash
|
105
106
|
client.call(operation, message: @default_hash.merge(test_values), attributes: request_root_attributes)
|
data/lib/soaspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soaspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
@@ -386,6 +386,7 @@ files:
|
|
386
386
|
- lib/soaspec/generator/spec/soap_spec.rb.erb
|
387
387
|
- lib/soaspec/generator/spec/spec_helper.rb.erb
|
388
388
|
- lib/soaspec/generator/template/soap_template.xml
|
389
|
+
- lib/soaspec/indifferent_hash.rb
|
389
390
|
- lib/soaspec/interpreter.rb
|
390
391
|
- lib/soaspec/matchers.rb
|
391
392
|
- lib/soaspec/not_found_errors.rb
|