Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Use local schemas for testing
Browse files Browse the repository at this point in the history
This speeds testing up A LOT!!!!

Also, updates gem dependencies.
  • Loading branch information
JPrevost committed Nov 30, 2015
1 parent a0df214 commit ad1bcf8
Show file tree
Hide file tree
Showing 8 changed files with 2,042 additions and 37 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Expand Up @@ -36,6 +36,4 @@ group :test do
gem 'minitest-reporters'
gem 'minitest-rails'
gem 'minitest-rails-capybara'
gem 'vcr'
gem 'webmock'
end
28 changes: 8 additions & 20 deletions Gemfile.lock
Expand Up @@ -36,7 +36,6 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
annotate (2.6.10)
activerecord (>= 3.2, <= 4.3)
rake (~> 10.4)
Expand All @@ -50,7 +49,7 @@ GEM
debug_inspector (>= 0.0.1)
bootstrap_form (2.3.0)
builder (3.2.2)
byebug (8.2.0)
byebug (8.2.1)
capybara (2.5.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
Expand All @@ -65,8 +64,6 @@ GEM
term-ansicolor (~> 1.3)
thor (~> 0.19.1)
tins (~> 1.6.0)
crack (0.4.2)
safe_yaml (~> 1.0.0)
debug_inspector (0.0.2)
devise (3.5.2)
bcrypt (~> 3.0)
Expand All @@ -84,7 +81,6 @@ GEM
multipart-post (>= 1.2, < 3)
globalid (0.3.6)
activesupport (>= 4.1.0)
hashdiff (0.2.3)
hashie (3.4.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
Expand All @@ -108,9 +104,9 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.2)
mini_portile (0.6.2)
minitest (5.8.2)
mime-types (2.99)
mini_portile2 (2.0.0)
minitest (5.8.3)
minitest-capybara (0.7.2)
capybara (~> 2.2)
minitest (~> 5.0)
Expand All @@ -125,7 +121,7 @@ GEM
minitest-capybara (~> 0.7.0)
minitest-metadata (~> 0.5.0)
minitest-rails (~> 2.1)
minitest-reporters (1.1.5)
minitest-reporters (1.1.7)
ansi
builder
minitest (>= 5.0)
Expand All @@ -134,8 +130,8 @@ GEM
multi_xml (0.5.5)
multipart-post (2.0.0)
netrc (0.11.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
nokogiri (1.6.7)
mini_portile2 (~> 2.0.0.rc2)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
Expand Down Expand Up @@ -207,13 +203,12 @@ GEM
ruby-progressbar (~> 1.7)
tins (<= 1.6.0)
ruby-progressbar (1.7.5)
safe_yaml (1.0.4)
simplecov (0.10.0)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.4.0)
sprockets (3.4.1)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
Expand Down Expand Up @@ -242,18 +237,13 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
vcr (3.0.0)
warden (1.2.3)
rack (>= 1.0)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
webmock (1.22.3)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
xpath (2.0.0)
nokogiri (~> 1.3)

Expand Down Expand Up @@ -284,9 +274,7 @@ DEPENDENCIES
therubyracer
twitter-bootstrap-rails
uglifier (>= 1.3.0)
vcr
web-console (~> 2.0)
webmock

BUNDLED WITH
1.10.6
185 changes: 185 additions & 0 deletions test/fixtures/schemas/epdcx.xsd
@@ -0,0 +1,185 @@

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.org/eprint/epdcx/2006-11-16/"
targetNamespace="http://purl.org/eprint/epdcx/2006-11-16/"
elementFormDefault="qualified"
attributeFormDefault="qualified">

<xs:annotation>
<xs:documentation xml:lang="en">
XML Schema for http://purl.org/eprint/epdcx/2006-11-16/ namespace

Created 2006-11-30

Created by

Pete Johnston (pete.johnston@eduserv.org.uk)

This schema declares a set of XML elements and attributes for use in Eprints-DC-XML documents.

</xs:documentation>

</xs:annotation>

<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd">
</xs:import>


<xs:complexType name="DescriptionSetElement" final="extension">
<xs:annotation>
<xs:documentation>
The DescriptionSetElement complexType defines the content model for a Eprints-DC-XML Description Set Element.
A Eprints-DC-XML Description Set Element may contain one or more Eprints-DC-XML Description Elements.
A Eprints-DC-XML Description Set Element may also have XML attributes, the names of which may be from any other XML namespace.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="description" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attributeGroup ref="DescriptionSetElementAttributes" />
</xs:complexType>

<xs:attributeGroup name="DescriptionSetElementAttributes">
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:attributeGroup>

<xs:element name="descriptionSet" type="DescriptionSetElement" />


<xs:complexType name="DescriptionElement" final="extension">
<xs:annotation>
<xs:documentation>
The DescriptionElement complexType defines the content model for a Eprints-DC-XML Description Element.
A Eprints-DC-XML Description Element may contain one or more Eprints-DC-XML Statement Elements.
A Eprints-DC-XML Description Element may also have a epdcx:resourceURI and a epdcx:resourceId attribute.
A Eprints-DC-XML Description Element may also have other XML attributes, the names of which may be from any other XML namespace.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="statement" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attributeGroup ref="DescriptionElementAttributes" />
</xs:complexType>

<xs:attributeGroup name="DescriptionElementAttributes">
<xs:attribute ref="resourceId" use="optional"/> <!-- can't constrain either resourceId or resourceURI -->
<xs:attribute ref="resourceURI" use="optional"/>
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:attributeGroup>

<xs:attribute name="resourceId" type="xs:ID" />

<xs:attribute name="resourceURI" type="xs:anyURI" />

<xs:element name="description" type="DescriptionElement" />


<xs:complexType name="StatementElement" final="extension">
<xs:annotation>
<xs:documentation>
The StatementElement complexType defines the content model for a Eprints-DC-XML Statement Element.
A Eprints-DC-XML Statement Element may contain Value Representation Elements.
A Eprints-DC-XML Statement Element may also have a epdcx:valueURI, epdcx:vesURI or epdcx:valueRef attribute.
A Eprints-DC-XML Statement Element may also have other XML attributes, the names of which may be from any other XML namespace.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="valueString"/>
<xs:element ref="XMLRepresentation"/>
<xs:element ref="binaryRepresentation"/>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="StatementElementAttributes"/>
</xs:complexType>

<xs:attributeGroup name="StatementElementAttributes">
<xs:attribute ref="propertyURI" use="required"/>
<xs:attribute ref="vesURI" use="optional"/>
<xs:attribute ref="valueURI" use="optional"/> <!-- can't constrain either valueRef or valueURI -->
<xs:attribute ref="valueRef" use="optional"/>
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:attributeGroup>

<xs:attribute name="propertyURI" type="xs:anyURI" />

<xs:attribute name="valueURI" type="xs:anyURI" />

<xs:attribute name="vesURI" type="xs:anyURI" />

<xs:attribute name="valueRef" type="xs:IDREF" />

<xs:element name="statement" type="StatementElement" />



<xs:complexType name="ValueStringElement" final="extension">
<xs:annotation>
<xs:documentation>

</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:anySimpleType">
<!-- <xs:extension base="xs:string"> -->
<xs:attributeGroup ref="ValueStringElementAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:attributeGroup name="ValueStringElementAttributes">
<xs:attribute ref="xml:lang" use="optional"/> <!-- can't constrain either xml:lang or sesURI -->
<xs:attribute ref="sesURI" use="optional"/>
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:attributeGroup>

<xs:attribute name="sesURI" type="xs:anyURI" />

<xs:element name="valueString" type="ValueStringElement" />


<xs:complexType name="XMLRepresentationElement" mixed="true" final="extension">
<xs:annotation>
<xs:documentation>
XML Representation Element as mixed content
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</xs:sequence>
<xs:attributeGroup ref="XMLRepresentationElementAttributes"/>
</xs:complexType>

<xs:attributeGroup name="XMLRepresentationElementAttributes">
<xs:attribute ref="mediaType" use="required" />
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:attributeGroup>

<xs:attribute name="mediaType" type="xs:string" />

<xs:element name="XMLRepresentation" type="XMLRepresentationElement" />


<xs:complexType name="BinaryRepresentationElement" final="extension">
<xs:annotation>
<xs:documentation>
Binary Representation Element as Base64
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attributeGroup ref="BinaryRepresentationElementAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:attributeGroup name="BinaryRepresentationElementAttributes">
<xs:attribute ref="mediaType" use="required" />
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:attributeGroup>

<xs:element name="binaryRepresentation" type="BinaryRepresentationElement" />

</xs:schema>

0 comments on commit ad1bcf8

Please sign in to comment.