savon 2.12.1 → 2.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +91 -73
- data/CONTRIBUTING.md +15 -19
- data/Gemfile +2 -7
- data/README.md +15 -19
- data/RELEASING.md +10 -0
- data/lib/savon/block_interface.rb +1 -0
- data/lib/savon/builder.rb +98 -29
- data/lib/savon/client.rb +1 -0
- data/lib/savon/core_ext/string.rb +1 -0
- data/lib/savon/header.rb +2 -6
- data/lib/savon/http_error.rb +4 -4
- data/lib/savon/log_message.rb +1 -0
- data/lib/savon/message.rb +1 -0
- data/lib/savon/mock/expectation.rb +1 -0
- data/lib/savon/mock/spec_helper.rb +1 -0
- data/lib/savon/mock.rb +1 -0
- data/lib/savon/model.rb +1 -0
- data/lib/savon/operation.rb +20 -18
- data/lib/savon/options.rb +56 -0
- data/lib/savon/qualified_message.rb +3 -2
- data/lib/savon/request.rb +5 -0
- data/lib/savon/request_logger.rb +8 -2
- data/lib/savon/response.rb +48 -1
- data/lib/savon/soap_fault.rb +1 -0
- data/lib/savon/version.rb +2 -1
- data/lib/savon.rb +1 -0
- data/savon.gemspec +9 -8
- data/spec/integration/support/application.rb +33 -1
- data/spec/integration/support/server.rb +1 -0
- data/spec/integration/zipcode_example_spec.rb +5 -8
- data/spec/savon/builder_spec.rb +2 -1
- data/spec/savon/client_spec.rb +5 -4
- data/spec/savon/core_ext/string_spec.rb +2 -1
- data/spec/savon/features/message_tag_spec.rb +2 -1
- data/spec/savon/http_error_spec.rb +9 -1
- data/spec/savon/log_message_spec.rb +2 -1
- data/spec/savon/message_spec.rb +2 -11
- data/spec/savon/mock_spec.rb +2 -1
- data/spec/savon/model_spec.rb +2 -1
- data/spec/savon/multipart_request_spec.rb +46 -0
- data/spec/savon/observers_spec.rb +2 -1
- data/spec/savon/operation_spec.rb +20 -43
- data/spec/savon/options_spec.rb +40 -1
- data/spec/savon/qualified_message_spec.rb +2 -1
- data/spec/savon/request_logger_spec.rb +2 -1
- data/spec/savon/request_spec.rb +47 -6
- data/spec/savon/response_spec.rb +2 -1
- data/spec/savon/soap_fault_spec.rb +2 -1
- data/spec/savon/softlayer_spec.rb +17 -2
- data/spec/spec_helper.rb +5 -4
- data/spec/support/adapters.rb +1 -0
- data/spec/support/endpoint.rb +1 -0
- data/spec/support/fixture.rb +1 -0
- data/spec/support/integration.rb +1 -0
- data/spec/support/stdout.rb +1 -0
- metadata +55 -33
- data/.travis.yml +0 -26
- data/donate.png +0 -0
- data/spec/integration/centra_spec.rb +0 -67
- data/spec/integration/email_example_spec.rb +0 -32
- data/spec/integration/random_quote_spec.rb +0 -23
- data/spec/integration/ratp_example_spec.rb +0 -28
- data/spec/integration/stockquote_example_spec.rb +0 -34
- data/spec/integration/temperature_example_spec.rb +0 -46
@@ -1,46 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "Temperature example" do
|
4
|
-
|
5
|
-
it "converts 30 degrees celsius to 86 degrees fahrenheit" do
|
6
|
-
client = Savon.client do
|
7
|
-
# The WSDL document provided by the service.
|
8
|
-
wsdl "http://www.webservicex.net/ConvertTemperature.asmx?WSDL"
|
9
|
-
|
10
|
-
# Needed because (up until now), Savon doesn't match XS types to Hash keys,
|
11
|
-
# but defaults to convert Hash message Symbols (like :from_unit) to lowerCamelCase.
|
12
|
-
# The service expects these to be CamelCase instead. Look at Savon's log output
|
13
|
-
# and compare it with an example request generated by soapUI.
|
14
|
-
convert_request_keys_to :camelcase
|
15
|
-
|
16
|
-
# Lower timeouts so these specs don't take forever when the service is not available.
|
17
|
-
open_timeout 10
|
18
|
-
read_timeout 10
|
19
|
-
|
20
|
-
# Disable logging for cleaner spec output.
|
21
|
-
log false
|
22
|
-
end
|
23
|
-
|
24
|
-
response = call_and_fail_gracefully(client, :convert_temp) do
|
25
|
-
# For the corrent values to pass for :from_unit and :to_unit, I searched the WSDL for
|
26
|
-
# the "FromUnit" type which is a "TemperatureUnit" enumeration that looks like this:
|
27
|
-
#
|
28
|
-
# <s:simpleType name="TemperatureUnit">
|
29
|
-
# <s:restriction base="s:string">
|
30
|
-
# <s:enumeration value="degreeCelsius"/>
|
31
|
-
# <s:enumeration value="degreeFahrenheit"/>
|
32
|
-
# <s:enumeration value="degreeRankine"/>
|
33
|
-
# <s:enumeration value="degreeReaumur"/>
|
34
|
-
# <s:enumeration value="kelvin"/>
|
35
|
-
# </s:restriction>
|
36
|
-
# </s:simpleType>
|
37
|
-
#
|
38
|
-
# Support for XS schema types needs to be improved.
|
39
|
-
message(:temperature => 30, :from_unit => "degreeCelsius", :to_unit => "degreeFahrenheit")
|
40
|
-
end
|
41
|
-
|
42
|
-
fahrenheit = response.body[:convert_temp_response][:convert_temp_result]
|
43
|
-
expect(fahrenheit).to eq("86")
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|