wasabi 3.8.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cb7ba7548da2251d1886b1187abb9b1239b0a975e8b681378435f2c3b953acb
4
- data.tar.gz: 7d2f15a8c77f11f1141003e291d099d0196f09640f6af1d97798c16f68b40924
3
+ metadata.gz: fd8847efa2d8a3df38ee42e62d7c15f733c3b999235d399a870d5318c0ec0ad5
4
+ data.tar.gz: 9797838f0732c481c07049d6fef398481853c22203c7f87dd628f69d2950762e
5
5
  SHA512:
6
- metadata.gz: 99e99287b5ad3206b11daf4edd7d475b59c2cb9c45495112d09a4419d74a022240d7f96b90821c00477ec4677267713101bcf292326a609e52795fbd9d09b471
7
- data.tar.gz: 169c5f6b2ee393599b4d0e602c3db76f34b8355e93b85d6ac86154257f337ef624323492dfaaa68599c8f3bcaa4079ea409b80d3665efe6663a00a0243253d24
6
+ metadata.gz: 2ae94bc2457b051f3b644cf6241556afa8b47385536c92abcfeadcd9f17aee676eae8a56297e697e84429f773e90873f01fbc6758681235233db8c60fb580a1d
7
+ data.tar.gz: d9e8717b05fcb6d0167399f875ac437e142a2b105b01333b7a3e3081733f7b3c938779f93615a0b92e7697d3c14efc74ee99caf4dd68570bdf6aa4f2d14511f0
data/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@
4
4
 
5
5
  - _Your new line here. Mind the style of prefix used in the rest of the document._
6
6
 
7
+ ## 5.0.1 (2024-02-13)
8
+
9
+ - Restore support for HTTPI ([#117](https://github.com/savonrb/wasabi/issues/117)).
10
+
11
+ ## 5.0.0 (2024-01-08)
12
+
13
+ - Drop support for unsupported rubies (2.7 and below)
14
+ - Update to be compatible with Faraday ([#116](https://github.com/savonrb/wasabi/pull/116))
15
+
16
+ ## 4.0.0 (2023-03-27)
17
+
18
+ - Formally drop support for unsupported rubies (2.6 and below)
19
+ - Parse Input/Output When Operation Style is Document ([#114](https://github.com/savonrb/wasabi/pull/114))
20
+
7
21
  ## 3.8.0 (2022-10-01)
8
22
 
9
23
  - Change: Update HTTPI to 3.0 to remove the socksify dependency. ([savonrb/httpi#225](https://github.com/savonrb/httpi/pull/225))
@@ -23,7 +37,7 @@
23
37
 
24
38
  - Add: Support RPC-encoded WSDL ([#63](https://github.com/savonrb/wasabi/pull/63), [@fernandes][])
25
39
  - Fix: Depend on [addressable](https://github.com/sporkmonger/addressable), for unescape to avoid a Ruby warning ([#81](https://github.com/savonrb/wasabi/pull/81) , [@chaymaeBZ][], [@bvicenzo][])
26
- - Fix: [#59](https://github.com/savonrb/wasabi/issue/59) Turn `String` monkeypatches into `Wasabi` class methods ([@tjarratt][]) (released this version)
40
+ - Fix: [#59](https://github.com/savonrb/wasabi/pull/59) Turn `String` monkeypatches into `Wasabi` class methods ([@tjarratt][]) (released this version)
27
41
  - Change: Reduced size of gem by focusing the files list ([#89](https://github.com/savonrb/wasabi/pull/89), [@utkarsh2102][])
28
42
  - Remove: No longer tested on Rubinius
29
43
 
@@ -31,99 +45,99 @@
31
45
 
32
46
  NB: This version was never released to RubyGems.org.
33
47
 
34
- * Fix: [#59](https://github.com/savonrb/wasabi/issue/59) Stop monkey patching the String class to provide #snakecase
48
+ - Fix: [#59](https://github.com/savonrb/wasabi/pull/59) Stop monkey patching the String class to provide #snakecase
35
49
 
36
50
  ## 3.5.0 (2015-03-31)
37
51
 
38
- * Formally drop support for ruby 1.8.7
52
+ - Formally drop support for ruby 1.8.7
39
53
 
40
54
  ## 3.4.0 (2015-03-02)
41
55
 
42
- * Fix: [#634](https://github.com/savonrb/savon/issues/634) Reverts PR #46, generates *most* operation names correctly.
56
+ - Fix: [#634](https://github.com/savonrb/savon/issues/634) Reverts PR #46, generates *most* operation names correctly.
43
57
 
44
58
  ## 3.3.1 (2014-09-25)
45
59
 
46
- * Fix: [#48](https://github.com/savonrb/wasabi/issues/48) Remove dependency on mime-type gem
60
+ - Fix: [#48](https://github.com/savonrb/wasabi/issues/48) Remove dependency on mime-type gem
47
61
 
48
62
  ## 3.3.0 (2014-05-03)
49
- * Feature: [#44](https://github.com/savonrb/wasabi/pull/44) adds a feature to specify the HTTPI adapter you'd like to use.
63
+ - Feature: [#44](https://github.com/savonrb/wasabi/pull/44) adds a feature to specify the HTTPI adapter you'd like to use.
50
64
 
51
65
  ## 3.2.3 (2013-12-16)
52
- * Fix [#39](https://github.com/savonrb/wasabi/pull/39) fixes new regression in operation names. Huge thank you to #leoping for investigating this and issuing a pull request.
66
+ - Fix [#39](https://github.com/savonrb/wasabi/pull/39) fixes new regression in operation names. Huge thank you to #leoping for investigating this and issuing a pull request.
53
67
 
54
68
  ## 3.2.2 (2013-12-09)
55
69
 
56
- * Fix: [#32](https://github.com/savonrb/wasabi/issues/32) fixes a regression in operation names that was adversely affecting Savon: https://github.com/savonrb/savon/issues/520
70
+ - Fix: [#32](https://github.com/savonrb/wasabi/issues/32) fixes a regression in operation names that was adversely affecting Savon: https://github.com/savonrb/savon/issues/520
57
71
 
58
72
  ## 3.2.1 (2013-12-05)
59
73
 
60
- * Feature: Drops requirement for Nokogiri <= 1.6 for modern rubies. This was in place for ruby 1.8 but since support for that is going away, we shouldn't prevent users from using newer versions of Nokogiri.
74
+ - Feature: Drops requirement for Nokogiri <= 1.6 for modern rubies. This was in place for ruby 1.8 but since support for that is going away, we shouldn't prevent users from using newer versions of Nokogiri.
61
75
 
62
76
  ## 3.2.0 (2013-07-26)
63
77
 
64
- * Feature: [#20](https://github.com/savonrb/wasabi/issues/20) Limited support for listing an
78
+ - Feature: [#20](https://github.com/savonrb/wasabi/issues/20) Limited support for listing an
65
79
  operation's parameters. Please note that if your WSDL defines imports, this method might
66
80
  not return all types.
67
81
 
68
- * Improvement: [#7](https://github.com/savonrb/wasabi/issues/7) Major speed improvements.
82
+ - Improvement: [#7](https://github.com/savonrb/wasabi/issues/7) Major speed improvements.
69
83
 
70
- * Improvement: [#16](https://github.com/savonrb/wasabi/issues/16) Various improvements regarding
84
+ - Improvement: [#16](https://github.com/savonrb/wasabi/issues/16) Various improvements regarding
71
85
  element order and type information.
72
86
 
73
- * Fix: [#25](https://github.com/savonrb/wasabi/issues/25) Fixes a problem where Wasabi escaped
87
+ - Fix: [#25](https://github.com/savonrb/wasabi/issues/25) Fixes a problem where Wasabi escaped
74
88
  an already escaped endpoint URL.
75
89
 
76
- * Fix: [#15](https://github.com/savonrb/wasabi/issues/15) Fixes a bug where the operation tag
90
+ - Fix: [#15](https://github.com/savonrb/wasabi/issues/15) Fixes a bug where the operation tag
77
91
  name was not correctly extracted from the WSDL document.
78
92
 
79
93
  ## 3.1.0 (2013-04-21)
80
94
 
81
- * Feature: [#22](https://github.com/savonrb/wasabi/issues/22) added `Wasabi::Document#service_name`
95
+ - Feature: [#22](https://github.com/savonrb/wasabi/issues/22) added `Wasabi::Document#service_name`
82
96
  to return the name of the SOAP service. Original issue: [savonrb/savon#408](https://github.com/savonrb/savon/pull/408).
83
97
 
84
- * Fix: [#21](https://github.com/savonrb/wasabi/issues/21) when the Resolver gets an
98
+ - Fix: [#21](https://github.com/savonrb/wasabi/issues/21) when the Resolver gets an
85
99
  erroneous response (such as a 404), we now raise a more useful HTTPError.
86
100
 
87
- * Fix: [#23](https://github.com/savonrb/wasabi/issues/23) ignore extension base elements
101
+ - Fix: [#23](https://github.com/savonrb/wasabi/issues/23) ignore extension base elements
88
102
  defined in imports.
89
103
 
90
104
  ## 3.0.0 (2012-12-17)
91
105
 
92
- * Updated to HTTPI 2.0 to play nicely with Savon 2.0.
106
+ - Updated to HTTPI 2.0 to play nicely with Savon 2.0.
93
107
 
94
108
  ## 2.5.1 (2012-08-22)
95
109
 
96
- * Fix: [#14](https://github.com/savonrb/wasabi/issues/14) fixes an issue where
110
+ - Fix: [#14](https://github.com/savonrb/wasabi/issues/14) fixes an issue where
97
111
  finding the correct SOAP input tag and namespace identifier fails when portTypes
98
112
  are imported, since imports are currently not supported.
99
113
 
100
114
  The bug was introduced in v2.2.0 by [583cf6](https://github.com/savonrb/wasabi/commit/583cf658f1953411a7a7a4c22923fa0a046c8d6d)
101
115
 
102
- * Refactoring: Removed `Object#blank?` core extension.
116
+ - Refactoring: Removed `Object#blank?` core extension.
103
117
 
104
118
  ## 2.5.0 (2012-06-28)
105
119
 
106
- * Fix: [#10](https://github.com/savonrb/wasabi/issues/10) fixes an issue where
120
+ - Fix: [#10](https://github.com/savonrb/wasabi/issues/10) fixes an issue where
107
121
  Wasabi used the wrong operation name.
108
122
 
109
123
  ## 2.4.1 (2012-06-18)
110
124
 
111
- * Fix: [savonrb/savon#296](https://github.com/savonrb/savon/issues/296) fixes an issue where
125
+ - Fix: [savonrb/savon#296](https://github.com/savonrb/savon/issues/296) fixes an issue where
112
126
  the WSDL message element doesn't have part element.
113
127
 
114
128
  ## 2.4.0 (2012-06-08)
115
129
 
116
- * Feature: `Wasabi::Document` now accepts either a URL of a remote document,
130
+ - Feature: `Wasabi::Document` now accepts either a URL of a remote document,
117
131
  a path to a local file or raw XML. The code for this was moved from Savon over
118
132
  here as a first step towards supporting WSDL imports.
119
133
 
120
134
  ## 2.3.0 (2012-06-07)
121
135
 
122
- * Improvement: [#3](https://github.com/savonrb/wasabi/pull/3) adds object inheritance.
136
+ - Improvement: [#3](https://github.com/savonrb/wasabi/pull/3) adds object inheritance.
123
137
 
124
138
  ## 2.2.0 (2012-06-06)
125
139
 
126
- * Improvement: [#5](https://github.com/savonrb/wasabi/pull/5) - Get input from message
140
+ - Improvement: [#5](https://github.com/savonrb/wasabi/pull/5) - Get input from message
127
141
  element or portType input. See [savonrb/savon#277](https://github.com/savonrb/savon/pull/277)
128
142
  to get the full picture on how this all works together, and enables you to pass a single
129
143
  symbol into the `Savon::Client#request` method and get automatic namespace mapping, as well
@@ -131,23 +145,23 @@ NB: This version was never released to RubyGems.org.
131
145
 
132
146
  ## 2.1.1 (2012-05-18)
133
147
 
134
- * Fix: [issue 7](https://github.com/savonrb/wasabi/issues/7) - Performance regression.
148
+ - Fix: [issue 7](https://github.com/savonrb/wasabi/issues/7) - Performance regression.
135
149
 
136
150
  ## 2.1.0 (2012-02-17)
137
151
 
138
- * Improvement: The value of elementFormDefault can now be manually specified/overwritten.
152
+ - Improvement: The value of elementFormDefault can now be manually specified/overwritten.
139
153
 
140
- * Improvement: [issue 2](https://github.com/savonrb/wasabi/issues/2) - Allow symbolic endpoints
154
+ - Improvement: [issue 2](https://github.com/savonrb/wasabi/issues/2) - Allow symbolic endpoints
141
155
  like "http://server:port".
142
156
 
143
157
  ## 2.0.0 (2011-07-07)
144
158
 
145
- * Feature: Wasabi can now parse type definitions and namespaces.
159
+ - Feature: Wasabi can now parse type definitions and namespaces.
146
160
  Thanks to [jkingdon](https://github.com/jkingdon) for implementing this.
147
161
 
148
162
  ## 1.0.0 (2011-07-03)
149
163
 
150
- * Initial version extracted from the [Savon](http://rubygems.org/gems/savon) library.
164
+ - Initial version extracted from the [Savon](http://rubygems.org/gems/savon) library.
151
165
  Use it to build your own SOAP client and help to improve it!
152
166
 
153
167
  [@fernandes]: https://github.com/fernandes
data/lib/wasabi/parser.rb CHANGED
@@ -144,8 +144,9 @@ module Wasabi
144
144
  # TODO: check for soap namespace?
145
145
  soap_operation = operation.element_children.find { |node| node.name == 'operation' }
146
146
  soap_action = soap_operation['soapAction'] if soap_operation
147
+ soap_document = soap_operation["style"] if soap_operation
147
148
 
148
- if soap_action
149
+ if soap_action || soap_document
149
150
  soap_action = soap_action.to_s
150
151
  action = soap_action && !soap_action.empty? ? soap_action : name
151
152
 
@@ -247,8 +248,7 @@ module Wasabi
247
248
  port_type_operation = @port_type_operations[binding_type][operation_name]
248
249
  end
249
250
 
250
- port_type_input_output = port_type_operation &&
251
- port_type_operation.element_children.find { |node| node.name == input_output }
251
+ port_type_input_output = port_type_operation&.element_children&.find { |node| node.name == input_output }
252
252
 
253
253
  # TODO: Stupid fix for missing support for imports.
254
254
  # Sometimes portTypes are actually included in a separate WSDL.
@@ -260,6 +260,8 @@ module Wasabi
260
260
  end
261
261
 
262
262
  message_ns_id, message_type = nil
263
+ message_ns_id = port_message_ns_id
264
+ message_type = port_message_type
263
265
 
264
266
  # When there is a parts attribute in soap:body element, we should use that value
265
267
  # to look up the message part from messages array.
@@ -270,8 +272,8 @@ module Wasabi
270
272
  end
271
273
 
272
274
  message = @messages[port_message_type]
273
- port_message_part = message.element_children.find do |node|
274
- soap_body_parts.nil? ? (node.name == 'part') : ( node.name == 'part' && node['name'] == soap_body_parts)
275
+ port_message_part = message&.element_children&.find do |node|
276
+ soap_body_parts.nil? ? (node.name == "part") : (node.name == "part" && node["name"] == soap_body_parts)
275
277
  end
276
278
 
277
279
  if port_message_part && port_element = port_message_part.attribute('element')
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "httpi"
3
+ require "faraday"
4
4
 
5
5
  module Wasabi
6
6
 
@@ -22,7 +22,7 @@ module Wasabi
22
22
 
23
23
  def initialize(document, request = nil, adapter = nil)
24
24
  @document = document
25
- @request = request || HTTPI::Request.new
25
+ @request = request || Faraday.new
26
26
  @adapter = adapter
27
27
  end
28
28
 
@@ -41,10 +41,20 @@ module Wasabi
41
41
  private
42
42
 
43
43
  def load_from_remote
44
- request.url = document
45
- response = HTTPI.get(request, adapter)
44
+ # TODO: remove_after_httpi
45
+ # support HTTPI and Faraday side by side
46
+ # dont reference HTTPI by constant until inside the conditional, in case it isn't loaded
47
+ if request.class.to_s.include?("HTTPI::Request")
48
+ request.url = document
49
+ response = HTTPI.get(request, adapter)
46
50
 
47
- raise HTTPError.new("Error: #{response.code} for url #{request.url}", response) if response.error?
51
+ raise HTTPError.new("Error: #{response.code} for url #{request.url}", response) if response.error?
52
+ else
53
+ request.adapter *adapter if adapter
54
+ response = request.get(document)
55
+
56
+ raise HTTPError.new("Error: #{response.status} for url #{document}", response) unless response.success?
57
+ end
48
58
 
49
59
  response.body
50
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wasabi
4
- VERSION = '3.8.0'
4
+ VERSION = '5.0.1'
5
5
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasabi
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-01 00:00:00.000000000 Z
11
+ date: 2024-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: httpi
14
+ name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: '2.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
26
+ version: '2.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.2
33
+ version: 1.13.9
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: 1.4.2
40
+ version: 1.13.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: addressable
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -73,9 +73,10 @@ licenses:
73
73
  - MIT
74
74
  metadata:
75
75
  changelog_uri: https://github.com/savonrb/wasabi/blob/master/CHANGELOG.md
76
- documentation_uri: https://www.rubydoc.info/gems/wasabi/3.8.0
76
+ documentation_uri: https://www.rubydoc.info/gems/wasabi/5.0.1
77
77
  source_code_uri: https://github.com/savonrb/wasabi
78
78
  bug_tracker_uri: https://github.com/savonrb/wasabi/issues
79
+ rubygems_mfa_required: 'true'
79
80
  post_install_message:
80
81
  rdoc_options: []
81
82
  require_paths:
@@ -84,14 +85,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
85
  requirements:
85
86
  - - ">="
86
87
  - !ruby/object:Gem::Version
87
- version: 1.9.2
88
+ version: '3.0'
88
89
  required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
91
  - - ">="
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  requirements: []
94
- rubygems_version: 3.3.7
95
+ rubygems_version: 3.3.26
95
96
  signing_key:
96
97
  specification_version: 4
97
98
  summary: A simple WSDL parser