adiwg-mdjson_schemas 1.0.0rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.travis.yml +7 -0
- data/CREDITS +3 -0
- data/Gemfile +4 -0
- data/LICENSE +24 -0
- data/README.md +36 -0
- data/Rakefile +12 -0
- data/adiwg-json_schemas.gemspec +25 -0
- data/examples/additionalDocumentation.json +61 -0
- data/examples/address.json +10 -0
- data/examples/associatedResource.json +119 -0
- data/examples/citation.json +128 -0
- data/examples/contact.json +205 -0
- data/examples/contactRef.json +12 -0
- data/examples/dataDictionary.json +547 -0
- data/examples/dataQuality.json +272 -0
- data/examples/date.json +19 -0
- data/examples/distributor.json +113 -0
- data/examples/extent_linestring.json +288 -0
- data/examples/extent_point.json +246 -0
- data/examples/extent_polygon.json +353 -0
- data/examples/format.json +14 -0
- data/examples/full_example.json +2844 -0
- data/examples/full_example2.json +2325 -0
- data/examples/geojson.json +446 -0
- data/examples/graphicOverview.json +28 -0
- data/examples/hierarchyLevel.json +90 -0
- data/examples/keywords.json +144 -0
- data/examples/lcc_project_example.json +326 -0
- data/examples/legalConstraints.json +17 -0
- data/examples/maintInfo.json +34 -0
- data/examples/metadataInfo.json +103 -0
- data/examples/minimum_example.json +35 -0
- data/examples/onlineResource.json +17 -0
- data/examples/resolution.json +9 -0
- data/examples/resourceInfo.json +1264 -0
- data/examples/resourceMaintenance.json +10 -0
- data/examples/securityConstraints.json +13 -0
- data/examples/spatialRef.json +14 -0
- data/examples/taxonomy.json +197 -0
- data/examples/temporalElement.json +29 -0
- data/examples/uri.json +16 -0
- data/examples/usage.json +35 -0
- data/examples/verticalExtent.json +18 -0
- data/lib/adiwg-mdjson_schemas.rb +1 -0
- data/lib/adiwg/mdjson_schemas.rb +7 -0
- data/lib/adiwg/mdjson_schemas/utils.rb +20 -0
- data/lib/adiwg/mdjson_schemas/validator.rb +42 -0
- data/lib/adiwg/mdjson_schemas/version.rb +6 -0
- data/schema/schema.json +64 -0
- data/schema/schema/citation.json +186 -0
- data/schema/schema/contact.json +255 -0
- data/schema/schema/dataDictionary.json +209 -0
- data/schema/schema/dataQuality.json +159 -0
- data/schema/schema/distributor.json +171 -0
- data/schema/schema/extent.json +214 -0
- data/schema/schema/geojson/bbox.json +14 -0
- data/schema/schema/geojson/crs.json +99 -0
- data/schema/schema/geojson/geojson.json +194 -0
- data/schema/schema/geojson/geometry.json +203 -0
- data/schema/schema/graphicOverview.json +42 -0
- data/schema/schema/keyword.json +39 -0
- data/schema/schema/maintInfo.json +43 -0
- data/schema/schema/metadata.json +173 -0
- data/schema/schema/onlineResource.json +42 -0
- data/schema/schema/resolution.json +51 -0
- data/schema/schema/resourceConstraint.json +108 -0
- data/schema/schema/resourceInfo.json +305 -0
- data/schema/schema/taxonomy.json +122 -0
- data/schema/schema/usage.json +39 -0
- data/templates/mdJson_template.json +1065 -0
- data/test/draft-04.json +189 -0
- data/test/tc_schemas.rb +210 -0
- data/test/tc_utils.rb +27 -0
- metadata +178 -0
data/test/draft-04.json
ADDED
@@ -0,0 +1,189 @@
|
|
1
|
+
{
|
2
|
+
"$schema" : "http://json-schema.org/draft-04/schema#",
|
3
|
+
"id" : "http://json-schema.org/draft-04/schema#",
|
4
|
+
"type" : "object",
|
5
|
+
|
6
|
+
"properties" : {
|
7
|
+
"type" : {
|
8
|
+
"type" : [
|
9
|
+
{
|
10
|
+
"id" : "#simple-type",
|
11
|
+
"type" : "string",
|
12
|
+
"enum" : ["object", "array", "string", "number", "boolean", "null", "any"]
|
13
|
+
},
|
14
|
+
"array"
|
15
|
+
],
|
16
|
+
"items" : {
|
17
|
+
"type" : [
|
18
|
+
{"$ref" : "#simple-type"},
|
19
|
+
{"$ref" : "#"}
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"uniqueItems" : true,
|
23
|
+
"default" : "any"
|
24
|
+
},
|
25
|
+
|
26
|
+
"disallow" : {
|
27
|
+
"type" : ["string", "array"],
|
28
|
+
"items" : {
|
29
|
+
"type" : ["string", {"$ref" : "#"}]
|
30
|
+
},
|
31
|
+
"uniqueItems" : true
|
32
|
+
},
|
33
|
+
|
34
|
+
"extends" : {
|
35
|
+
"type" : [{"$ref" : "#"}, "array"],
|
36
|
+
"items" : {"$ref" : "#"},
|
37
|
+
"default" : {}
|
38
|
+
},
|
39
|
+
|
40
|
+
"enum" : {
|
41
|
+
"type" : "array",
|
42
|
+
"minItems" : 1,
|
43
|
+
"uniqueItems" : true
|
44
|
+
},
|
45
|
+
|
46
|
+
"minimum" : {
|
47
|
+
"type" : "number"
|
48
|
+
},
|
49
|
+
|
50
|
+
"maximum" : {
|
51
|
+
"type" : "number"
|
52
|
+
},
|
53
|
+
|
54
|
+
"exclusiveMinimum" : {
|
55
|
+
"type" : "boolean",
|
56
|
+
"default" : false
|
57
|
+
},
|
58
|
+
|
59
|
+
"exclusiveMaximum" : {
|
60
|
+
"type" : "boolean",
|
61
|
+
"default" : false
|
62
|
+
},
|
63
|
+
|
64
|
+
"divisibleBy" : {
|
65
|
+
"type" : "number",
|
66
|
+
"minimum" : 0,
|
67
|
+
"exclusiveMinimum" : true,
|
68
|
+
"default" : 1
|
69
|
+
},
|
70
|
+
|
71
|
+
"minLength" : {
|
72
|
+
"type" : "integer",
|
73
|
+
"minimum" : 0,
|
74
|
+
"default" : 0
|
75
|
+
},
|
76
|
+
|
77
|
+
"maxLength" : {
|
78
|
+
"type" : "integer"
|
79
|
+
},
|
80
|
+
|
81
|
+
"pattern" : {
|
82
|
+
"type" : "string"
|
83
|
+
},
|
84
|
+
|
85
|
+
"items" : {
|
86
|
+
"type" : [{"$ref" : "#"}, "array"],
|
87
|
+
"items" : {"$ref" : "#"},
|
88
|
+
"default" : {}
|
89
|
+
},
|
90
|
+
|
91
|
+
"additionalItems" : {
|
92
|
+
"type" : [{"$ref" : "#"}, "boolean"],
|
93
|
+
"default" : {}
|
94
|
+
},
|
95
|
+
|
96
|
+
"minItems" : {
|
97
|
+
"type" : "integer",
|
98
|
+
"minimum" : 0,
|
99
|
+
"default" : 0
|
100
|
+
},
|
101
|
+
|
102
|
+
"maxItems" : {
|
103
|
+
"type" : "integer",
|
104
|
+
"minimum" : 0
|
105
|
+
},
|
106
|
+
|
107
|
+
"uniqueItems" : {
|
108
|
+
"type" : "boolean",
|
109
|
+
"default" : false
|
110
|
+
},
|
111
|
+
|
112
|
+
"properties" : {
|
113
|
+
"type" : "object",
|
114
|
+
"additionalProperties" : {"$ref" : "#"},
|
115
|
+
"default" : {}
|
116
|
+
},
|
117
|
+
|
118
|
+
"patternProperties" : {
|
119
|
+
"type" : "object",
|
120
|
+
"additionalProperties" : {"$ref" : "#"},
|
121
|
+
"default" : {}
|
122
|
+
},
|
123
|
+
|
124
|
+
"additionalProperties" : {
|
125
|
+
"type" : [{"$ref" : "#"}, "boolean"],
|
126
|
+
"default" : {}
|
127
|
+
},
|
128
|
+
|
129
|
+
"minProperties" : {
|
130
|
+
"type" : "integer",
|
131
|
+
"minimum" : 0,
|
132
|
+
"default" : 0
|
133
|
+
},
|
134
|
+
|
135
|
+
"maxProperties" : {
|
136
|
+
"type" : "integer",
|
137
|
+
"minimum" : 0
|
138
|
+
},
|
139
|
+
|
140
|
+
"required" : {
|
141
|
+
"type" : "array",
|
142
|
+
"items" : {
|
143
|
+
"type" : "string"
|
144
|
+
}
|
145
|
+
},
|
146
|
+
|
147
|
+
"dependencies" : {
|
148
|
+
"type" : "object",
|
149
|
+
"additionalProperties" : {
|
150
|
+
"type" : ["string", "array", {"$ref" : "#"}],
|
151
|
+
"items" : {
|
152
|
+
"type" : "string"
|
153
|
+
}
|
154
|
+
},
|
155
|
+
"default" : {}
|
156
|
+
},
|
157
|
+
|
158
|
+
"id" : {
|
159
|
+
"type" : "string"
|
160
|
+
},
|
161
|
+
|
162
|
+
"$ref" : {
|
163
|
+
"type" : "string"
|
164
|
+
},
|
165
|
+
|
166
|
+
"$schema" : {
|
167
|
+
"type" : "string"
|
168
|
+
},
|
169
|
+
|
170
|
+
"title" : {
|
171
|
+
"type" : "string"
|
172
|
+
},
|
173
|
+
|
174
|
+
"description" : {
|
175
|
+
"type" : "string"
|
176
|
+
},
|
177
|
+
|
178
|
+
"default" : {
|
179
|
+
"type" : "any"
|
180
|
+
}
|
181
|
+
},
|
182
|
+
|
183
|
+
"dependencies" : {
|
184
|
+
"exclusiveMinimum" : "minimum",
|
185
|
+
"exclusiveMaximum" : "maximum"
|
186
|
+
},
|
187
|
+
|
188
|
+
"default" : {}
|
189
|
+
}
|
data/test/tc_schemas.rb
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
=begin
|
2
|
+
* Description: Test Validation of examples schemas and templates
|
3
|
+
* Author: Josh Bradley, Stan Smith
|
4
|
+
* Date: 2014-05-02
|
5
|
+
* License: Public Domain
|
6
|
+
=end
|
7
|
+
|
8
|
+
require 'minitest/autorun'
|
9
|
+
require 'json'
|
10
|
+
require 'json-schema'
|
11
|
+
require File.join(File.dirname(__FILE__),'..','lib', 'adiwg-mdjson_schemas.rb')
|
12
|
+
|
13
|
+
#json-schema patch
|
14
|
+
require File.join(File.dirname(__FILE__),'..','lib', 'adiwg', 'mdjson_schemas', 'validator.rb')
|
15
|
+
|
16
|
+
class TestExamples < Minitest::Test
|
17
|
+
|
18
|
+
@@dir = File.join(File.dirname(__FILE__),'..','schema/')
|
19
|
+
@@ex = File.join(File.dirname(__FILE__),'..','examples/')
|
20
|
+
@@schema = File.join(File.dirname(__FILE__),'..','schema','schema.json')
|
21
|
+
|
22
|
+
def test_schemas
|
23
|
+
#Validate the schemas themselves
|
24
|
+
#puts "\nValidating schemas, Please wait... \n"
|
25
|
+
schemas = `git ls-files #{@@dir}`.split($/)
|
26
|
+
errors = Array.new
|
27
|
+
|
28
|
+
schemas.each do |schema|
|
29
|
+
error = JSON::Validator.fully_validate(File.join(File.dirname(__FILE__), 'draft-04.json'), schema)
|
30
|
+
errors += error
|
31
|
+
end
|
32
|
+
|
33
|
+
assert(errors.empty?, errors.join("\n"))
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_data_template
|
37
|
+
errors = JSON::Validator.fully_validate(@@schema, @@dir + '../templates/mdJson_template.json', :strict => false)
|
38
|
+
assert(errors.empty?, errors.join("\n"))
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_full_example
|
42
|
+
errors = JSON::Validator.fully_validate(@@schema , @@ex + 'full_example.json')
|
43
|
+
assert(errors.empty?, errors.join("\n"))
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_full_example2
|
47
|
+
errors = JSON::Validator.fully_validate(@@schema , @@ex + 'full_example2.json')
|
48
|
+
assert(errors.empty?, errors.join("\n"))
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_minimum_example
|
52
|
+
errors = JSON::Validator.fully_validate(@@schema , @@ex + 'minimum_example.json')
|
53
|
+
assert(errors.empty?, errors.join("\n"))
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_lcc_example
|
57
|
+
errors = JSON::Validator.fully_validate(@@schema , @@ex + 'lcc_project_example.json')
|
58
|
+
assert(errors.empty?, errors.join("\n"))
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_contact
|
62
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/contact.json', @@ex + 'contact.json')
|
63
|
+
assert(errors.empty?, errors.join("\n"))
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_citation
|
67
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/citation.json', @@ex + 'citation.json', :list => true)
|
68
|
+
assert(errors.empty?, errors.join("\n"))
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_dictionary
|
72
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/dataDictionary.json', @@ex + 'dataDictionary.json', :list => true)
|
73
|
+
assert(errors.empty?, errors.join("\n"))
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_taxonomy
|
77
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/taxonomy.json', @@ex + 'taxonomy.json', :list => true)
|
78
|
+
assert(errors.empty?, errors.join("\n"))
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_usage
|
82
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/usage.json', @@ex + 'usage.json', :list => true)
|
83
|
+
assert(errors.empty?, errors.join("\n"))
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_resolution
|
87
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/resolution.json', @@ex + 'resolution.json', :list => true)
|
88
|
+
assert(errors.empty?, errors.join("\n"))
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_graphicOverview
|
92
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/graphicOverview.json', @@ex + 'graphicOverview.json', :list => true)
|
93
|
+
assert(errors.empty?, errors.join("\n"))
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_resourceInfo
|
97
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/resourceInfo.json', @@ex + 'resourceInfo.json', :list => true)
|
98
|
+
assert(errors.empty?, errors.join("\n"))
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_metadataInfo
|
102
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/metadata.json', @@ex + 'metadataInfo.json', :fragment => "#/properties/metadataInfo", :list => true)
|
103
|
+
assert(errors.empty?, errors.join("\n"))
|
104
|
+
end
|
105
|
+
|
106
|
+
def test_onlineResource
|
107
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/onlineResource.json', @@ex + 'onlineResource.json', :list => true)
|
108
|
+
assert(errors.empty?, errors.join("\n"))
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_resourceConstraint
|
112
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/resourceConstraint.json', @@ex + 'legalConstraints.json', :fragment => "#/definitions/legalConstraint", :list => true)
|
113
|
+
assert(errors.empty?, errors.join("\n"))
|
114
|
+
|
115
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/resourceConstraint.json', @@ex + 'securityConstraints.json', :fragment => "#/definitions/securityConstraint", :list => true)
|
116
|
+
assert(errors.empty?, errors.join("\n"))
|
117
|
+
|
118
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/resourceConstraint.json', ["not for suitable for navigation", "draft version", "not intended for general use"], :fragment => "#/definitions/useLimitation", :list => true)
|
119
|
+
assert(errors.empty?, errors.join("\n"))
|
120
|
+
end
|
121
|
+
|
122
|
+
def test_date
|
123
|
+
errors = JSON::Validator.fully_validate(@@schema, @@ex + 'date.json', :fragment => "#/definitions/date", :list => true)
|
124
|
+
assert(errors.empty?, errors.join("\n"))
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_spatialRef
|
128
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/resourceInfo.json', @@ex + 'spatialRef.json', :fragment => "#/properties/spatialReferenceSystem", :list => false)
|
129
|
+
assert(errors.empty?, errors.join("\n"))
|
130
|
+
end
|
131
|
+
|
132
|
+
def test_contactRef
|
133
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/contact.json', @@ex + 'contactRef.json', :fragment => "#/definitions/contactRef", :list => true)
|
134
|
+
assert(errors.empty?, errors.join("\n"))
|
135
|
+
end
|
136
|
+
|
137
|
+
def test_keywords
|
138
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/keyword.json', @@ex + 'keywords.json', :list => true)
|
139
|
+
assert(errors.empty?, errors.join("\n"))
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_distributor
|
143
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/distributor.json', @@ex + 'distributor.json', :list => true)
|
144
|
+
assert(errors.empty?, errors.join("\n"))
|
145
|
+
|
146
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/distributor.json', @@ex + 'format.json', :fragment => "#/definitions/format", :list => true)
|
147
|
+
assert(errors.empty?, errors.join("\n"))
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_geojson
|
151
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/geojson/geojson.json', @@ex + 'geojson.json', :list => true)
|
152
|
+
assert(errors.empty?, errors.join("\n"))
|
153
|
+
end
|
154
|
+
|
155
|
+
def test_extent_linestring
|
156
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/extent.json', @@ex + 'extent_linestring.json', :list => true)
|
157
|
+
assert(errors.empty?, errors.join("\n"))
|
158
|
+
end
|
159
|
+
|
160
|
+
def test_extent_point
|
161
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/extent.json', @@ex + 'extent_point.json', :list => true)
|
162
|
+
assert(errors.empty?, errors.join("\n"))
|
163
|
+
end
|
164
|
+
|
165
|
+
def test_extent_polygon
|
166
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/extent.json', @@ex + 'extent_polygon.json', :list => true)
|
167
|
+
assert(errors.empty?, errors.join("\n"))
|
168
|
+
end
|
169
|
+
|
170
|
+
def test_extent_temporal
|
171
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/extent.json', @@ex + 'temporalElement.json', :fragment => "#/definitions/temporalElement", :list => true)
|
172
|
+
assert(errors.empty?, errors.join("\n"))
|
173
|
+
end
|
174
|
+
|
175
|
+
def test_extent_vertical
|
176
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/extent.json', @@ex + 'verticalExtent.json', :fragment => "#/definitions/verticalExtent", :list => true)
|
177
|
+
assert(errors.empty?, errors.join("\n"))
|
178
|
+
end
|
179
|
+
|
180
|
+
def test_maintInfo
|
181
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/maintInfo.json', @@ex + 'maintInfo.json', :list => true)
|
182
|
+
errors = errors + JSON::Validator.fully_validate(@@dir + 'schema/maintInfo.json', @@ex + 'resourceMaintenance.json', :list => true)
|
183
|
+
assert(errors.empty?, errors.join("\n"))
|
184
|
+
end
|
185
|
+
|
186
|
+
def test_dataQuality
|
187
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/dataQuality.json', @@ex + 'dataQuality.json', :list => true)
|
188
|
+
assert(errors.empty?, errors.join("\n"))
|
189
|
+
end
|
190
|
+
|
191
|
+
def test_uri
|
192
|
+
errors = JSON::Validator.fully_validate(@@schema, @@ex + 'uri.json', :fragment => "#/definitions/uri", :list => true)
|
193
|
+
assert(errors.empty?, errors.join("\n"))
|
194
|
+
end
|
195
|
+
|
196
|
+
def test_additionalDocumentation
|
197
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/metadata.json', @@ex + 'additionalDocumentation.json', :fragment => "#/properties/additionalDocumentation", :list => false)
|
198
|
+
assert(errors.empty?, errors.join("\n"))
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_associatedResource
|
202
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/metadata.json', @@ex + 'associatedResource.json', :fragment => "#/properties/associatedResource", :list => false)
|
203
|
+
assert(errors.empty?, errors.join("\n"))
|
204
|
+
end
|
205
|
+
|
206
|
+
def test_address
|
207
|
+
errors = JSON::Validator.fully_validate(@@dir + 'schema/contact.json', @@ex + 'address.json', :fragment => "#/definitions/address", :list => true)
|
208
|
+
assert(errors.empty?, errors.join("\n"))
|
209
|
+
end
|
210
|
+
end
|
data/test/tc_utils.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
* Description: Test Utility functions
|
3
|
+
* Author: Josh Bradley
|
4
|
+
* Date: 2014-05-06
|
5
|
+
* License: Public Domain
|
6
|
+
=end
|
7
|
+
|
8
|
+
require 'minitest/autorun'
|
9
|
+
require File.join(File.dirname(__FILE__),'..','lib', 'adiwg-mdjson_schemas.rb')
|
10
|
+
|
11
|
+
class TestUtils < Minitest::Test
|
12
|
+
def test_examples_dir
|
13
|
+
puts ADIWG::MdjsonSchemas::Utils.examples_dir
|
14
|
+
errors = File.exist?(ADIWG::MdjsonSchemas::Utils.examples_dir)
|
15
|
+
assert_equal( true, errors, failure_message = 'Examples directory does not exist.')
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_schema_path
|
19
|
+
errors = File.file?(ADIWG::MdjsonSchemas::Utils.schema_path)
|
20
|
+
assert_equal( true, errors, failure_message = 'File schema.json does not exist.')
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_schema_dir
|
24
|
+
errors = File.exist?(ADIWG::MdjsonSchemas::Utils.schema_dir)
|
25
|
+
assert_equal( true, errors, failure_message = 'Schema directory does not exist.')
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: adiwg-mdjson_schemas
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0rc1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Bradley, Stan Smith
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: json-schema
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.4.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.4.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5'
|
69
|
+
description: JSON schemas for validating according to the the ADIwg project and data
|
70
|
+
metadata standard. The schemas comply with JSON Schema draft version 4.
|
71
|
+
email:
|
72
|
+
- adiwg@adiwg.org
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
|
+
- CREDITS
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- adiwg-json_schemas.gemspec
|
85
|
+
- examples/additionalDocumentation.json
|
86
|
+
- examples/address.json
|
87
|
+
- examples/associatedResource.json
|
88
|
+
- examples/citation.json
|
89
|
+
- examples/contact.json
|
90
|
+
- examples/contactRef.json
|
91
|
+
- examples/dataDictionary.json
|
92
|
+
- examples/dataQuality.json
|
93
|
+
- examples/date.json
|
94
|
+
- examples/distributor.json
|
95
|
+
- examples/extent_linestring.json
|
96
|
+
- examples/extent_point.json
|
97
|
+
- examples/extent_polygon.json
|
98
|
+
- examples/format.json
|
99
|
+
- examples/full_example.json
|
100
|
+
- examples/full_example2.json
|
101
|
+
- examples/geojson.json
|
102
|
+
- examples/graphicOverview.json
|
103
|
+
- examples/hierarchyLevel.json
|
104
|
+
- examples/keywords.json
|
105
|
+
- examples/lcc_project_example.json
|
106
|
+
- examples/legalConstraints.json
|
107
|
+
- examples/maintInfo.json
|
108
|
+
- examples/metadataInfo.json
|
109
|
+
- examples/minimum_example.json
|
110
|
+
- examples/onlineResource.json
|
111
|
+
- examples/resolution.json
|
112
|
+
- examples/resourceInfo.json
|
113
|
+
- examples/resourceMaintenance.json
|
114
|
+
- examples/securityConstraints.json
|
115
|
+
- examples/spatialRef.json
|
116
|
+
- examples/taxonomy.json
|
117
|
+
- examples/temporalElement.json
|
118
|
+
- examples/uri.json
|
119
|
+
- examples/usage.json
|
120
|
+
- examples/verticalExtent.json
|
121
|
+
- lib/adiwg-mdjson_schemas.rb
|
122
|
+
- lib/adiwg/mdjson_schemas.rb
|
123
|
+
- lib/adiwg/mdjson_schemas/utils.rb
|
124
|
+
- lib/adiwg/mdjson_schemas/validator.rb
|
125
|
+
- lib/adiwg/mdjson_schemas/version.rb
|
126
|
+
- schema/schema.json
|
127
|
+
- schema/schema/citation.json
|
128
|
+
- schema/schema/contact.json
|
129
|
+
- schema/schema/dataDictionary.json
|
130
|
+
- schema/schema/dataQuality.json
|
131
|
+
- schema/schema/distributor.json
|
132
|
+
- schema/schema/extent.json
|
133
|
+
- schema/schema/geojson/bbox.json
|
134
|
+
- schema/schema/geojson/crs.json
|
135
|
+
- schema/schema/geojson/geojson.json
|
136
|
+
- schema/schema/geojson/geometry.json
|
137
|
+
- schema/schema/graphicOverview.json
|
138
|
+
- schema/schema/keyword.json
|
139
|
+
- schema/schema/maintInfo.json
|
140
|
+
- schema/schema/metadata.json
|
141
|
+
- schema/schema/onlineResource.json
|
142
|
+
- schema/schema/resolution.json
|
143
|
+
- schema/schema/resourceConstraint.json
|
144
|
+
- schema/schema/resourceInfo.json
|
145
|
+
- schema/schema/taxonomy.json
|
146
|
+
- schema/schema/usage.json
|
147
|
+
- templates/mdJson_template.json
|
148
|
+
- test/draft-04.json
|
149
|
+
- test/tc_schemas.rb
|
150
|
+
- test/tc_utils.rb
|
151
|
+
homepage: https://github.com/adiwg/mdJson-schemas
|
152
|
+
licenses:
|
153
|
+
- UNLICENSE
|
154
|
+
metadata: {}
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: 1.3.1
|
169
|
+
requirements: []
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 2.4.5
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: JSON schemas for the ADIwg metadata standard
|
175
|
+
test_files:
|
176
|
+
- test/draft-04.json
|
177
|
+
- test/tc_schemas.rb
|
178
|
+
- test/tc_utils.rb
|