wasabi 3.6.1 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +7 -8
  4. data/lib/wasabi/parser.rb +3 -15
  5. data/lib/wasabi/version.rb +1 -1
  6. metadata +5 -137
  7. data/spec/fixtures/authentication.wsdl +0 -63
  8. data/spec/fixtures/brand.wsdl +0 -624
  9. data/spec/fixtures/economic.wsdl +0 -65660
  10. data/spec/fixtures/encoded_endpoint.wsdl +0 -52
  11. data/spec/fixtures/geotrust.wsdl +0 -156
  12. data/spec/fixtures/import_port_types.wsdl +0 -86
  13. data/spec/fixtures/inherited.wsdl +0 -46
  14. data/spec/fixtures/juniper.wsdl +0 -215
  15. data/spec/fixtures/lower_camel.wsdl +0 -52
  16. data/spec/fixtures/marketo.wsdl +0 -1630
  17. data/spec/fixtures/multiple_namespaces.wsdl +0 -61
  18. data/spec/fixtures/multiple_parts_in_message.wsdl +0 -66
  19. data/spec/fixtures/multiple_types.wsdl +0 -60
  20. data/spec/fixtures/namespaced_actions.wsdl +0 -307
  21. data/spec/fixtures/no_message_parts.wsdl +0 -85
  22. data/spec/fixtures/no_namespace.wsdl +0 -115
  23. data/spec/fixtures/savon295.wsdl +0 -52
  24. data/spec/fixtures/soap12.wsdl +0 -11
  25. data/spec/fixtures/symbolic_endpoint.wsdl +0 -190
  26. data/spec/fixtures/tradetracker.wsdl +0 -1330
  27. data/spec/fixtures/two_bindings.wsdl +0 -24
  28. data/spec/spec_helper.rb +0 -17
  29. data/spec/support/adapter.rb +0 -20
  30. data/spec/support/fixture.rb +0 -42
  31. data/spec/support/profiling.rb +0 -20
  32. data/spec/wasabi/core_ext/string_spec.rb +0 -39
  33. data/spec/wasabi/document/authentication_spec.rb +0 -39
  34. data/spec/wasabi/document/economic_spec.rb +0 -15
  35. data/spec/wasabi/document/encoded_endpoint_spec.rb +0 -16
  36. data/spec/wasabi/document/geotrust_spec.rb +0 -40
  37. data/spec/wasabi/document/inherited_spec.rb +0 -43
  38. data/spec/wasabi/document/multiple_namespaces_spec.rb +0 -57
  39. data/spec/wasabi/document/namespaced_actions_spec.rb +0 -41
  40. data/spec/wasabi/document/no_namespace_spec.rb +0 -41
  41. data/spec/wasabi/document/savon295_spec.rb +0 -20
  42. data/spec/wasabi/document/soap12_spec.rb +0 -16
  43. data/spec/wasabi/document/two_bindings_spec.rb +0 -31
  44. data/spec/wasabi/document_spec.rb +0 -60
  45. data/spec/wasabi/parser/get_servicename_spec.rb +0 -21
  46. data/spec/wasabi/parser/import_port_types_spec.rb +0 -24
  47. data/spec/wasabi/parser/juniper_spec.rb +0 -25
  48. data/spec/wasabi/parser/marketo_spec.rb +0 -19
  49. data/spec/wasabi/parser/multiple_namespaces_spec.rb +0 -42
  50. data/spec/wasabi/parser/multiple_parts_in_message_spec.rb +0 -33
  51. data/spec/wasabi/parser/no_message_parts_spec.rb +0 -34
  52. data/spec/wasabi/parser/no_namespace_spec.rb +0 -28
  53. data/spec/wasabi/parser/no_target_namespace_spec.rb +0 -38
  54. data/spec/wasabi/parser/softlayer_spec.rb +0 -20
  55. data/spec/wasabi/parser/symbolic_endpoint_spec.rb +0 -23
  56. data/spec/wasabi/parser/tradetracker_spec.rb +0 -19
  57. data/spec/wasabi/resolver_spec.rb +0 -57
  58. data/spec/wasabi/wasabi_spec.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5dd6fa7035a36a15b080db50c141fc988012a66aae5e153d527c50f1a631821
4
- data.tar.gz: 9c16e0fe6c87e39147804fe18b84c0f231a634ba0d3b868f16779383591961ab
3
+ metadata.gz: b297c966bd9065c9ff529ba5f879ed24313b999ad6528f54f704bac52bbee751
4
+ data.tar.gz: 0e293c359124725f632ac3d25ebd6085a1a99f7487da0cca93aafbbbd9a054e6
5
5
  SHA512:
6
- metadata.gz: a902556350c6f5bf228a0c175e800a017c53085cb3b515b45a11f3fa936235459059d31be84b2311664ce3c218963aad2a0818a3451f472c63c69b62aa1ac146
7
- data.tar.gz: 7c5e3d822b8532869f5ea2f61187f3bc5dc7701ce6d64a15bcffc6a4603746634bef12d31dc7c011fb0af05b430a1a2ee441c2632f0d92ad040ef48205a623aa
6
+ metadata.gz: 4a89b1b0d09e9bdb7379b3e00c3c290d9c617beff6f80d30feb3ea42f4bb9f9f4b89ade325ad1ed6882534ea38f36a25be8dd82664173a3716a7ae49dba7ade6
7
+ data.tar.gz: ef4682e241ae1f6f11f151e01d0004484ec41b0796a75122fabc1ab86377e4b5cbb5dcf768d8218ee07ab37d1a9c6f176278f86a0bd3c8bbad68aa6f8c4e997b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # Unreleased
2
+
3
+ - _Your new line here. Mind the style of prefix used in the rest of the document._
4
+ - Breaking: BC BREAKING: Revert "Add support for rpc encoded wsdl" ([#103](https://github.com/savonrb/wasabi/pull/103))
5
+ - Fix: Support escaped endpoint urls ([#100](https://github.com/savonrb/wasabi/pull/100))
6
+
1
7
  # 3.6.1 (2020-08-27)
2
8
 
3
9
  - Fix: Repair unlinked Markdown in the CHANGELOG
data/README.md CHANGED
@@ -2,12 +2,11 @@
2
2
 
3
3
  A simple WSDL parser.
4
4
 
5
- [![Build Status](https://secure.travis-ci.org/savonrb/wasabi.svg?branch=master)](http://travis-ci.org/savonrb/wasabi)
5
+ [![Test](https://github.com/savonrb/wasabi/actions/workflows/test.yml/badge.svg)](https://github.com/savonrb/wasabi/actions/workflows/test.yml)
6
6
  [![Gem Version](https://badge.fury.io/rb/wasabi.svg)](http://badge.fury.io/rb/wasabi)
7
7
  [![Code Climate](https://codeclimate.com/github/savonrb/wasabi.svg)](https://codeclimate.com/github/savonrb/wasabi)
8
8
  [![Coverage Status](https://coveralls.io/repos/savonrb/wasabi/badge.svg?branch=master)](https://coveralls.io/r/savonrb/wasabi)
9
9
 
10
-
11
10
  ## Installation
12
11
 
13
12
  Wasabi is available through [Rubygems](http://rubygems.org/gems/wasabi) and can be installed via:
@@ -19,41 +18,41 @@ $ gem install wasabi
19
18
 
20
19
  ## Getting started
21
20
 
22
- ``` ruby
21
+ ```ruby
23
22
  document = Wasabi.document File.read("some.wsdl")
24
23
  ```
25
24
 
26
25
  Get the SOAP endpoint:
27
26
 
28
- ``` ruby
27
+ ```ruby
29
28
  document.endpoint
30
29
  # => "http://soap.example.com"
31
30
  ```
32
31
 
33
32
  Get the target namespace:
34
33
 
35
- ``` ruby
34
+ ```ruby
36
35
  document.namespace
37
36
  # => "http://v1.example.com"
38
37
  ```
39
38
 
40
39
  Check whether elementFormDefault is set to `:qualified` or `:unqualified`:
41
40
 
42
- ``` ruby
41
+ ```ruby
43
42
  document.element_form_default
44
43
  # => :qualified
45
44
  ```
46
45
 
47
46
  Get a list of available SOAP actions (snakecase for convenience):
48
47
 
49
- ``` ruby
48
+ ```ruby
50
49
  document.soap_actions
51
50
  # => [:create_user, :find_user]
52
51
  ```
53
52
 
54
53
  Get a map of SOAP action Symbols, their input tag and original SOAP action name:
55
54
 
56
- ``` ruby
55
+ ```ruby
57
56
  document.operations
58
57
  # => { :create_user => { :input => "createUser", :action => "createUser" },
59
58
  # => :find_user => { :input => "findUser", :action => "findUser" } }
data/lib/wasabi/parser.rb CHANGED
@@ -90,8 +90,9 @@ module Wasabi
90
90
 
91
91
  def parse_url(url)
92
92
  unescaped_url = Addressable::URI.unescape(url.to_s)
93
- URI(unescaped_url)
94
- rescue URI::InvalidURIError
93
+ escaped_url = Addressable::URI.escape(unescaped_url)
94
+ URI(escaped_url)
95
+ rescue URI::InvalidURIError, Addressable::URI::InvalidURIError
95
96
  end
96
97
 
97
98
  def parse_service_name
@@ -282,19 +283,6 @@ module Wasabi
282
283
  end
283
284
  end
284
285
 
285
- # if multi part message, return a hash representing
286
- part_messages = message.element_children.select { |node| node.name == "part" && node.attribute('type') }.size
287
- if part_messages > 0
288
- part_messages_hash = {}
289
- part_messages_hash[operation_name] = {}
290
- message.element_children.select { |node| node.name == "part" }.each do |node|
291
- part_message_name = node.attribute('name').value
292
- part_message_type = node.attribute('type').value.split(':')
293
- part_messages_hash[operation_name][part_message_name] = part_message_type
294
- end
295
- return [port_message_ns_id, part_messages_hash]
296
- end
297
-
298
286
  # Fall back to the name of the binding operation
299
287
  if message_type
300
288
  [message_ns_id, message_type]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wasabi
4
- VERSION = '3.6.1'
4
+ VERSION = '3.7.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasabi
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-27 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpi
@@ -52,34 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '13.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '13.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 3.7.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 3.7.0
83
55
  description: A simple WSDL parser
84
56
  email:
85
57
  - me@rubiii.com
@@ -96,64 +68,12 @@ files:
96
68
  - lib/wasabi/parser.rb
97
69
  - lib/wasabi/resolver.rb
98
70
  - lib/wasabi/version.rb
99
- - spec/fixtures/authentication.wsdl
100
- - spec/fixtures/brand.wsdl
101
- - spec/fixtures/economic.wsdl
102
- - spec/fixtures/encoded_endpoint.wsdl
103
- - spec/fixtures/geotrust.wsdl
104
- - spec/fixtures/import_port_types.wsdl
105
- - spec/fixtures/inherited.wsdl
106
- - spec/fixtures/juniper.wsdl
107
- - spec/fixtures/lower_camel.wsdl
108
- - spec/fixtures/marketo.wsdl
109
- - spec/fixtures/multiple_namespaces.wsdl
110
- - spec/fixtures/multiple_parts_in_message.wsdl
111
- - spec/fixtures/multiple_types.wsdl
112
- - spec/fixtures/namespaced_actions.wsdl
113
- - spec/fixtures/no_message_parts.wsdl
114
- - spec/fixtures/no_namespace.wsdl
115
- - spec/fixtures/savon295.wsdl
116
- - spec/fixtures/soap12.wsdl
117
- - spec/fixtures/symbolic_endpoint.wsdl
118
- - spec/fixtures/tradetracker.wsdl
119
- - spec/fixtures/two_bindings.wsdl
120
- - spec/spec_helper.rb
121
- - spec/support/adapter.rb
122
- - spec/support/fixture.rb
123
- - spec/support/profiling.rb
124
- - spec/wasabi/core_ext/string_spec.rb
125
- - spec/wasabi/document/authentication_spec.rb
126
- - spec/wasabi/document/economic_spec.rb
127
- - spec/wasabi/document/encoded_endpoint_spec.rb
128
- - spec/wasabi/document/geotrust_spec.rb
129
- - spec/wasabi/document/inherited_spec.rb
130
- - spec/wasabi/document/multiple_namespaces_spec.rb
131
- - spec/wasabi/document/namespaced_actions_spec.rb
132
- - spec/wasabi/document/no_namespace_spec.rb
133
- - spec/wasabi/document/savon295_spec.rb
134
- - spec/wasabi/document/soap12_spec.rb
135
- - spec/wasabi/document/two_bindings_spec.rb
136
- - spec/wasabi/document_spec.rb
137
- - spec/wasabi/parser/get_servicename_spec.rb
138
- - spec/wasabi/parser/import_port_types_spec.rb
139
- - spec/wasabi/parser/juniper_spec.rb
140
- - spec/wasabi/parser/marketo_spec.rb
141
- - spec/wasabi/parser/multiple_namespaces_spec.rb
142
- - spec/wasabi/parser/multiple_parts_in_message_spec.rb
143
- - spec/wasabi/parser/no_message_parts_spec.rb
144
- - spec/wasabi/parser/no_namespace_spec.rb
145
- - spec/wasabi/parser/no_target_namespace_spec.rb
146
- - spec/wasabi/parser/softlayer_spec.rb
147
- - spec/wasabi/parser/symbolic_endpoint_spec.rb
148
- - spec/wasabi/parser/tradetracker_spec.rb
149
- - spec/wasabi/resolver_spec.rb
150
- - spec/wasabi/wasabi_spec.rb
151
71
  homepage: https://github.com/savonrb/wasabi
152
72
  licenses:
153
73
  - MIT
154
74
  metadata:
155
75
  changelog_uri: https://github.com/savonrb/wasabi/blob/master/CHANGELOG.md
156
- documentation_uri: https://www.rubydoc.info/gems/wasabi/3.6.1
76
+ documentation_uri: https://www.rubydoc.info/gems/wasabi/3.7.0
157
77
  source_code_uri: https://github.com/savonrb/wasabi
158
78
  bug_tracker_uri: https://github.com/savonrb/wasabi/issues
159
79
  post_install_message:
@@ -171,60 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
91
  - !ruby/object:Gem::Version
172
92
  version: '0'
173
93
  requirements: []
174
- rubygems_version: 3.1.3
94
+ rubygems_version: 3.2.7
175
95
  signing_key:
176
96
  specification_version: 4
177
97
  summary: A simple WSDL parser
178
- test_files:
179
- - spec/spec_helper.rb
180
- - spec/wasabi/core_ext/string_spec.rb
181
- - spec/wasabi/document/economic_spec.rb
182
- - spec/wasabi/document/no_namespace_spec.rb
183
- - spec/wasabi/document/namespaced_actions_spec.rb
184
- - spec/wasabi/document/authentication_spec.rb
185
- - spec/wasabi/document/encoded_endpoint_spec.rb
186
- - spec/wasabi/document/soap12_spec.rb
187
- - spec/wasabi/document/two_bindings_spec.rb
188
- - spec/wasabi/document/multiple_namespaces_spec.rb
189
- - spec/wasabi/document/inherited_spec.rb
190
- - spec/wasabi/document/geotrust_spec.rb
191
- - spec/wasabi/document/savon295_spec.rb
192
- - spec/wasabi/parser/no_target_namespace_spec.rb
193
- - spec/wasabi/parser/no_namespace_spec.rb
194
- - spec/wasabi/parser/juniper_spec.rb
195
- - spec/wasabi/parser/get_servicename_spec.rb
196
- - spec/wasabi/parser/no_message_parts_spec.rb
197
- - spec/wasabi/parser/symbolic_endpoint_spec.rb
198
- - spec/wasabi/parser/softlayer_spec.rb
199
- - spec/wasabi/parser/tradetracker_spec.rb
200
- - spec/wasabi/parser/marketo_spec.rb
201
- - spec/wasabi/parser/multiple_namespaces_spec.rb
202
- - spec/wasabi/parser/multiple_parts_in_message_spec.rb
203
- - spec/wasabi/parser/import_port_types_spec.rb
204
- - spec/wasabi/resolver_spec.rb
205
- - spec/wasabi/wasabi_spec.rb
206
- - spec/wasabi/document_spec.rb
207
- - spec/support/profiling.rb
208
- - spec/support/adapter.rb
209
- - spec/support/fixture.rb
210
- - spec/fixtures/namespaced_actions.wsdl
211
- - spec/fixtures/no_message_parts.wsdl
212
- - spec/fixtures/multiple_parts_in_message.wsdl
213
- - spec/fixtures/lower_camel.wsdl
214
- - spec/fixtures/marketo.wsdl
215
- - spec/fixtures/juniper.wsdl
216
- - spec/fixtures/authentication.wsdl
217
- - spec/fixtures/encoded_endpoint.wsdl
218
- - spec/fixtures/tradetracker.wsdl
219
- - spec/fixtures/import_port_types.wsdl
220
- - spec/fixtures/brand.wsdl
221
- - spec/fixtures/multiple_namespaces.wsdl
222
- - spec/fixtures/multiple_types.wsdl
223
- - spec/fixtures/geotrust.wsdl
224
- - spec/fixtures/no_namespace.wsdl
225
- - spec/fixtures/soap12.wsdl
226
- - spec/fixtures/two_bindings.wsdl
227
- - spec/fixtures/economic.wsdl
228
- - spec/fixtures/symbolic_endpoint.wsdl
229
- - spec/fixtures/inherited.wsdl
230
- - spec/fixtures/savon295.wsdl
98
+ test_files: []
@@ -1,63 +0,0 @@
1
- <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="AuthenticationWebServiceImplService" targetNamespace="http://v1_0.ws.auth.order.example.com/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://v1_0.ws.auth.order.example.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
- <wsdl:types>
3
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://v1_0.ws.auth.order.example.com/" xmlns:tns="http://v1_0.ws.auth.order.example.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
4
- <xs:element name="authenticate" type="tns:authenticate" />
5
- <xs:element name="authenticateResponse" type="tns:authenticateResponse" />
6
- <xs:element name="authenticationResult" type="tns:authenticationResult" />
7
- <xs:element name="authenticationValue" type="tns:authenticationValue" />
8
- <xs:complexType name="authenticate">
9
- <xs:sequence>
10
- <xs:element minOccurs="0" name="user" type="xs:string" />
11
- <xs:element minOccurs="0" name="password" type="xs:string" />
12
- </xs:sequence>
13
- </xs:complexType>
14
- <xs:complexType name="authenticateResponse">
15
- <xs:sequence>
16
- <xs:element minOccurs="0" name="return" type="tns:authenticationResult" />
17
- </xs:sequence>
18
- </xs:complexType>
19
- <xs:complexType name="authenticationResult">
20
- <xs:sequence>
21
- <xs:element minOccurs="0" name="authenticationValue" nillable="true" type="tns:authenticationValue" />
22
- <xs:element name="success" type="xs:boolean" />
23
- </xs:sequence>
24
- </xs:complexType>
25
- <xs:complexType name="authenticationValue">
26
- <xs:sequence>
27
- <xs:element name="token" type="xs:string" />
28
- <xs:element name="tokenHash" type="xs:string" />
29
- <xs:element name="client" type="xs:string" />
30
- </xs:sequence>
31
- </xs:complexType>
32
- </xs:schema>
33
- </wsdl:types>
34
- <wsdl:message name="authenticate">
35
- <wsdl:part element="tns:authenticate" name="parameters" />
36
- </wsdl:message>
37
- <wsdl:message name="authenticateResponse">
38
- <wsdl:part element="tns:authenticateResponse" name="parameters" />
39
- </wsdl:message>
40
- <wsdl:portType name="AuthenticationWebService">
41
- <wsdl:operation name="authenticate">
42
- <wsdl:input message="tns:authenticate" name="authenticate" />
43
- <wsdl:output message="tns:authenticateResponse" name="authenticateResponse" />
44
- </wsdl:operation>
45
- </wsdl:portType>
46
- <wsdl:binding name="AuthenticationWebServiceImplServiceSoapBinding" type="tns:AuthenticationWebService">
47
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
48
- <wsdl:operation name="authenticate">
49
- <soap:operation soapAction="" style="document" />
50
- <wsdl:input name="authenticate">
51
- <soap:body use="literal" />
52
- </wsdl:input>
53
- <wsdl:output name="authenticateResponse">
54
- <soap:body use="literal" />
55
- </wsdl:output>
56
- </wsdl:operation>
57
- </wsdl:binding>
58
- <wsdl:service name="AuthenticationWebServiceImplService">
59
- <wsdl:port binding="tns:AuthenticationWebServiceImplServiceSoapBinding" name="AuthenticationWebServiceImplPort">
60
- <soap:address location="http://example.com/validation/1.0/AuthenticationService" />
61
- </wsdl:port>
62
- </wsdl:service>
63
- </wsdl:definitions>