wsdl_validator 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/lib/wsdl_validator/error.rb +8 -0
- data/lib/wsdl_validator/version.rb +1 -1
- data/lib/wsdl_validator/wsdl_validator.rb +4 -2
- metadata +2 -3
- data/.idea/markdown-navigator/profiles_settings.xml +0 -3
- data/.idea/modules.xml +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9961bec661ee4694a60380405b01bde5eda2a839
|
4
|
+
data.tar.gz: b1a9280dc26806fd4c2fd5e313679f7959dcf696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6d8ae3431d9ef649f547b06d53dcf24afddb76fd19ea343ca62609dec9cecbf20f6fc5b400b41b90b0560ea85c1dbb8abce31cbbf78abf95c67ba61d4a6d1d
|
7
|
+
data.tar.gz: 4e2aecefd02a9edb07fe135280764a8bba6603450cdc9da5bdce1a694b05013649c5d1a16d6f980f1cc6bb35b779ce9a63409fb0266d31206fec4a6f0c5c026e
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A simple gem to aid with validator a SOAP message according to a WSDL.
|
4
4
|
|
5
|
-
[![Build Status](https://gitlab.com/samuel-garratt/wsdl_validator/badges/master/build.svg)](https://gitlab.com/samuel-garratt/
|
5
|
+
[![Build Status](https://gitlab.com/samuel-garratt/wsdl_validator/badges/master/build.svg)](https://gitlab.com/samuel-garratt/wsdl_validator/pipelines)
|
6
6
|
|
7
7
|
This is a work in progress
|
8
8
|
|
@@ -31,7 +31,6 @@ wsdl.valid? xml_message
|
|
31
31
|
=> Returns true or false
|
32
32
|
|
33
33
|
# TODO
|
34
|
-
* Exception returned for invalid xsd
|
35
34
|
* Look up schemas that need to be imported
|
36
35
|
* Basic authentication for reading schemas
|
37
36
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative 'error'
|
2
|
+
|
1
3
|
# Helps to validate xml against schemas contained in a WSDL
|
2
4
|
class WsdlValidator
|
3
5
|
# @param [String] wsdl_url URL to where WSDL is stored
|
@@ -25,8 +27,8 @@ class WsdlValidator
|
|
25
27
|
xml_under_test = extract_root_from_soap(soap_envelope) if soap_envelope
|
26
28
|
xsd = Nokogiri::XML::Schema(@schemas)
|
27
29
|
validator = xsd.validate(xml_under_test)
|
28
|
-
validator.each { |error| puts error.message }
|
29
|
-
|
30
|
+
# validator.each { |error| puts error.message }
|
31
|
+
raise WsdlValidator::Error, validator.join unless validator.empty?
|
30
32
|
true
|
31
33
|
end
|
32
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wsdl_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Garratt
|
@@ -117,8 +117,6 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
119
|
- ".gitlab-ci.yml"
|
120
|
-
- ".idea/markdown-navigator/profiles_settings.xml"
|
121
|
-
- ".idea/modules.xml"
|
122
120
|
- ".rspec"
|
123
121
|
- CODE_OF_CONDUCT.md
|
124
122
|
- Gemfile
|
@@ -128,6 +126,7 @@ files:
|
|
128
126
|
- bin/console
|
129
127
|
- bin/setup
|
130
128
|
- lib/wsdl_validator.rb
|
129
|
+
- lib/wsdl_validator/error.rb
|
131
130
|
- lib/wsdl_validator/version.rb
|
132
131
|
- lib/wsdl_validator/wsdl_validator.rb
|
133
132
|
- wsdl_validator.gemspec
|
data/.idea/modules.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectModuleManager">
|
4
|
-
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/wsdl_validator.iml" filepath="$PROJECT_DIR$/.idea/wsdl_validator.iml" />
|
6
|
-
</modules>
|
7
|
-
</component>
|
8
|
-
</project>
|