soaspec 0.0.31 → 0.0.32
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/Gemfile.lock +1 -1
- data/exe/soaspec-init +1 -1
- data/lib/soaspec/exchange_handlers/rest_handler.rb +9 -14
- data/lib/soaspec/exchange_handlers/soap_handler.rb +0 -5
- 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: 597b71f266eacf309da4a897e8e27a3601b55bd1
|
4
|
+
data.tar.gz: f5ad76b346a6dcee607d6b2976a6731ba85467c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a8f3cad9b2baadf8200a1af67bd7233efbf255d2f062782912c06e22316eebf28f23a96b62b8f7bba6749a5cf636bff3c67deffba21427db6381a6396eb9f02
|
7
|
+
data.tar.gz: fca37bd39cda4f3e78afa7cb25cc165ba4a8ebce3186c520f21dd97afff3031761cd8bb93d5302085b66ae10e4527e9cc278f088ec2fa0212786b86759faa63d
|
data/ChangeLog
CHANGED
data/Gemfile.lock
CHANGED
data/exe/soaspec-init
CHANGED
@@ -65,7 +65,7 @@ soap_example.default_hash = { city_name: 'Sydney', country_name: 'Australia' }
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
describe Exchange.new(:japan, data_for(
|
68
|
+
describe Exchange.new(:japan, data_for('default/japan')) do
|
69
69
|
it_behaves_like 'success scenario'
|
70
70
|
its(['//xmlns:GetWeatherResult']) { is_expected.to eq 'Data Not Found' } # Can specify namespace if wanted
|
71
71
|
end
|
@@ -54,32 +54,27 @@ module Soaspec
|
|
54
54
|
super
|
55
55
|
end
|
56
56
|
|
57
|
-
def name(name)
|
58
|
-
@test_name = name
|
59
|
-
self
|
60
|
-
end
|
61
|
-
|
62
57
|
# Used in together with Exchange request that passes such override parameters
|
63
58
|
# @param [Hash] override_parameters Params to characterize REST request
|
59
|
+
# @param_value [params] Extra parameters (E.g. headers)
|
60
|
+
# @param_value [suburl] URL appended to base_url of clss
|
61
|
+
# @param_value [method] REST method (get, post, etc)
|
64
62
|
def make_request(override_parameters)
|
65
63
|
test_values = override_parameters
|
66
64
|
test_values[:params] ||= {}
|
67
65
|
test_values[:suburl] = test_values[:suburl].to_s if test_values[:suburl]
|
68
66
|
|
67
|
+
@resource_used = test_values[:suburl] ? @resource[test_values[:suburl]] : @resource
|
68
|
+
|
69
69
|
begin
|
70
70
|
response = case test_values[:method]
|
71
71
|
when :post
|
72
|
-
|
73
|
-
|
74
|
-
else
|
75
|
-
@resource.send(test_values[:method].to_s, test_values[:payload], test_values[:params])
|
72
|
+
unless test_values[:payload]
|
73
|
+
test_values[:payload] = JSON.generate(test_values[:body]).to_s if test_values[:body]
|
76
74
|
end
|
75
|
+
@resource_used.send(test_values[:method].to_s, test_values[:payload], test_values[:params])
|
77
76
|
else
|
78
|
-
|
79
|
-
@resource[test_values[:suburl]].send(test_values[:method].to_s, test_values[:params])
|
80
|
-
else
|
81
|
-
@resource.send(test_values[:method].to_s, test_values[:params])
|
82
|
-
end
|
77
|
+
@resource_used.send(test_values[:method].to_s, test_values[:params])
|
83
78
|
end
|
84
79
|
rescue RestClient::ExceptionWithResponse => e
|
85
80
|
response = e.response
|
@@ -79,11 +79,6 @@ module Soaspec
|
|
79
79
|
super
|
80
80
|
end
|
81
81
|
|
82
|
-
def name(name)
|
83
|
-
@test_name = name
|
84
|
-
self
|
85
|
-
end
|
86
|
-
|
87
82
|
# Used in together with Exchange request that passes such override parameters
|
88
83
|
def make_request(override_parameters)
|
89
84
|
test_values = override_parameters # Used in Erb
|
data/lib/soaspec/version.rb
CHANGED