savon 2.12.0 → 2.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +98 -76
  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 +4 -3
  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 +2 -1
  27. data/lib/savon/version.rb +2 -1
  28. data/lib/savon.rb +1 -0
  29. data/savon.gemspec +9 -8
  30. data/spec/fixtures/response/empty_soap_fault.xml +13 -0
  31. data/spec/fixtures/wsdl/elements_in_types.xml +43 -0
  32. data/spec/integration/support/application.rb +33 -1
  33. data/spec/integration/support/server.rb +1 -0
  34. data/spec/integration/zipcode_example_spec.rb +5 -8
  35. data/spec/savon/builder_spec.rb +2 -1
  36. data/spec/savon/client_spec.rb +5 -4
  37. data/spec/savon/core_ext/string_spec.rb +2 -1
  38. data/spec/savon/features/message_tag_spec.rb +2 -1
  39. data/spec/savon/http_error_spec.rb +9 -1
  40. data/spec/savon/log_message_spec.rb +2 -1
  41. data/spec/savon/message_spec.rb +2 -11
  42. data/spec/savon/mock_spec.rb +2 -1
  43. data/spec/savon/model_spec.rb +2 -1
  44. data/spec/savon/multipart_request_spec.rb +46 -0
  45. data/spec/savon/observers_spec.rb +2 -1
  46. data/spec/savon/operation_spec.rb +20 -43
  47. data/spec/savon/options_spec.rb +51 -1
  48. data/spec/savon/qualified_message_spec.rb +2 -1
  49. data/spec/savon/request_logger_spec.rb +2 -1
  50. data/spec/savon/request_spec.rb +47 -6
  51. data/spec/savon/response_spec.rb +2 -1
  52. data/spec/savon/soap_fault_spec.rb +12 -1
  53. data/spec/savon/softlayer_spec.rb +17 -2
  54. data/spec/spec_helper.rb +5 -4
  55. data/spec/support/adapters.rb +1 -0
  56. data/spec/support/endpoint.rb +1 -0
  57. data/spec/support/fixture.rb +1 -0
  58. data/spec/support/integration.rb +1 -0
  59. data/spec/support/stdout.rb +1 -0
  60. metadata +57 -34
  61. data/.travis.yml +0 -18
  62. data/donate.png +0 -0
  63. data/spec/integration/centra_spec.rb +0 -67
  64. data/spec/integration/email_example_spec.rb +0 -32
  65. data/spec/integration/random_quote_spec.rb +0 -23
  66. data/spec/integration/ratp_example_spec.rb +0 -28
  67. data/spec/integration/stockquote_example_spec.rb +0 -34
  68. data/spec/integration/temperature_example_spec.rb +0 -46
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
  require "integration/support/server"
3
4
  require "json"
4
5
  require "ostruct"
5
6
  require "logger"
6
7
 
7
- describe "Options" do
8
+ RSpec.describe "Options" do
8
9
 
9
10
  before :all do
10
11
  @server = IntegrationServer.run
@@ -219,6 +220,17 @@ describe "Options" do
219
220
  expect(response.http.body).to include("<user>lea</user>")
220
221
  expect(response.http.body).to include("<password>top-secret</password>")
221
222
  end
223
+
224
+ it "qualifies elements embedded in complex types" do
225
+ client = new_client(:endpoint => @server.url(:repeat),
226
+ :wsdl => Fixture.wsdl(:elements_in_types))
227
+ msg = {":TopLevelTransaction"=>{":Qualified"=>"A Value"}}
228
+
229
+ response = client.call(:top_level_transaction, :message => msg)
230
+
231
+ expect(response.http.body.scan(/<tns:Qualified>/).count).to eq(1)
232
+ end
233
+
222
234
  end
223
235
 
224
236
  context "global :env_namespace" do
@@ -387,6 +399,26 @@ describe "Options" do
387
399
  end
388
400
  end
389
401
 
402
+ context "global :log_headers" do
403
+ it "instructs Savon to log SOAP requests and responses headers" do
404
+ stdout = mock_stdout {
405
+ client = new_client(:endpoint => @server.url, :log => true)
406
+ client.call(:authenticate)
407
+ }
408
+ soap_header = stdout.string.include? "Content-Type"
409
+ expect(soap_header).to be true
410
+ end
411
+
412
+ it "stops Savon from logging SOAP requests and responses headers" do
413
+ stdout = mock_stdout {
414
+ client = new_client(:endpoint => @server.url, :log => true, :log_headers => false)
415
+ client.call(:authenticate)
416
+ }
417
+ soap_header = stdout.string.include? "Content-Type"
418
+ expect(soap_header).to be false
419
+ end
420
+ end
421
+
390
422
  context "global :ssl_version" do
391
423
  it "sets the SSL version to use" do
392
424
  HTTPI::Auth::SSL.any_instance.expects(:ssl_version=).with(:TLSv1).twice
@@ -396,6 +428,24 @@ describe "Options" do
396
428
  end
397
429
  end
398
430
 
431
+ context "global :ssl_min_version" do
432
+ it "sets the SSL min_version to use" do
433
+ HTTPI::Auth::SSL.any_instance.expects(:min_version=).with(:TLS1_2).twice
434
+
435
+ client = new_client(:endpoint => @server.url, :ssl_min_version => :TLS1_2)
436
+ client.call(:authenticate)
437
+ end
438
+ end
439
+
440
+ context "global :ssl_max_version" do
441
+ it "sets the SSL max_version to use" do
442
+ HTTPI::Auth::SSL.any_instance.expects(:max_version=).with(:TLS1_2).twice
443
+
444
+ client = new_client(:endpoint => @server.url, :ssl_max_version => :TLS1_2)
445
+ client.call(:authenticate)
446
+ end
447
+ end
448
+
399
449
  context "global :ssl_verify_mode" do
400
450
  it "sets the verify mode to use" do
401
451
  HTTPI::Auth::SSL.any_instance.expects(:verify_mode=).with(:peer).twice
@@ -1,7 +1,8 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  module Savon
4
- describe QualifiedMessage, "#to_hash" do
5
+ RSpec.describe QualifiedMessage, "#to_hash" do
5
6
 
6
7
  context "if a key ends with !" do
7
8
  let(:used_namespaces) { {} }
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
- describe Savon::RequestLogger do
4
+ RSpec.describe Savon::RequestLogger do
4
5
 
5
6
  subject { described_class.new(globals) }
6
7
  let(:globals) { Savon::GlobalOptions.new(:log => true, :pretty_print_xml => true) }
@@ -1,7 +1,8 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
  require "integration/support/server"
3
4
 
4
- describe Savon::WSDLRequest do
5
+ RSpec.describe Savon::WSDLRequest do
5
6
 
6
7
  let(:globals) { Savon::GlobalOptions.new }
7
8
  let(:http_request) { HTTPI::Request.new }
@@ -73,6 +74,20 @@ describe Savon::WSDLRequest do
73
74
  end
74
75
  end
75
76
 
77
+ describe "write timeout" do
78
+ it "is set when specified" do
79
+ globals.write_timeout(44)
80
+ http_request.expects(:write_timeout=).with(44)
81
+
82
+ new_wsdl_request.build
83
+ end
84
+
85
+ it "is not set otherwise" do
86
+ http_request.expects(:read_timeout=).never
87
+ new_wsdl_request.build
88
+ end
89
+ end
90
+
76
91
  describe "ssl version" do
77
92
  it "is set when specified" do
78
93
  globals.ssl_version(:TLSv1)
@@ -87,6 +102,34 @@ describe Savon::WSDLRequest do
87
102
  end
88
103
  end
89
104
 
105
+ describe "ssl min_version" do
106
+ it "is set when specified" do
107
+ globals.ssl_min_version(:TLS1_2)
108
+ http_request.auth.ssl.expects(:min_version=).with(:TLS1_2)
109
+
110
+ new_wsdl_request.build
111
+ end
112
+
113
+ it "is not set otherwise" do
114
+ http_request.auth.ssl.expects(:min_version=).never
115
+ new_wsdl_request.build
116
+ end
117
+ end
118
+
119
+ describe "ssl max_version" do
120
+ it "is set when specified" do
121
+ globals.ssl_max_version(:TLS1_2)
122
+ http_request.auth.ssl.expects(:max_version=).with(:TLS1_2)
123
+
124
+ new_wsdl_request.build
125
+ end
126
+
127
+ it "is not set otherwise" do
128
+ http_request.auth.ssl.expects(:max_version=).never
129
+ new_wsdl_request.build
130
+ end
131
+ end
132
+
90
133
  describe "ssl verify mode" do
91
134
  it "is set when specified" do
92
135
  globals.ssl_verify_mode(:peer)
@@ -148,6 +191,7 @@ describe Savon::WSDLRequest do
148
191
  describe "ssl encrypted cert key file" do
149
192
  describe "set with an invalid decrypting password" do
150
193
  it "fails when attempting to use the SSL private key" do
194
+ skip("JRuby: find out why this does not raise an error!") if RUBY_PLATFORM == 'java'
151
195
  pass = "wrong-password"
152
196
  key = File.expand_path("../../fixtures/ssl/client_encrypted_key.pem", __FILE__)
153
197
  cert = File.expand_path("../../fixtures/ssl/client_encrypted_key_cert.pem", __FILE__)
@@ -158,15 +202,12 @@ describe Savon::WSDLRequest do
158
202
 
159
203
  new_wsdl_request.build
160
204
 
161
- expect { http_request.auth.ssl.cert_key }.to raise_error
205
+ expect { http_request.auth.ssl.cert_key }.to raise_error OpenSSL::PKey::PKeyError
162
206
  end
163
207
  end
164
208
 
165
209
  describe "set with a valid decrypting password" do
166
210
  it "handles SSL private keys properly" do
167
- if RUBY_ENGINE == 'jruby'
168
- pending("find out why this fails with a null pointer exception on jruby")
169
- end
170
211
  pass = "secure-password!42"
171
212
  key = File.expand_path("../../fixtures/ssl/client_encrypted_key.pem", __FILE__)
172
213
  cert = File.expand_path("../../fixtures/ssl/client_encrypted_key_cert.pem", __FILE__)
@@ -257,7 +298,7 @@ describe Savon::WSDLRequest do
257
298
 
258
299
  end
259
300
 
260
- describe Savon::SOAPRequest do
301
+ RSpec.describe Savon::SOAPRequest do
261
302
 
262
303
  let(:globals) { Savon::GlobalOptions.new }
263
304
  let(:http_request) { HTTPI::Request.new }
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
- describe Savon::Response do
4
+ RSpec.describe Savon::Response do
4
5
 
5
6
  let(:globals) { Savon::GlobalOptions.new }
6
7
  let(:locals) { Savon::LocalOptions.new }
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
- describe Savon::SOAPFault do
4
+ RSpec.describe Savon::SOAPFault do
4
5
  let(:soap_fault) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault)), nori }
6
+ let(:empty_soap_fault) { Savon::SOAPFault.new new_response(:body => Fixture.response(:empty_soap_fault)), nori }
5
7
  let(:soap_fault2) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault12)), nori }
6
8
  let(:soap_fault_funky) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault_funky)), nori }
7
9
  let(:soap_fault_nc) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault)), nori_no_convert }
@@ -29,6 +31,11 @@ describe Savon::SOAPFault do
29
31
  expect(Savon::SOAPFault.present? http).to be_truthy
30
32
  end
31
33
 
34
+ it "returns true if the HTTP response contains a SOAP 1.1 fault with empty fault tags" do
35
+ http = new_response(:body => Fixture.response(:empty_soap_fault))
36
+ expect(Savon::SOAPFault.present? http).to be_truthy
37
+ end
38
+
32
39
  it "returns true if the HTTP response contains a SOAP 1.2 fault" do
33
40
  http = new_response(:body => Fixture.response(:soap_fault12))
34
41
  expect(Savon::SOAPFault.present? http).to be_truthy
@@ -50,6 +57,10 @@ describe Savon::SOAPFault do
50
57
  expect(soap_fault.send method).to eq("(soap:Server) Fault occurred while processing.")
51
58
  end
52
59
 
60
+ it "returns an empty fault message" do
61
+ expect(empty_soap_fault.send method).to eq(nil)
62
+ end
63
+
53
64
  it "returns a SOAP 1.2 fault message" do
54
65
  expect(soap_fault2.send method).to eq("(soap:Sender) Sender Timeout")
55
66
  end
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
- describe Savon::Builder do
4
+ RSpec.describe Savon::Builder do
4
5
 
5
6
  subject(:builder) { Savon::Builder.new(:create_object, wsdl, globals, locals) }
6
7
 
@@ -19,9 +20,23 @@ describe Savon::Builder do
19
20
  }
20
21
  }
21
22
 
23
+ expected_namespaces = {
24
+ 'xmlns' => "http://schemas.xmlsoap.org/wsdl/",
25
+ 'xmlns:xsd' => "http://www.w3.org/2001/XMLSchema",
26
+ 'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
27
+ 'xmlns:tns' => "http://api.service.softlayer.com/soap/v3/",
28
+ 'xmlns:env' => "http://schemas.xmlsoap.org/soap/envelope/",
29
+ 'xmlns:soap' => "http://schemas.xmlsoap.org/wsdl/soap/",
30
+ 'xmlns:soap-enc' => "http://schemas.xmlsoap.org/soap/encoding/",
31
+ 'xmlns:wsdl' => "http://schemas.xmlsoap.org/wsdl/"
32
+ }
33
+
22
34
  locals = Savon::LocalOptions.new(message)
23
35
  builder = Savon::Builder.new(:create_object, wsdl, globals, locals)
24
- expect(builder.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://api.service.softlayer.com/soap/v3/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:createObject><templateObject><longName>Zertico LLC Reseller</longName></templateObject></tns:createObject></env:Body></env:Envelope>')
36
+
37
+ envelope = Nokogiri::XML(builder.to_s).xpath('./env:Envelope').first
38
+
39
+ expect(envelope.namespaces).to match(expected_namespaces)
25
40
  end
26
41
  end
27
42
  end
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,10 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler"
3
+ require "byebug"
2
4
  Bundler.setup(:default, :development)
3
5
 
4
6
  unless RUBY_PLATFORM =~ /java/
5
7
  require "simplecov"
6
- require "coveralls"
7
-
8
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
9
8
  SimpleCov.start do
10
9
  add_filter "spec"
11
10
  end
@@ -19,12 +18,14 @@ require "rspec"
19
18
  require "httpclient"
20
19
 
21
20
  support_files = File.expand_path("spec/support/**/*.rb")
22
- Dir[support_files].each { |file| require file }
21
+ Dir[support_files].sort.each { |file| require file }
23
22
 
24
23
  RSpec.configure do |config|
25
24
  config.include SpecSupport
26
25
  config.mock_with :mocha
27
26
  config.order = "random"
27
+ config.example_status_persistence_file_path = ".rspec_status"
28
+ config.disable_monkey_patching!
28
29
  end
29
30
 
30
31
  HTTPI.log = false
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'httpi/adapter/httpclient'
2
3
 
3
4
  # Proxy adapter. Records all requests and passes them to HTTPClient
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Endpoint
2
3
  class << self
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Fixture
2
3
 
3
4
  TYPES = { :gzip => "gz", :response => "xml", :wsdl => "xml" }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module SpecSupport
2
3
 
3
4
  def call_and_fail_gracefully(client, *args, &block)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module SpecSupport
2
3
 
3
4
  def mock_stdout
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savon
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-17 00:00:00.000000000 Z
11
+ date: 2022-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nori
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: httpi
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.3'
33
+ version: 2.4.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.3'
40
+ version: 2.4.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: wasabi
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 1.8.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: mail
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '2.5'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '2.5'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rack
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -126,44 +140,58 @@ dependencies:
126
140
  name: puma
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
- - - "~>"
143
+ - - ">="
130
144
  - !ruby/object:Gem::Version
131
- version: '3.0'
145
+ version: 4.3.8
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
- - - "~>"
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 4.3.8
153
+ - !ruby/object:Gem::Dependency
154
+ name: byebug
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
137
165
  - !ruby/object:Gem::Version
138
- version: '3.0'
166
+ version: '0'
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: rake
141
169
  requirement: !ruby/object:Gem::Requirement
142
170
  requirements:
143
- - - "~>"
171
+ - - ">="
144
172
  - !ruby/object:Gem::Version
145
- version: '10.1'
173
+ version: 12.3.3
146
174
  type: :development
147
175
  prerelease: false
148
176
  version_requirements: !ruby/object:Gem::Requirement
149
177
  requirements:
150
- - - "~>"
178
+ - - ">="
151
179
  - !ruby/object:Gem::Version
152
- version: '10.1'
180
+ version: 12.3.3
153
181
  - !ruby/object:Gem::Dependency
154
182
  name: rspec
155
183
  requirement: !ruby/object:Gem::Requirement
156
184
  requirements:
157
185
  - - "~>"
158
186
  - !ruby/object:Gem::Version
159
- version: '2.14'
187
+ version: '3.9'
160
188
  type: :development
161
189
  prerelease: false
162
190
  version_requirements: !ruby/object:Gem::Requirement
163
191
  requirements:
164
192
  - - "~>"
165
193
  - !ruby/object:Gem::Version
166
- version: '2.14'
194
+ version: '3.9'
167
195
  - !ruby/object:Gem::Dependency
168
196
  name: mocha
169
197
  requirement: !ruby/object:Gem::Requirement
@@ -182,16 +210,16 @@ dependencies:
182
210
  name: json
183
211
  requirement: !ruby/object:Gem::Requirement
184
212
  requirements:
185
- - - "~>"
213
+ - - ">="
186
214
  - !ruby/object:Gem::Version
187
- version: '1.7'
215
+ version: 2.3.0
188
216
  type: :development
189
217
  prerelease: false
190
218
  version_requirements: !ruby/object:Gem::Requirement
191
219
  requirements:
192
- - - "~>"
220
+ - - ">="
193
221
  - !ruby/object:Gem::Version
194
- version: '1.7'
222
+ version: 2.3.0
195
223
  description: Heavy metal SOAP client
196
224
  email: me@rubiii.com
197
225
  executables: []
@@ -199,15 +227,14 @@ extensions: []
199
227
  extra_rdoc_files: []
200
228
  files:
201
229
  - ".gitignore"
202
- - ".travis.yml"
203
230
  - ".yardopts"
204
231
  - CHANGELOG.md
205
232
  - CONTRIBUTING.md
206
233
  - Gemfile
207
234
  - LICENSE
208
235
  - README.md
236
+ - RELEASING.md
209
237
  - Rakefile
210
- - donate.png
211
238
  - lib/savon.rb
212
239
  - lib/savon/block_interface.rb
213
240
  - lib/savon/builder.rb
@@ -233,6 +260,7 @@ files:
233
260
  - spec/fixtures/gzip/message.gz
234
261
  - spec/fixtures/response/another_soap_fault.xml
235
262
  - spec/fixtures/response/authentication.xml
263
+ - spec/fixtures/response/empty_soap_fault.xml
236
264
  - spec/fixtures/response/f5.xml
237
265
  - spec/fixtures/response/header.xml
238
266
  - spec/fixtures/response/list.xml
@@ -250,6 +278,7 @@ files:
250
278
  - spec/fixtures/wsdl/betfair.xml
251
279
  - spec/fixtures/wsdl/brand.xml
252
280
  - spec/fixtures/wsdl/edialog.xml
281
+ - spec/fixtures/wsdl/elements_in_types.xml
253
282
  - spec/fixtures/wsdl/interhome.xml
254
283
  - spec/fixtures/wsdl/lower_camel.xml
255
284
  - spec/fixtures/wsdl/multiple_namespaces.xml
@@ -259,14 +288,8 @@ files:
259
288
  - spec/fixtures/wsdl/team_software.xml
260
289
  - spec/fixtures/wsdl/vies.xml
261
290
  - spec/fixtures/wsdl/wasmuth.xml
262
- - spec/integration/centra_spec.rb
263
- - spec/integration/email_example_spec.rb
264
- - spec/integration/random_quote_spec.rb
265
- - spec/integration/ratp_example_spec.rb
266
- - spec/integration/stockquote_example_spec.rb
267
291
  - spec/integration/support/application.rb
268
292
  - spec/integration/support/server.rb
269
- - spec/integration/temperature_example_spec.rb
270
293
  - spec/integration/zipcode_example_spec.rb
271
294
  - spec/savon/builder_spec.rb
272
295
  - spec/savon/client_spec.rb
@@ -277,6 +300,7 @@ files:
277
300
  - spec/savon/message_spec.rb
278
301
  - spec/savon/mock_spec.rb
279
302
  - spec/savon/model_spec.rb
303
+ - spec/savon/multipart_request_spec.rb
280
304
  - spec/savon/observers_spec.rb
281
305
  - spec/savon/operation_spec.rb
282
306
  - spec/savon/options_spec.rb
@@ -296,7 +320,7 @@ homepage: http://savonrb.com
296
320
  licenses:
297
321
  - MIT
298
322
  metadata: {}
299
- post_install_message:
323
+ post_install_message:
300
324
  rdoc_options: []
301
325
  require_paths:
302
326
  - lib
@@ -304,16 +328,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
304
328
  requirements:
305
329
  - - ">="
306
330
  - !ruby/object:Gem::Version
307
- version: 1.9.2
331
+ version: 2.7.0
308
332
  required_rubygems_version: !ruby/object:Gem::Requirement
309
333
  requirements:
310
334
  - - ">="
311
335
  - !ruby/object:Gem::Version
312
336
  version: '0'
313
337
  requirements: []
314
- rubyforge_project: savon
315
- rubygems_version: 2.6.13
316
- signing_key:
338
+ rubygems_version: 3.3.7
339
+ signing_key:
317
340
  specification_version: 4
318
341
  summary: Heavy metal SOAP client
319
342
  test_files: []
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- # https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options
2
- language: "ruby"
3
- sudo: false
4
- before_install:
5
- - gem install bundler
6
- script: "bundle exec rake --trace"
7
- rvm:
8
- - 2.2.4
9
- - 2.3.0
10
- - 2.4.1
11
- - jruby-9.1.15.0
12
- - rbx-2
13
- matrix:
14
- allow_failures:
15
- - rvm: rbx-2
16
- fast_finish: true
17
- notifications:
18
- irc: "irc.freenode.org#savon"
data/donate.png DELETED
Binary file
@@ -1,67 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module LogInterceptor
4
- @@intercepted_request = ""
5
- def self.debug(message = nil)
6
- message ||= yield if block_given?
7
-
8
- # save only the first XMLly message
9
- if message.include? "xml version"
10
- @@intercepted_request = message if @@intercepted_request == ""
11
- end
12
- end
13
-
14
- def self.info(message = nil)
15
- end
16
-
17
- def self.get_intercepted_request
18
- @@intercepted_request
19
- end
20
-
21
- def self.reset_intercepted_request
22
- @@intercepted_request = ""
23
- end
24
- end
25
-
26
- describe 'Correct translation of attributes to XML' do
27
- it "new :@attr syntax: correctly maps a Ruby Hash to XML attributes" do
28
- LogInterceptor.reset_intercepted_request
29
-
30
- client = Savon.client(
31
- :wsdl => "http://mt205.sabameeting.com/CWS/CWS.asmx?WSDL",
32
- :log => true,
33
- :logger => LogInterceptor
34
- )
35
-
36
- response = nil
37
- begin
38
- response = call_and_fail_gracefully(client, :add_new_user, :message => { :user => { :@userID => "test" } })
39
- rescue
40
- end
41
-
42
- xml_doc = Nokogiri::XML(LogInterceptor.get_intercepted_request)
43
- xml_doc.remove_namespaces!
44
-
45
- attributes_element_not_present = xml_doc.xpath("//AddNewUser/attributes").blank?
46
- expect(attributes_element_not_present).to eq true
47
- end
48
-
49
- it "old :attributes! syntax: correctly maps a Ruby Hash to XML attributes" do
50
- LogInterceptor.reset_intercepted_request
51
-
52
- client = Savon.client(
53
- :wsdl => "http://mt205.sabameeting.com/CWS/CWS.asmx?WSDL",
54
- :log => true,
55
- :logger => LogInterceptor
56
- )
57
-
58
- response = nil
59
- response = call_and_fail_gracefully(client, :add_new_user, :message => { :user => {}, :attributes! => { :user => { :userID => "test" } } })
60
-
61
- xml_doc = Nokogiri::XML(LogInterceptor.get_intercepted_request)
62
- xml_doc.remove_namespaces!
63
-
64
- attributes_element_not_present = xml_doc.xpath("//AddNewUser/attributes").blank?
65
- expect(attributes_element_not_present).to eq true
66
- end
67
- end