xml_schema 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ xml_schema (0.1.2)
2
+
3
+ * fix for comparing URIs ending in "/"
4
+
1
5
  xml_schema (0.1.1)
2
6
 
3
7
  * NS.add to add custom namespaces
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xml_schema (0.1.1)
4
+ xml_schema (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module XmlSchema
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/xml_schema.rb CHANGED
@@ -41,7 +41,8 @@ module XmlSchema
41
41
  datatype =
42
42
  if literal_type
43
43
  ns, l_type = literal_type.delete("<>").split('#')
44
- if URI(ns) == NS::XMLSchema.uri && TYPES.include?(l_type)
44
+ # TODO: somehow use a better comparison of URIs which ignores "/" at the end?
45
+ if URI(ns.sub(/\/*$/, "/")) == NS::XMLSchema.uri && TYPES.include?(l_type)
45
46
  l_type
46
47
  else
47
48
  raise "Incompatible datatype URI! (#{ns})"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: