savon 2.12.1 → 2.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +91 -73
  4. data/CONTRIBUTING.md +15 -19
  5. data/Gemfile +2 -7
  6. data/README.md +15 -19
  7. data/RELEASING.md +10 -0
  8. data/lib/savon/block_interface.rb +1 -0
  9. data/lib/savon/builder.rb +98 -29
  10. data/lib/savon/client.rb +1 -0
  11. data/lib/savon/core_ext/string.rb +1 -0
  12. data/lib/savon/header.rb +2 -6
  13. data/lib/savon/http_error.rb +4 -4
  14. data/lib/savon/log_message.rb +1 -0
  15. data/lib/savon/message.rb +1 -0
  16. data/lib/savon/mock/expectation.rb +1 -0
  17. data/lib/savon/mock/spec_helper.rb +1 -0
  18. data/lib/savon/mock.rb +1 -0
  19. data/lib/savon/model.rb +1 -0
  20. data/lib/savon/operation.rb +20 -18
  21. data/lib/savon/options.rb +56 -0
  22. data/lib/savon/qualified_message.rb +3 -2
  23. data/lib/savon/request.rb +5 -0
  24. data/lib/savon/request_logger.rb +8 -2
  25. data/lib/savon/response.rb +48 -1
  26. data/lib/savon/soap_fault.rb +1 -0
  27. data/lib/savon/version.rb +2 -1
  28. data/lib/savon.rb +1 -0
  29. data/savon.gemspec +9 -8
  30. data/spec/integration/support/application.rb +33 -1
  31. data/spec/integration/support/server.rb +1 -0
  32. data/spec/integration/zipcode_example_spec.rb +5 -8
  33. data/spec/savon/builder_spec.rb +2 -1
  34. data/spec/savon/client_spec.rb +5 -4
  35. data/spec/savon/core_ext/string_spec.rb +2 -1
  36. data/spec/savon/features/message_tag_spec.rb +2 -1
  37. data/spec/savon/http_error_spec.rb +9 -1
  38. data/spec/savon/log_message_spec.rb +2 -1
  39. data/spec/savon/message_spec.rb +2 -11
  40. data/spec/savon/mock_spec.rb +2 -1
  41. data/spec/savon/model_spec.rb +2 -1
  42. data/spec/savon/multipart_request_spec.rb +46 -0
  43. data/spec/savon/observers_spec.rb +2 -1
  44. data/spec/savon/operation_spec.rb +20 -43
  45. data/spec/savon/options_spec.rb +40 -1
  46. data/spec/savon/qualified_message_spec.rb +2 -1
  47. data/spec/savon/request_logger_spec.rb +2 -1
  48. data/spec/savon/request_spec.rb +47 -6
  49. data/spec/savon/response_spec.rb +2 -1
  50. data/spec/savon/soap_fault_spec.rb +2 -1
  51. data/spec/savon/softlayer_spec.rb +17 -2
  52. data/spec/spec_helper.rb +5 -4
  53. data/spec/support/adapters.rb +1 -0
  54. data/spec/support/endpoint.rb +1 -0
  55. data/spec/support/fixture.rb +1 -0
  56. data/spec/support/integration.rb +1 -0
  57. data/spec/support/stdout.rb +1 -0
  58. metadata +55 -33
  59. data/.travis.yml +0 -26
  60. data/donate.png +0 -0
  61. data/spec/integration/centra_spec.rb +0 -67
  62. data/spec/integration/email_example_spec.rb +0 -32
  63. data/spec/integration/random_quote_spec.rb +0 -23
  64. data/spec/integration/ratp_example_spec.rb +0 -28
  65. data/spec/integration/stockquote_example_spec.rb +0 -34
  66. 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