soaspec 0.0.88 → 0.0.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +15 -15
- data/.gitlab-ci.yml +31 -31
- data/.rspec +3 -3
- data/.rubocop.yml +2 -2
- data/CODE_OF_CONDUCT.md +74 -74
- data/ChangeLog +374 -370
- data/Gemfile +6 -6
- data/LICENSE.txt +21 -21
- data/README.md +85 -85
- data/Rakefile +24 -24
- data/Todo.md +6 -6
- data/exe/soaspec +119 -123
- data/exe/soaspec-virtual-server +98 -98
- data/exe/xml_to_yaml_file +60 -60
- data/lib/soaspec.rb +80 -80
- data/lib/soaspec/core_ext/hash.rb +83 -83
- data/lib/soaspec/exchange.rb +234 -234
- data/lib/soaspec/exchange_handlers/exchange_handler.rb +103 -103
- data/lib/soaspec/exchange_handlers/handler_accessors.rb +106 -106
- data/lib/soaspec/exchange_handlers/rest_accessors.rb +92 -95
- data/lib/soaspec/exchange_handlers/rest_handler.rb +296 -296
- data/lib/soaspec/exchange_handlers/rest_methods.rb +44 -44
- data/lib/soaspec/exchange_handlers/soap_handler.rb +236 -236
- data/lib/soaspec/exe_helpers.rb +56 -56
- data/lib/soaspec/generator/.rspec.erb +5 -5
- data/lib/soaspec/generator/.travis.yml.erb +5 -5
- data/lib/soaspec/generator/Gemfile.erb +8 -8
- data/lib/soaspec/generator/README.md.erb +29 -29
- data/lib/soaspec/generator/Rakefile.erb +19 -19
- data/lib/soaspec/generator/config/data/default.yml.erb +1 -1
- data/lib/soaspec/generator/lib/blz_service.rb.erb +26 -26
- data/lib/soaspec/generator/lib/dynamic_class_content.rb.erb +12 -12
- data/lib/soaspec/generator/lib/shared_example.rb.erb +8 -8
- data/lib/soaspec/generator/spec/dynamic_soap_spec.rb.erb +12 -12
- data/lib/soaspec/generator/spec/soap_spec.rb.erb +51 -51
- data/lib/soaspec/generator/spec/spec_helper.rb.erb +20 -20
- data/lib/soaspec/generator/template/soap_template.xml +6 -6
- data/lib/soaspec/interpreter.rb +40 -40
- data/lib/soaspec/matchers.rb +65 -65
- data/lib/soaspec/not_found_errors.rb +13 -13
- data/lib/soaspec/soaspec_shared_examples.rb +24 -24
- data/lib/soaspec/spec_logger.rb +27 -27
- data/lib/soaspec/test_server/bank.wsdl +90 -90
- data/lib/soaspec/test_server/get_bank.rb +160 -160
- data/lib/soaspec/test_server/invoices.rb +27 -27
- data/lib/soaspec/test_server/namespace.xml +14 -14
- data/lib/soaspec/test_server/note.xml +5 -5
- data/lib/soaspec/test_server/puppy_service.rb +20 -20
- data/lib/soaspec/test_server/test_attribute.rb +13 -13
- data/lib/soaspec/version.rb +2 -2
- data/lib/soaspec/wsdl_generator.rb +115 -93
- data/soaspec.gemspec +45 -45
- data/test.wsdl +116 -116
- data/test.xml +10 -10
- data/test_wsdl.rb +43 -43
- metadata +3 -3
data/test.xml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
<?xml version="1.0"?>
|
2
|
-
|
3
|
-
<note
|
4
|
-
xmlns="https://www.w3schools.com"
|
5
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
6
|
-
xsi:schemaLocation="https://www.w3schools.com/xml/note.xsd">
|
7
|
-
<to>Tove</to>
|
8
|
-
<from>123.2</from>
|
9
|
-
<heading>Reminder</heading>
|
10
|
-
<body>Don't forget me this weekend!</body>
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
|
3
|
+
<note
|
4
|
+
xmlns="https://www.w3schools.com"
|
5
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
6
|
+
xsi:schemaLocation="https://www.w3schools.com/xml/note.xsd">
|
7
|
+
<to>Tove</to>
|
8
|
+
<from>123.2</from>
|
9
|
+
<heading>Reminder</heading>
|
10
|
+
<body>Don't forget me this weekend!</body>
|
11
11
|
</note>
|
data/test_wsdl.rb
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
|
2
|
-
require 'wasabi'
|
3
|
-
require 'savon'
|
4
|
-
|
5
|
-
|
6
|
-
#document = Savon.client(wsdl: 'test.wsdl').wsdl
|
7
|
-
#document = Savon.client(wsdl: 'http://www.webservicex.com/globalweather.asmx?wsdl').wsdl
|
8
|
-
#document = Wasabi.document File.read('test.wsdl')
|
9
|
-
document = Wasabi.document 'http://www.webservicex.net/ConvertTemperature.asmx?WSDL'
|
10
|
-
parser = document.parser
|
11
|
-
|
12
|
-
|
13
|
-
# TEST SCHEMA
|
14
|
-
#
|
15
|
-
# parser.schemas.each do |schema|
|
16
|
-
# puts 'SCHEMA * '
|
17
|
-
# puts schema
|
18
|
-
#
|
19
|
-
# xsd = Nokogiri::XML::Schema(schema.to_s)
|
20
|
-
#
|
21
|
-
# doc = Nokogiri::XML(File.read('test.xml'))
|
22
|
-
#
|
23
|
-
# xsd.validate(doc).each do |error|
|
24
|
-
# puts error.message
|
25
|
-
# end
|
26
|
-
# end
|
27
|
-
#
|
28
|
-
|
29
|
-
schemes = parser.schemas
|
30
|
-
puts schemes
|
31
|
-
custom_type = schemes.xpath("//*[@name='TemperatureUnit']")
|
32
|
-
if custom_type.first
|
33
|
-
puts 'CUST' + custom_type.to_s
|
34
|
-
prefix = custom_type.first.namespace.prefix
|
35
|
-
puts prefix
|
36
|
-
|
37
|
-
enumerations = custom_type.xpath("//#{prefix}:enumeration")
|
38
|
-
|
39
|
-
puts 'ENUM' + enumerations.to_s
|
40
|
-
|
41
|
-
enumerations.each do |enum_value|
|
42
|
-
puts enum_value['value']
|
43
|
-
end
|
1
|
+
|
2
|
+
require 'wasabi'
|
3
|
+
require 'savon'
|
4
|
+
|
5
|
+
|
6
|
+
#document = Savon.client(wsdl: 'test.wsdl').wsdl
|
7
|
+
#document = Savon.client(wsdl: 'http://www.webservicex.com/globalweather.asmx?wsdl').wsdl
|
8
|
+
#document = Wasabi.document File.read('test.wsdl')
|
9
|
+
document = Wasabi.document 'http://www.webservicex.net/ConvertTemperature.asmx?WSDL'
|
10
|
+
parser = document.parser
|
11
|
+
|
12
|
+
|
13
|
+
# TEST SCHEMA
|
14
|
+
#
|
15
|
+
# parser.schemas.each do |schema|
|
16
|
+
# puts 'SCHEMA * '
|
17
|
+
# puts schema
|
18
|
+
#
|
19
|
+
# xsd = Nokogiri::XML::Schema(schema.to_s)
|
20
|
+
#
|
21
|
+
# doc = Nokogiri::XML(File.read('test.xml'))
|
22
|
+
#
|
23
|
+
# xsd.validate(doc).each do |error|
|
24
|
+
# puts error.message
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
|
29
|
+
schemes = parser.schemas
|
30
|
+
puts schemes
|
31
|
+
custom_type = schemes.xpath("//*[@name='TemperatureUnit']")
|
32
|
+
if custom_type.first
|
33
|
+
puts 'CUST' + custom_type.to_s
|
34
|
+
prefix = custom_type.first.namespace.prefix
|
35
|
+
puts prefix
|
36
|
+
|
37
|
+
enumerations = custom_type.xpath("//#{prefix}:enumeration")
|
38
|
+
|
39
|
+
puts 'ENUM' + enumerations.to_s
|
40
|
+
|
41
|
+
enumerations.each do |enum_value|
|
42
|
+
puts enum_value['value']
|
43
|
+
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soaspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.89
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -363,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
363
363
|
version: '0'
|
364
364
|
requirements: []
|
365
365
|
rubyforge_project:
|
366
|
-
rubygems_version: 2.
|
366
|
+
rubygems_version: 2.6.14
|
367
367
|
signing_key:
|
368
368
|
specification_version: 4
|
369
369
|
summary: Helps to create RSpec specs for 'SOAP' or 'REST' apis
|