soaspec 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +15 -15
  3. data/.gitlab-ci.yml +31 -31
  4. data/.rspec +3 -3
  5. data/.rubocop.yml +2 -2
  6. data/CODE_OF_CONDUCT.md +74 -74
  7. data/ChangeLog +384 -384
  8. data/Gemfile +6 -6
  9. data/LICENSE.txt +21 -21
  10. data/README.md +85 -85
  11. data/Rakefile +24 -24
  12. data/Todo.md +6 -6
  13. data/exe/soaspec +119 -119
  14. data/exe/soaspec-virtual-server +103 -103
  15. data/exe/xml_to_yaml_file +60 -60
  16. data/lib/soaspec.rb +91 -91
  17. data/lib/soaspec/core_ext/hash.rb +83 -83
  18. data/lib/soaspec/exchange.rb +234 -234
  19. data/lib/soaspec/exchange_handlers/exchange_handler.rb +103 -103
  20. data/lib/soaspec/exchange_handlers/handler_accessors.rb +106 -106
  21. data/lib/soaspec/exchange_handlers/rest_accessors.rb +92 -92
  22. data/lib/soaspec/exchange_handlers/rest_handler.rb +311 -311
  23. data/lib/soaspec/exchange_handlers/rest_methods.rb +44 -44
  24. data/lib/soaspec/exchange_handlers/soap_handler.rb +236 -236
  25. data/lib/soaspec/exe_helpers.rb +56 -56
  26. data/lib/soaspec/generator/.rspec.erb +5 -5
  27. data/lib/soaspec/generator/.travis.yml.erb +5 -5
  28. data/lib/soaspec/generator/Gemfile.erb +8 -8
  29. data/lib/soaspec/generator/README.md.erb +29 -29
  30. data/lib/soaspec/generator/Rakefile.erb +19 -19
  31. data/lib/soaspec/generator/config/data/default.yml.erb +1 -1
  32. data/lib/soaspec/generator/lib/blz_service.rb.erb +26 -26
  33. data/lib/soaspec/generator/lib/dynamic_class_content.rb.erb +12 -12
  34. data/lib/soaspec/generator/lib/shared_example.rb.erb +8 -8
  35. data/lib/soaspec/generator/spec/dynamic_soap_spec.rb.erb +12 -12
  36. data/lib/soaspec/generator/spec/soap_spec.rb.erb +51 -51
  37. data/lib/soaspec/generator/spec/spec_helper.rb.erb +20 -20
  38. data/lib/soaspec/generator/template/soap_template.xml +6 -6
  39. data/lib/soaspec/interpreter.rb +40 -40
  40. data/lib/soaspec/matchers.rb +65 -65
  41. data/lib/soaspec/not_found_errors.rb +13 -13
  42. data/lib/soaspec/soaspec_shared_examples.rb +24 -24
  43. data/lib/soaspec/spec_logger.rb +27 -27
  44. data/lib/soaspec/test_server/bank.wsdl +90 -90
  45. data/lib/soaspec/test_server/get_bank.rb +160 -160
  46. data/lib/soaspec/test_server/invoices.rb +27 -27
  47. data/lib/soaspec/test_server/namespace.xml +14 -14
  48. data/lib/soaspec/test_server/note.xml +5 -5
  49. data/lib/soaspec/test_server/puppy_service.rb +20 -20
  50. data/lib/soaspec/test_server/test_attribute.rb +13 -13
  51. data/lib/soaspec/version.rb +2 -2
  52. data/lib/soaspec/wsdl_generator.rb +144 -144
  53. data/soaspec.gemspec +46 -45
  54. data/test.wsdl +116 -116
  55. data/test.xml +10 -10
  56. data/test_wsdl.rb +43 -43
  57. metadata +17 -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>
@@ -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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2018-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: faker
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: hashie
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -363,7 +377,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
377
  version: '0'
364
378
  requirements: []
365
379
  rubyforge_project:
366
- rubygems_version: 2.7.6
380
+ rubygems_version: 2.6.14
367
381
  signing_key:
368
382
  specification_version: 4
369
383
  summary: Helps to create RSpec specs for 'SOAP' or 'REST' apis