mexico 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/.document +5 -0
- data/.gitmodules +3 -0
- data/.project +14 -0
- data/.rspec +2 -0
- data/Gemfile +31 -0
- data/LICENSE.txt +165 -0
- data/README.md +116 -0
- data/Rakefile +66 -0
- data/VERSION +1 -0
- data/assets/TESTCORPUS/Corpus.xml +26 -0
- data/assets/fiesta/b6/layer_connectors.fst +16 -0
- data/assets/fiesta/b6/match_jones_161_CM_neu_checked.parsed.xml +1225 -0
- data/assets/fiesta/elan/ElanFileFormat.eaf +76 -0
- data/assets/fiesta/elan/ElanFileFormat.pfsx +8 -0
- data/assets/fiesta/elan/ElanFileFormatComplexInterLayerLinks.eaf +107 -0
- data/assets/fiesta/elan/reflinks_example.eaf +270 -0
- data/assets/fiesta/elan/test_all_interlayerrelations.fst +43 -0
- data/assets/fiesta/head/head.fst +24 -0
- data/assets/fiesta/praat/mexico.ShortTextGrid +81 -0
- data/assets/fiesta/praat/mexico.TextGrid +104 -0
- data/assets/helpers/collection_ref_handler.rb +29 -0
- data/assets/helpers/id_ref_handler.rb +29 -0
- data/assets/helpers/roxml_attribute_handler.rb +57 -0
- data/assets/out_only/construct_and_write_spec.toe +99 -0
- data/assets/spec.html +554 -0
- data/bin/mexico +5 -0
- data/features/mexico.feature +9 -0
- data/features/step_definitions/mexico_steps.rb +0 -0
- data/features/support/env.rb +15 -0
- data/info/releasenotes/0.0.1.md +5 -0
- data/info/releasenotes/0.0.2.md +5 -0
- data/info/releasenotes/0.0.3.md +5 -0
- data/info/releasenotes/0.0.4.md +5 -0
- data/info/releasenotes/0.0.5.md +8 -0
- data/info/releasenotes/0.0.6.md +3 -0
- data/info/releasenotes/0.0.7.md +4 -0
- data/info/releasenotes/0.0.8.md +9 -0
- data/info/releasenotes/0.0.9.md +7 -0
- data/lib/mexico/cmd.rb +210 -0
- data/lib/mexico/constants.rb +82 -0
- data/lib/mexico/constraints/constraint.rb +85 -0
- data/lib/mexico/constraints/fiesta_constraints.rb +209 -0
- data/lib/mexico/constraints.rb +27 -0
- data/lib/mexico/core/corpus_core.rb +39 -0
- data/lib/mexico/core/design_core.rb +31 -0
- data/lib/mexico/core/media_type.rb +61 -0
- data/lib/mexico/core.rb +36 -0
- data/lib/mexico/fiesta/interfaces/b6_chat_game_interface.rb +222 -0
- data/lib/mexico/fiesta/interfaces/elan_interface.rb +143 -0
- data/lib/mexico/fiesta/interfaces/short_text_grid_interface.rb +99 -0
- data/lib/mexico/fiesta/interfaces/text_grid_interface.rb +103 -0
- data/lib/mexico/fiesta/interfaces.rb +31 -0
- data/lib/mexico/fiesta.rb +27 -0
- data/lib/mexico/file_system/bound_to_corpus.rb +37 -0
- data/lib/mexico/file_system/corpus.rb +207 -0
- data/lib/mexico/file_system/data.rb +96 -0
- data/lib/mexico/file_system/design.rb +75 -0
- data/lib/mexico/file_system/design_component.rb +78 -0
- data/lib/mexico/file_system/entry.rb +59 -0
- data/lib/mexico/file_system/fiesta_document.rb +344 -0
- data/lib/mexico/file_system/fiesta_map.rb +112 -0
- data/lib/mexico/file_system/head.rb +33 -0
- data/lib/mexico/file_system/id_ref.rb +46 -0
- data/lib/mexico/file_system/implicit_item_link.rb +19 -0
- data/lib/mexico/file_system/interval_link.rb +84 -0
- data/lib/mexico/file_system/item.rb +166 -0
- data/lib/mexico/file_system/item_link.rb +98 -0
- data/lib/mexico/file_system/item_links_proxy.rb +13 -0
- data/lib/mexico/file_system/layer.rb +89 -0
- data/lib/mexico/file_system/layer_connector.rb +74 -0
- data/lib/mexico/file_system/layer_link.rb +75 -0
- data/lib/mexico/file_system/local_file.rb +101 -0
- data/lib/mexico/file_system/participant.rb +69 -0
- data/lib/mexico/file_system/participant_role.rb +43 -0
- data/lib/mexico/file_system/point_link.rb +79 -0
- data/lib/mexico/file_system/property.rb +35 -0
- data/lib/mexico/file_system/property_map.rb +37 -0
- data/lib/mexico/file_system/resource.rb +174 -0
- data/lib/mexico/file_system/scale.rb +125 -0
- data/lib/mexico/file_system/section.rb +41 -0
- data/lib/mexico/file_system/static_collection_ref.rb +64 -0
- data/lib/mexico/file_system/template.rb +23 -0
- data/lib/mexico/file_system/trial.rb +87 -0
- data/lib/mexico/file_system/url.rb +65 -0
- data/lib/mexico/file_system.rb +62 -0
- data/lib/mexico/not_yet_implemented_error.rb +28 -0
- data/lib/mexico/util/fancy_container.rb +57 -0
- data/lib/mexico/util.rb +51 -0
- data/lib/mexico.rb +36 -0
- data/spec/constraints/constraints_spec.rb +306 -0
- data/spec/core/media_type_spec.rb +50 -0
- data/spec/fiesta/b6_spec.rb +43 -0
- data/spec/fiesta/elan_spec.rb +43 -0
- data/spec/fiesta/head_spec.rb +54 -0
- data/spec/fiesta/praat_spec.rb +54 -0
- data/spec/fiesta/read_spec.rb +76 -0
- data/spec/file_system_based/better_collection_spec.rb +142 -0
- data/spec/file_system_based/corpus_spec.rb +194 -0
- data/spec/file_system_based/design_spec.rb +100 -0
- data/spec/file_system_based/inter_links_spec.rb +100 -0
- data/spec/file_system_based/item_links_spec.rb +76 -0
- data/spec/file_system_based/rdf_spec.rb +177 -0
- data/spec/file_system_based/resource_spec.rb +111 -0
- data/spec/file_system_based/trial_spec.rb +129 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/toe/construct_and_write_spec.rb +82 -0
- data/spec/toe/construction_spec.rb +110 -0
- data/spec/toe/item_spec.rb +58 -0
- data/spec/toe/layer_spec.rb +63 -0
- data/spec/toe/scale_spec.rb +89 -0
- data/spec/toe/toe_document_spec.rb +39 -0
- data/test/helper.rb +19 -0
- data/test/test_mexico.rb +7 -0
- metadata +357 -0
data/assets/spec.html
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<title>RSpec results</title>
|
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
9
|
+
<meta http-equiv="Expires" content="-1" />
|
|
10
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
|
11
|
+
<style type="text/css">
|
|
12
|
+
body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background: #fff;
|
|
16
|
+
font-size: 80%;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
<script type="text/javascript">
|
|
20
|
+
// <![CDATA[
|
|
21
|
+
|
|
22
|
+
function addClass(element_id, classname) {
|
|
23
|
+
document.getElementById(element_id).className += (" " + classname);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function removeClass(element_id, classname) {
|
|
27
|
+
var elem = document.getElementById(element_id);
|
|
28
|
+
var classlist = elem.className.replace(classname,'');
|
|
29
|
+
elem.className = classlist;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function moveProgressBar(percentDone) {
|
|
33
|
+
document.getElementById("rspec-header").style.width = percentDone +"%";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function makeRed(element_id) {
|
|
37
|
+
removeClass(element_id, 'passed');
|
|
38
|
+
removeClass(element_id, 'not_implemented');
|
|
39
|
+
addClass(element_id,'failed');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function makeYellow(element_id) {
|
|
43
|
+
var elem = document.getElementById(element_id);
|
|
44
|
+
if (elem.className.indexOf("failed") == -1) { // class doesn't includes failed
|
|
45
|
+
if (elem.className.indexOf("not_implemented") == -1) { // class doesn't include not_implemented
|
|
46
|
+
removeClass(element_id, 'passed');
|
|
47
|
+
addClass(element_id,'not_implemented');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function apply_filters() {
|
|
53
|
+
var passed_filter = document.getElementById('passed_checkbox').checked;
|
|
54
|
+
var failed_filter = document.getElementById('failed_checkbox').checked;
|
|
55
|
+
var pending_filter = document.getElementById('pending_checkbox').checked;
|
|
56
|
+
|
|
57
|
+
assign_display_style("example passed", passed_filter);
|
|
58
|
+
assign_display_style("example failed", failed_filter);
|
|
59
|
+
assign_display_style("example not_implemented", pending_filter);
|
|
60
|
+
|
|
61
|
+
assign_display_style_for_group("example_group passed", passed_filter);
|
|
62
|
+
assign_display_style_for_group("example_group not_implemented", pending_filter, pending_filter || passed_filter);
|
|
63
|
+
assign_display_style_for_group("example_group failed", failed_filter, failed_filter || pending_filter || passed_filter);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function get_display_style(display_flag) {
|
|
67
|
+
var style_mode = 'none';
|
|
68
|
+
if (display_flag == true) {
|
|
69
|
+
style_mode = 'block';
|
|
70
|
+
}
|
|
71
|
+
return style_mode;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function assign_display_style(classname, display_flag) {
|
|
75
|
+
var style_mode = get_display_style(display_flag);
|
|
76
|
+
var elems = document.getElementsByClassName(classname)
|
|
77
|
+
for (var i=0; i<elems.length;i++) {
|
|
78
|
+
elems[i].style.display = style_mode;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function assign_display_style_for_group(classname, display_flag, subgroup_flag) {
|
|
83
|
+
var display_style_mode = get_display_style(display_flag);
|
|
84
|
+
var subgroup_style_mode = get_display_style(subgroup_flag);
|
|
85
|
+
var elems = document.getElementsByClassName(classname)
|
|
86
|
+
for (var i=0; i<elems.length;i++) {
|
|
87
|
+
var style_mode = display_style_mode;
|
|
88
|
+
if ((display_flag != subgroup_flag) && (elems[i].getElementsByTagName('dt')[0].innerHTML.indexOf(", ") != -1)) {
|
|
89
|
+
elems[i].style.display = subgroup_style_mode;
|
|
90
|
+
} else {
|
|
91
|
+
elems[i].style.display = display_style_mode;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ]]>
|
|
97
|
+
</script>
|
|
98
|
+
<style type="text/css">
|
|
99
|
+
#rspec-header {
|
|
100
|
+
background: #65C400; color: #fff; height: 4em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.rspec-report h1 {
|
|
104
|
+
margin: 0px 10px 0px 10px;
|
|
105
|
+
padding: 10px;
|
|
106
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
|
107
|
+
font-size: 1.8em;
|
|
108
|
+
position: absolute;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
#label {
|
|
112
|
+
float:left;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
#display-filters {
|
|
116
|
+
float:left;
|
|
117
|
+
padding: 28px 0 0 40%;
|
|
118
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
#summary {
|
|
122
|
+
float:right;
|
|
123
|
+
padding: 5px 10px;
|
|
124
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
|
125
|
+
text-align: right;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#summary p {
|
|
129
|
+
margin: 0 0 0 2px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#summary #totals {
|
|
133
|
+
font-size: 1.2em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.example_group {
|
|
137
|
+
margin: 0 10px 5px;
|
|
138
|
+
background: #fff;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
dl {
|
|
142
|
+
margin: 0; padding: 0 0 5px;
|
|
143
|
+
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
dt {
|
|
147
|
+
padding: 3px;
|
|
148
|
+
background: #65C400;
|
|
149
|
+
color: #fff;
|
|
150
|
+
font-weight: bold;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
dd {
|
|
154
|
+
margin: 5px 0 5px 5px;
|
|
155
|
+
padding: 3px 3px 3px 18px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
dd .duration {
|
|
159
|
+
padding-left: 5px;
|
|
160
|
+
text-align: right;
|
|
161
|
+
right: 0px;
|
|
162
|
+
float:right;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
dd.example.passed {
|
|
166
|
+
border-left: 5px solid #65C400;
|
|
167
|
+
border-bottom: 1px solid #65C400;
|
|
168
|
+
background: #DBFFB4; color: #3D7700;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
dd.example.not_implemented {
|
|
172
|
+
border-left: 5px solid #FAF834;
|
|
173
|
+
border-bottom: 1px solid #FAF834;
|
|
174
|
+
background: #FCFB98; color: #131313;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
dd.example.pending_fixed {
|
|
178
|
+
border-left: 5px solid #0000C2;
|
|
179
|
+
border-bottom: 1px solid #0000C2;
|
|
180
|
+
color: #0000C2; background: #D3FBFF;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
dd.example.failed {
|
|
184
|
+
border-left: 5px solid #C20000;
|
|
185
|
+
border-bottom: 1px solid #C20000;
|
|
186
|
+
color: #C20000; background: #FFFBD3;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
dt.not_implemented {
|
|
191
|
+
color: #000000; background: #FAF834;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
dt.pending_fixed {
|
|
195
|
+
color: #FFFFFF; background: #C40D0D;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
dt.failed {
|
|
199
|
+
color: #FFFFFF; background: #C40D0D;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
#rspec-header.not_implemented {
|
|
204
|
+
color: #000000; background: #FAF834;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
#rspec-header.pending_fixed {
|
|
208
|
+
color: #FFFFFF; background: #C40D0D;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
#rspec-header.failed {
|
|
212
|
+
color: #FFFFFF; background: #C40D0D;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
.backtrace {
|
|
217
|
+
color: #000;
|
|
218
|
+
font-size: 12px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
a {
|
|
222
|
+
color: #BE5C00;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* Ruby code, style similar to vibrant ink */
|
|
226
|
+
.ruby {
|
|
227
|
+
font-size: 12px;
|
|
228
|
+
font-family: monospace;
|
|
229
|
+
color: white;
|
|
230
|
+
background-color: black;
|
|
231
|
+
padding: 0.1em 0 0.2em 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.ruby .keyword { color: #FF6600; }
|
|
235
|
+
.ruby .constant { color: #339999; }
|
|
236
|
+
.ruby .attribute { color: white; }
|
|
237
|
+
.ruby .global { color: white; }
|
|
238
|
+
.ruby .module { color: white; }
|
|
239
|
+
.ruby .class { color: white; }
|
|
240
|
+
.ruby .string { color: #66FF00; }
|
|
241
|
+
.ruby .ident { color: white; }
|
|
242
|
+
.ruby .method { color: #FFCC00; }
|
|
243
|
+
.ruby .number { color: white; }
|
|
244
|
+
.ruby .char { color: white; }
|
|
245
|
+
.ruby .comment { color: #9933CC; }
|
|
246
|
+
.ruby .symbol { color: white; }
|
|
247
|
+
.ruby .regex { color: #44B4CC; }
|
|
248
|
+
.ruby .punct { color: white; }
|
|
249
|
+
.ruby .escape { color: white; }
|
|
250
|
+
.ruby .interp { color: white; }
|
|
251
|
+
.ruby .expr { color: white; }
|
|
252
|
+
|
|
253
|
+
.ruby .offending { background-color: gray; }
|
|
254
|
+
.ruby .linenum {
|
|
255
|
+
width: 75px;
|
|
256
|
+
padding: 0.1em 1em 0.2em 0;
|
|
257
|
+
color: #000000;
|
|
258
|
+
background-color: #FFFBD3;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
</style>
|
|
262
|
+
</head>
|
|
263
|
+
<body>
|
|
264
|
+
<div class="rspec-report">
|
|
265
|
+
|
|
266
|
+
<div id="rspec-header">
|
|
267
|
+
<div id="label">
|
|
268
|
+
<h1>RSpec Code Examples</h1>
|
|
269
|
+
</div>
|
|
270
|
+
|
|
271
|
+
<div id="display-filters">
|
|
272
|
+
<input id="passed_checkbox" name="passed_checkbox" type="checkbox" checked onchange="apply_filters()" value="1"> <label for="passed_checkbox">Passed</label>
|
|
273
|
+
<input id="failed_checkbox" name="failed_checkbox" type="checkbox" checked onchange="apply_filters()" value="2"> <label for="failed_checkbox">Failed</label>
|
|
274
|
+
<input id="pending_checkbox" name="pending_checkbox" type="checkbox" checked onchange="apply_filters()" value="3"> <label for="pending_checkbox">Pending</label>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<div id="summary">
|
|
278
|
+
<p id="totals"> </p>
|
|
279
|
+
<p id="duration"> </p>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
<div class="results">
|
|
285
|
+
<div id="div_group_1" class="example_group passed">
|
|
286
|
+
<dl style="margin-left: 0px;">
|
|
287
|
+
<dt id="example_group_1" class="passed">Mexico::FileSystem::XmlBasedCollection</dt>
|
|
288
|
+
</dl>
|
|
289
|
+
</div>
|
|
290
|
+
<div id="div_group_2" class="example_group passed">
|
|
291
|
+
<dl style="margin-left: 15px;">
|
|
292
|
+
<dt id="example_group_2" class="passed">Collection functionality</dt>
|
|
293
|
+
<script type="text/javascript">moveProgressBar('5.0');</script>
|
|
294
|
+
<dd class="example passed"><span class="passed_spec_name">should respond to the designs collection method</span><span class='duration'>0.00110s</span></dd>
|
|
295
|
+
<script type="text/javascript">moveProgressBar('10.0');</script>
|
|
296
|
+
<dd class="example passed"><span class="passed_spec_name">should return the correct info about emptiness</span><span class='duration'>0.00064s</span></dd>
|
|
297
|
+
<script type="text/javascript">moveProgressBar('15.0');</script>
|
|
298
|
+
<dd class="example passed"><span class="passed_spec_name">should return the correct collection size</span><span class='duration'>0.00025s</span></dd>
|
|
299
|
+
</dl>
|
|
300
|
+
</div>
|
|
301
|
+
<div id="div_group_3" class="example_group passed">
|
|
302
|
+
<dl style="margin-left: 0px;">
|
|
303
|
+
<dt id="example_group_3" class="passed">Mexico::FileSystem::Corpus</dt>
|
|
304
|
+
<script type="text/javascript">moveProgressBar('20.0');</script>
|
|
305
|
+
<dd class="example passed"><span class="passed_spec_name">should be backed up by a directory with an XML file</span><span class='duration'>0.05256s</span></dd>
|
|
306
|
+
<script type="text/javascript">moveProgressBar('25.0');</script>
|
|
307
|
+
<dd class="example passed"><span class="passed_spec_name">should have an identifier</span><span class='duration'>0.06043s</span></dd>
|
|
308
|
+
<script type="text/javascript">moveProgressBar('30.0');</script>
|
|
309
|
+
<dd class="example passed"><span class="passed_spec_name">should have a name</span><span class='duration'>0.03306s</span></dd>
|
|
310
|
+
<script type="text/javascript">moveProgressBar('35.0');</script>
|
|
311
|
+
<dd class="example passed"><span class="passed_spec_name">should have a description</span><span class='duration'>0.07342s</span></dd>
|
|
312
|
+
</dl>
|
|
313
|
+
</div>
|
|
314
|
+
<div id="div_group_4" class="example_group passed">
|
|
315
|
+
<dl style="margin-left: 15px;">
|
|
316
|
+
<dt id="example_group_4" class="passed">Basic structure of the class and its objects</dt>
|
|
317
|
+
<script type="text/javascript">moveProgressBar('40.0');</script>
|
|
318
|
+
<dd class="example passed"><span class="passed_spec_name">should include the CorpusCore module</span><span class='duration'>0.09237s</span></dd>
|
|
319
|
+
<script type="text/javascript">moveProgressBar('45.0');</script>
|
|
320
|
+
<dd class="example passed"><span class="passed_spec_name">should include the XmlBound module</span><span class='duration'>0.07930s</span></dd>
|
|
321
|
+
<script type="text/javascript">moveProgressBar('50.0');</script>
|
|
322
|
+
<dd class="example passed"><span class="passed_spec_name">should extend the FileSystemUtils module</span><span class='duration'>0.07830s</span></dd>
|
|
323
|
+
</dl>
|
|
324
|
+
</div>
|
|
325
|
+
<div id="div_group_5" class="example_group passed">
|
|
326
|
+
<dl style="margin-left: 0px;">
|
|
327
|
+
<dt id="example_group_5" class="passed">Mexico::FileSystem::Design</dt>
|
|
328
|
+
<script type="text/javascript">makeRed('rspec-header');</script>
|
|
329
|
+
<script type="text/javascript">makeRed('div_group_5');</script>
|
|
330
|
+
<script type="text/javascript">makeRed('example_group_5');</script>
|
|
331
|
+
<script type="text/javascript">moveProgressBar('55.0');</script>
|
|
332
|
+
<dd class="example failed">
|
|
333
|
+
<span class="failed_spec_name">should have an identifier</span>
|
|
334
|
+
<span class="duration">0.00025s</span>
|
|
335
|
+
<div class="failure" id="failure_1">
|
|
336
|
+
<div class="message"><pre>undefined method `[]=' for nil:NilClass</pre></div>
|
|
337
|
+
<div class="backtrace"><pre>./lib/mexico/file_system/file_system_utils.rb:76:in `block in xml_bind'
|
|
338
|
+
./spec/file_system_based/design_spec.rb:29:in `block (2 levels) in <top (required)>'</pre></div>
|
|
339
|
+
<pre class="ruby"><code><span class="linenum">74</span>
|
|
340
|
+
<span class="linenum">75</span> #puts "base element: %s" % @base_element
|
|
341
|
+
<span class="offending"><span class="linenum">76</span> @base_element[opts[:attribute]]=new_value</span>
|
|
342
|
+
<span class="linenum">77</span> if opts.has_key?(:autosave) && opts[:autosave]==true
|
|
343
|
+
<span class="linenum">78</span> save_xml
|
|
344
|
+
<span class="linenum">79</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
345
|
+
</div>
|
|
346
|
+
</dd>
|
|
347
|
+
<script type="text/javascript">moveProgressBar('60.0');</script>
|
|
348
|
+
<dd class="example failed">
|
|
349
|
+
<span class="failed_spec_name">should have a name</span>
|
|
350
|
+
<span class="duration">0.00020s</span>
|
|
351
|
+
<div class="failure" id="failure_2">
|
|
352
|
+
<div class="message"><pre>undefined method `[]=' for nil:NilClass</pre></div>
|
|
353
|
+
<div class="backtrace"><pre>./lib/mexico/file_system/file_system_utils.rb:76:in `block in xml_bind'
|
|
354
|
+
./spec/file_system_based/design_spec.rb:29:in `block (2 levels) in <top (required)>'</pre></div>
|
|
355
|
+
<pre class="ruby"><code><span class="linenum">74</span>
|
|
356
|
+
<span class="linenum">75</span> #puts "base element: %s" % @base_element
|
|
357
|
+
<span class="offending"><span class="linenum">76</span> @base_element[opts[:attribute]]=new_value</span>
|
|
358
|
+
<span class="linenum">77</span> if opts.has_key?(:autosave) && opts[:autosave]==true
|
|
359
|
+
<span class="linenum">78</span> save_xml
|
|
360
|
+
<span class="linenum">79</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
361
|
+
</div>
|
|
362
|
+
</dd>
|
|
363
|
+
<script type="text/javascript">moveProgressBar('65.0');</script>
|
|
364
|
+
<dd class="example failed">
|
|
365
|
+
<span class="failed_spec_name">should have a description</span>
|
|
366
|
+
<span class="duration">0.00019s</span>
|
|
367
|
+
<div class="failure" id="failure_3">
|
|
368
|
+
<div class="message"><pre>undefined method `[]=' for nil:NilClass</pre></div>
|
|
369
|
+
<div class="backtrace"><pre>./lib/mexico/file_system/file_system_utils.rb:76:in `block in xml_bind'
|
|
370
|
+
./spec/file_system_based/design_spec.rb:29:in `block (2 levels) in <top (required)>'</pre></div>
|
|
371
|
+
<pre class="ruby"><code><span class="linenum">74</span>
|
|
372
|
+
<span class="linenum">75</span> #puts "base element: %s" % @base_element
|
|
373
|
+
<span class="offending"><span class="linenum">76</span> @base_element[opts[:attribute]]=new_value</span>
|
|
374
|
+
<span class="linenum">77</span> if opts.has_key?(:autosave) && opts[:autosave]==true
|
|
375
|
+
<span class="linenum">78</span> save_xml
|
|
376
|
+
<span class="linenum">79</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
377
|
+
</div>
|
|
378
|
+
</dd>
|
|
379
|
+
</dl>
|
|
380
|
+
</div>
|
|
381
|
+
<div id="div_group_6" class="example_group passed">
|
|
382
|
+
<dl style="margin-left: 15px;">
|
|
383
|
+
<dt id="example_group_6" class="passed">basic structure</dt>
|
|
384
|
+
<script type="text/javascript">makeRed('div_group_6');</script>
|
|
385
|
+
<script type="text/javascript">makeRed('example_group_6');</script>
|
|
386
|
+
<script type="text/javascript">moveProgressBar('70.0');</script>
|
|
387
|
+
<dd class="example failed">
|
|
388
|
+
<span class="failed_spec_name">should include the corresponding core module</span>
|
|
389
|
+
<span class="duration">0.00018s</span>
|
|
390
|
+
<div class="failure" id="failure_4">
|
|
391
|
+
<div class="message"><pre>undefined method `[]=' for nil:NilClass</pre></div>
|
|
392
|
+
<div class="backtrace"><pre>./lib/mexico/file_system/file_system_utils.rb:76:in `block in xml_bind'
|
|
393
|
+
./spec/file_system_based/design_spec.rb:29:in `block (2 levels) in <top (required)>'</pre></div>
|
|
394
|
+
<pre class="ruby"><code><span class="linenum">74</span>
|
|
395
|
+
<span class="linenum">75</span> #puts "base element: %s" % @base_element
|
|
396
|
+
<span class="offending"><span class="linenum">76</span> @base_element[opts[:attribute]]=new_value</span>
|
|
397
|
+
<span class="linenum">77</span> if opts.has_key?(:autosave) && opts[:autosave]==true
|
|
398
|
+
<span class="linenum">78</span> save_xml
|
|
399
|
+
<span class="linenum">79</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
400
|
+
</div>
|
|
401
|
+
</dd>
|
|
402
|
+
</dl>
|
|
403
|
+
</div>
|
|
404
|
+
<div id="div_group_7" class="example_group passed">
|
|
405
|
+
<dl style="margin-left: 0px;">
|
|
406
|
+
<dt id="example_group_7" class="passed">Mexico::FileSystem::XmlBasedCollection</dt>
|
|
407
|
+
</dl>
|
|
408
|
+
</div>
|
|
409
|
+
<div id="div_group_8" class="example_group passed">
|
|
410
|
+
<dl style="margin-left: 15px;">
|
|
411
|
+
<dt id="example_group_8" class="passed">basic structure, emptiness and size</dt>
|
|
412
|
+
<script type="text/javascript">makeRed('div_group_8');</script>
|
|
413
|
+
<script type="text/javascript">makeRed('example_group_8');</script>
|
|
414
|
+
<script type="text/javascript">moveProgressBar('75.0');</script>
|
|
415
|
+
<dd class="example failed">
|
|
416
|
+
<span class="failed_spec_name">should be able to tell its size</span>
|
|
417
|
+
<span class="duration">0.00012s</span>
|
|
418
|
+
<div class="failure" id="failure_5">
|
|
419
|
+
<div class="message"><pre>undefined method `[]=' for #<Mexico::FileSystem::XmlBasedCollection:0x000000021c4c90></pre></div>
|
|
420
|
+
<div class="backtrace"><pre>./spec/file_system_based/xml_based_collection_spec.rb:28:in `block (3 levels) in <top (required)>'
|
|
421
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `each_pair'
|
|
422
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `block (2 levels) in <top (required)>'</pre></div>
|
|
423
|
+
<pre class="ruby"><code><span class="linenum">26</span> @items = { :first => 'a', :second => 'b' }
|
|
424
|
+
<span class="linenum">27</span> @items.each_pair do |k,v|
|
|
425
|
+
<span class="offending"><span class="linenum">28</span> @collection[k] = v</span>
|
|
426
|
+
<span class="linenum">29</span> end
|
|
427
|
+
<span class="linenum">30</span> end
|
|
428
|
+
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
429
|
+
</div>
|
|
430
|
+
</dd>
|
|
431
|
+
<script type="text/javascript">moveProgressBar('80.0');</script>
|
|
432
|
+
<dd class="example failed">
|
|
433
|
+
<span class="failed_spec_name">should be able to tell whether its empty</span>
|
|
434
|
+
<span class="duration">0.00011s</span>
|
|
435
|
+
<div class="failure" id="failure_6">
|
|
436
|
+
<div class="message"><pre>undefined method `[]=' for #<Mexico::FileSystem::XmlBasedCollection:0x000000022cd6a0></pre></div>
|
|
437
|
+
<div class="backtrace"><pre>./spec/file_system_based/xml_based_collection_spec.rb:28:in `block (3 levels) in <top (required)>'
|
|
438
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `each_pair'
|
|
439
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `block (2 levels) in <top (required)>'</pre></div>
|
|
440
|
+
<pre class="ruby"><code><span class="linenum">26</span> @items = { :first => 'a', :second => 'b' }
|
|
441
|
+
<span class="linenum">27</span> @items.each_pair do |k,v|
|
|
442
|
+
<span class="offending"><span class="linenum">28</span> @collection[k] = v</span>
|
|
443
|
+
<span class="linenum">29</span> end
|
|
444
|
+
<span class="linenum">30</span> end
|
|
445
|
+
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
446
|
+
</div>
|
|
447
|
+
</dd>
|
|
448
|
+
</dl>
|
|
449
|
+
</div>
|
|
450
|
+
<div id="div_group_9" class="example_group passed">
|
|
451
|
+
<dl style="margin-left: 15px;">
|
|
452
|
+
<dt id="example_group_9" class="passed">read access contained keys and elements</dt>
|
|
453
|
+
</dl>
|
|
454
|
+
</div>
|
|
455
|
+
<div id="div_group_10" class="example_group passed">
|
|
456
|
+
<dl style="margin-left: 30px;">
|
|
457
|
+
<dt id="example_group_10" class="passed">check for existence of entries</dt>
|
|
458
|
+
<script type="text/javascript">makeRed('div_group_10');</script>
|
|
459
|
+
<script type="text/javascript">makeRed('example_group_10');</script>
|
|
460
|
+
<script type="text/javascript">moveProgressBar('85.0');</script>
|
|
461
|
+
<dd class="example failed">
|
|
462
|
+
<span class="failed_spec_name">should tell whether a certain key is given inside the collection</span>
|
|
463
|
+
<span class="duration">0.00012s</span>
|
|
464
|
+
<div class="failure" id="failure_7">
|
|
465
|
+
<div class="message"><pre>undefined method `[]=' for #<Mexico::FileSystem::XmlBasedCollection:0x000000023067e8></pre></div>
|
|
466
|
+
<div class="backtrace"><pre>./spec/file_system_based/xml_based_collection_spec.rb:28:in `block (3 levels) in <top (required)>'
|
|
467
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `each_pair'
|
|
468
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `block (2 levels) in <top (required)>'</pre></div>
|
|
469
|
+
<pre class="ruby"><code><span class="linenum">26</span> @items = { :first => 'a', :second => 'b' }
|
|
470
|
+
<span class="linenum">27</span> @items.each_pair do |k,v|
|
|
471
|
+
<span class="offending"><span class="linenum">28</span> @collection[k] = v</span>
|
|
472
|
+
<span class="linenum">29</span> end
|
|
473
|
+
<span class="linenum">30</span> end
|
|
474
|
+
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
475
|
+
</div>
|
|
476
|
+
</dd>
|
|
477
|
+
<script type="text/javascript">moveProgressBar('90.0');</script>
|
|
478
|
+
<dd class="example failed">
|
|
479
|
+
<span class="failed_spec_name">should tell whether a certain value object is given inside the collection</span>
|
|
480
|
+
<span class="duration">0.00012s</span>
|
|
481
|
+
<div class="failure" id="failure_8">
|
|
482
|
+
<div class="message"><pre>undefined method `[]=' for #<Mexico::FileSystem::XmlBasedCollection:0x00000002331470></pre></div>
|
|
483
|
+
<div class="backtrace"><pre>./spec/file_system_based/xml_based_collection_spec.rb:28:in `block (3 levels) in <top (required)>'
|
|
484
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `each_pair'
|
|
485
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `block (2 levels) in <top (required)>'</pre></div>
|
|
486
|
+
<pre class="ruby"><code><span class="linenum">26</span> @items = { :first => 'a', :second => 'b' }
|
|
487
|
+
<span class="linenum">27</span> @items.each_pair do |k,v|
|
|
488
|
+
<span class="offending"><span class="linenum">28</span> @collection[k] = v</span>
|
|
489
|
+
<span class="linenum">29</span> end
|
|
490
|
+
<span class="linenum">30</span> end
|
|
491
|
+
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
492
|
+
</div>
|
|
493
|
+
</dd>
|
|
494
|
+
</dl>
|
|
495
|
+
</div>
|
|
496
|
+
<div id="div_group_11" class="example_group passed">
|
|
497
|
+
<dl style="margin-left: 30px;">
|
|
498
|
+
<dt id="example_group_11" class="passed">retrieval of objects by key</dt>
|
|
499
|
+
<script type="text/javascript">makeRed('div_group_11');</script>
|
|
500
|
+
<script type="text/javascript">makeRed('example_group_11');</script>
|
|
501
|
+
<script type="text/javascript">moveProgressBar('95.0');</script>
|
|
502
|
+
<dd class="example failed">
|
|
503
|
+
<span class="failed_spec_name">should retrieve the correct value for a given key</span>
|
|
504
|
+
<span class="duration">0.00012s</span>
|
|
505
|
+
<div class="failure" id="failure_9">
|
|
506
|
+
<div class="message"><pre>undefined method `[]=' for #<Mexico::FileSystem::XmlBasedCollection:0x00000002358c28></pre></div>
|
|
507
|
+
<div class="backtrace"><pre>./spec/file_system_based/xml_based_collection_spec.rb:28:in `block (3 levels) in <top (required)>'
|
|
508
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `each_pair'
|
|
509
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `block (2 levels) in <top (required)>'</pre></div>
|
|
510
|
+
<pre class="ruby"><code><span class="linenum">26</span> @items = { :first => 'a', :second => 'b' }
|
|
511
|
+
<span class="linenum">27</span> @items.each_pair do |k,v|
|
|
512
|
+
<span class="offending"><span class="linenum">28</span> @collection[k] = v</span>
|
|
513
|
+
<span class="linenum">29</span> end
|
|
514
|
+
<span class="linenum">30</span> end
|
|
515
|
+
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
516
|
+
</div>
|
|
517
|
+
</dd>
|
|
518
|
+
</dl>
|
|
519
|
+
</div>
|
|
520
|
+
<div id="div_group_12" class="example_group passed">
|
|
521
|
+
<dl style="margin-left: 15px;">
|
|
522
|
+
<dt id="example_group_12" class="passed">write access: addition, replacement, deletion of elements</dt>
|
|
523
|
+
</dl>
|
|
524
|
+
</div>
|
|
525
|
+
<div id="div_group_13" class="example_group passed">
|
|
526
|
+
<dl style="margin-left: 30px;">
|
|
527
|
+
<dt id="example_group_13" class="passed">addition of new element</dt>
|
|
528
|
+
<script type="text/javascript">makeRed('div_group_13');</script>
|
|
529
|
+
<script type="text/javascript">makeRed('example_group_13');</script>
|
|
530
|
+
<script type="text/javascript">moveProgressBar('100.0');</script>
|
|
531
|
+
<dd class="example failed">
|
|
532
|
+
<span class="failed_spec_name">should add a new element and increase container size</span>
|
|
533
|
+
<span class="duration">0.00012s</span>
|
|
534
|
+
<div class="failure" id="failure_10">
|
|
535
|
+
<div class="message"><pre>undefined method `[]=' for #<Mexico::FileSystem::XmlBasedCollection:0x00000002392798></pre></div>
|
|
536
|
+
<div class="backtrace"><pre>./spec/file_system_based/xml_based_collection_spec.rb:28:in `block (3 levels) in <top (required)>'
|
|
537
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `each_pair'
|
|
538
|
+
./spec/file_system_based/xml_based_collection_spec.rb:27:in `block (2 levels) in <top (required)>'</pre></div>
|
|
539
|
+
<pre class="ruby"><code><span class="linenum">26</span> @items = { :first => 'a', :second => 'b' }
|
|
540
|
+
<span class="linenum">27</span> @items.each_pair do |k,v|
|
|
541
|
+
<span class="offending"><span class="linenum">28</span> @collection[k] = v</span>
|
|
542
|
+
<span class="linenum">29</span> end
|
|
543
|
+
<span class="linenum">30</span> end
|
|
544
|
+
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
|
545
|
+
</div>
|
|
546
|
+
</dd>
|
|
547
|
+
</dl>
|
|
548
|
+
</div>
|
|
549
|
+
<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.48324 seconds</strong>";</script>
|
|
550
|
+
<script type="text/javascript">document.getElementById('totals').innerHTML = "20 examples, 10 failures";</script>
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
</body>
|
|
554
|
+
</html>
|
data/bin/mexico
ADDED
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'bundler'
|
|
2
|
+
begin
|
|
3
|
+
Bundler.setup(:default, :development)
|
|
4
|
+
rescue Bundler::BundlerError => e
|
|
5
|
+
$stderr.puts e.message
|
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
|
7
|
+
exit e.status_code
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
|
11
|
+
require 'mexico'
|
|
12
|
+
|
|
13
|
+
require 'minitest/unit'
|
|
14
|
+
|
|
15
|
+
World(MiniTest::Assertions)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## Release notes for version 0.0.1
|
|
2
|
+
|
|
3
|
+
+ **Create fundamental gem structure**: Created the basic gem structure and initial Gemfile entries for the library.
|
|
4
|
+
+ **Decide upon a license**: Decided to use the LGPL as license.
|
|
5
|
+
+ **Implement basic Nokogiri XML read and write functionality for XML Corpus Engine**: Chose ROXML (based on Nokogiri) for XML (de)serialisation
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## Release notes for version 0.0.2
|
|
2
|
+
|
|
3
|
+
+ **Resource model**: Created first, minimal version of resource model
|
|
4
|
+
+ **Participant Role model**: Created first, minimal model for release notes.
|
|
5
|
+
+ **Media Types**: Created first media types (video, audio, other), along with collection helpers.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## Release notes for version 0.0.3
|
|
2
|
+
|
|
3
|
+
+ **File system integration**: Resource Objects now have first versions of local files and urls.
|
|
4
|
+
+ **ResourceFile model**: Model ResourceFile was rejected and is superseded by LocalFile and URL objects.
|
|
5
|
+
+ **Schema for storage paths**: Relative paths are now resolved based on the corpus home folder.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## Release notes for version 0.0.5
|
|
2
|
+
|
|
3
|
+
+ **Annotation microstructure**: Created code for all subcomponents of this first version of the toe microstructure.
|
|
4
|
+
+ **Atomic data structures**: Selected appropriate classes for the atomic data structures
|
|
5
|
+
+ **Scale sets, scales, points, intervals**: Created model, test data and specs for scales and scale links.
|
|
6
|
+
+ **Events**: Created model, test data and specs for events, which are now called items.
|
|
7
|
+
+ **Layers and layer links**: Created model, test data and specs for layers and layer links (connectors postponed to later version)
|
|
8
|
+
+ **Event links**: Created model, test data and specs for event links
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Release notes for version 0.0.8 – ToE
|
|
2
|
+
|
|
3
|
+
+ **Layer Connectors**: Added LayerConnector model class
|
|
4
|
+
+ **Example files compliant with schema**: Changed example files so they are working with the new schema files
|
|
5
|
+
+ **Add necessity of attributes in corpus schema file**: Improved Mexico schema file by adding information on which attributes are required and which optional
|
|
6
|
+
+ **Refactor file format (FiESTA instead of ToE)**: Changed occurrences of the old name 'toe' into 'fiesta'.
|
|
7
|
+
+ **Added missing or incomplete constructors**: Added constructor methods that were missing
|
|
8
|
+
+ **Create repo for schema **: Added a separate repo for the schema files.
|
|
9
|
+
+ **Basic RDF representations**: Several model files can now be exported to RDF using the POSEIdON gem.
|