soaspec 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/Gemfile.lock +1 -1
- data/lib/soaspec.rb +11 -0
- data/lib/soaspec/basic_soap_handler.rb +2 -2
- data/lib/soaspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdba31fc0514774f52929a5d74be081121608461
|
4
|
+
data.tar.gz: 1a757b0ef66cab3fd56812fade4db84a95d8f972
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1c489a68b27a6ede802285c3ad01e405d0073db617194cdbd64b9318d65eb6db3a94c32b6237a71186d1dcd65412c2523ff540bc1a0a752e0072841c5046135
|
7
|
+
data.tar.gz: 90c94d2d84258a167e490380590a0adbbae4b3ba66f2aedf2687326374e250334ce07fbb7bdbd262259a62ff82a159ef6ba679d77aa62c4a6a7aa39a81d4a7c6
|
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
Version 0.0.15 / 2018-1-23
|
2
|
+
* Fixes
|
3
|
+
* Updated code to convert string key in Savon request to key automatically by default before passing to Savon. This saves
|
4
|
+
the user doing the conversion themselves.
|
5
|
+
|
1
6
|
Version 0.0.14 / 2018-1-23
|
2
7
|
* Fixes
|
3
8
|
* Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
|
data/Gemfile.lock
CHANGED
data/lib/soaspec.rb
CHANGED
@@ -26,6 +26,7 @@ module Soaspec
|
|
26
26
|
# Represents Environment parameters used in Soaspec tests
|
27
27
|
module Environment
|
28
28
|
|
29
|
+
# Used so that exchange class knows what context it's in
|
29
30
|
def self.api_handler=(handler)
|
30
31
|
@api_handler = handler
|
31
32
|
end
|
@@ -33,5 +34,15 @@ module Soaspec
|
|
33
34
|
def self.api_handler
|
34
35
|
@api_handler
|
35
36
|
end
|
37
|
+
|
38
|
+
# Whether to transform strings to keys automatically
|
39
|
+
def self.always_use_keys=(use_keys)
|
40
|
+
@always_use_keys = use_keys
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.always_use_keys?
|
44
|
+
@always_use_keys || true
|
45
|
+
end
|
46
|
+
|
36
47
|
end
|
37
48
|
end
|
@@ -70,7 +70,7 @@ module Soaspec
|
|
70
70
|
def make_request(override_parameters)
|
71
71
|
test_values = override_parameters # Used in Erb
|
72
72
|
# Erb parses template file, executing Ruby code in `<% %>` blocks to work out final request
|
73
|
-
test_values = test_values.transform_keys_to_symbols
|
73
|
+
test_values = test_values.transform_keys_to_symbols unless Soaspec::Environment.always_use_keys?
|
74
74
|
if @request_option == :template
|
75
75
|
request_body = File.read('template/' + template_name + '.xml')
|
76
76
|
render_body = ERB.new(request_body).result(binding)
|
@@ -82,7 +82,7 @@ module Soaspec
|
|
82
82
|
|
83
83
|
def default_hash=(hash)
|
84
84
|
@request_option = :hash
|
85
|
-
@default_hash = hash
|
85
|
+
@default_hash = Soaspec::Environment.always_use_keys? ? hash.transform_keys_to_symbols : hash
|
86
86
|
end
|
87
87
|
|
88
88
|
def status_code_for(response)
|
data/lib/soaspec/version.rb
CHANGED