vedeu 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/README.md +1 -2
- data/Rakefile +5 -5
- data/bin/vedeu +8 -4
- data/docs/api.md +3 -1
- data/docs/events.md +43 -29
- data/docs/getting_started.md +2 -0
- data/examples/cursor_app/cursor_app.rb +85 -0
- data/examples/lines_app/lines_app.rb +60 -0
- data/lib/vedeu.rb +9 -3
- data/lib/vedeu/api/api.rb +28 -7
- data/lib/vedeu/api/composition.rb +2 -0
- data/lib/vedeu/api/helpers.rb +2 -0
- data/lib/vedeu/api/interface.rb +2 -20
- data/lib/vedeu/api/keymap.rb +2 -0
- data/lib/vedeu/api/line.rb +2 -0
- data/lib/vedeu/api/menu.rb +3 -1
- data/lib/vedeu/api/stream.rb +25 -2
- data/lib/vedeu/application.rb +4 -4
- data/lib/vedeu/configuration/api.rb +327 -0
- data/lib/vedeu/configuration/cli.rb +110 -0
- data/lib/vedeu/{configuration.rb → configuration/configuration.rb} +49 -99
- data/lib/vedeu/launcher.rb +0 -1
- data/lib/vedeu/models/attributes/colour_translator.rb +2 -2
- data/lib/vedeu/models/colour.rb +0 -1
- data/lib/vedeu/models/composition.rb +2 -8
- data/lib/vedeu/models/cursor.rb +261 -0
- data/lib/vedeu/models/geometry.rb +11 -19
- data/lib/vedeu/models/interface.rb +2 -12
- data/lib/vedeu/models/keymap.rb +2 -0
- data/lib/vedeu/models/line.rb +2 -0
- data/lib/vedeu/models/stream.rb +2 -0
- data/lib/vedeu/models/style.rb +2 -0
- data/lib/vedeu/output/clear.rb +0 -1
- data/lib/vedeu/output/compositor.rb +0 -1
- data/lib/vedeu/output/refresh.rb +3 -0
- data/lib/vedeu/output/render.rb +12 -6
- data/lib/vedeu/output/view.rb +1 -0
- data/lib/vedeu/repositories/cursors.rb +98 -0
- data/lib/vedeu/repositories/events.rb +0 -1
- data/lib/vedeu/repositories/focus.rb +18 -0
- data/lib/vedeu/repositories/menus.rb +4 -4
- data/lib/vedeu/support/common.rb +2 -1
- data/lib/vedeu/support/event.rb +1 -10
- data/lib/vedeu/support/grid.rb +1 -2
- data/lib/vedeu/{repositories → support}/keymap_validator.rb +5 -4
- data/lib/vedeu/support/log.rb +3 -0
- data/lib/vedeu/support/menu.rb +4 -1
- data/lib/vedeu/support/registrar.rb +2 -1
- data/test/integration/defining_interfaces_test.rb +0 -1
- data/test/integration/views/basic_view_test.rb +741 -739
- data/test/lib/vedeu/api/api_test.rb +14 -3
- data/test/lib/vedeu/api/helpers_test.rb +3 -3
- data/test/lib/vedeu/api/interface_test.rb +17 -70
- data/test/lib/vedeu/api/keymap_test.rb +2 -0
- data/test/lib/vedeu/api/line_test.rb +4 -4
- data/test/lib/vedeu/api/menu_test.rb +6 -5
- data/test/lib/vedeu/api/stream_test.rb +18 -0
- data/test/lib/vedeu/configuration/api_test.rb +248 -0
- data/test/lib/vedeu/configuration/cli_test.rb +88 -0
- data/test/lib/vedeu/configuration/configuration_test.rb +67 -0
- data/test/lib/vedeu/input/input_test.rb +2 -2
- data/test/lib/vedeu/models/attributes/background_test.rb +3 -3
- data/test/lib/vedeu/models/attributes/foreground_test.rb +3 -3
- data/test/lib/vedeu/models/composition_test.rb +0 -222
- data/test/lib/vedeu/models/cursor_test.rb +164 -0
- data/test/lib/vedeu/models/interface_test.rb +0 -11
- data/test/lib/vedeu/output/compositor_test.rb +2 -4
- data/test/lib/vedeu/output/render_test.rb +4 -41
- data/test/lib/vedeu/repositories/cursors_test.rb +13 -0
- data/test/lib/vedeu/repositories/focus_test.rb +14 -4
- data/test/lib/vedeu/repositories/menus_test.rb +36 -29
- data/test/lib/vedeu/{repositories → support}/keymap_validator_test.rb +0 -0
- data/test/lib/vedeu/support/menu_test.rb +3 -3
- data/test/lib/vedeu/support/registrar_test.rb +6 -0
- data/test/lib/vedeu/support/terminal_test.rb +2 -2
- data/test/test_helper.rb +1 -1
- data/vedeu.gemspec +1 -1
- metadata +23 -14
- data/elements.txt +0 -118
- data/lib/vedeu/support/cursor.rb +0 -96
- data/test/lib/vedeu/configuration_test.rb +0 -154
- data/test/lib/vedeu/support/cursor_test.rb +0 -79
- data/test/support/model_test_data.json +0 -437
@@ -1,437 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"test_0001": {
|
3
|
-
"interfaces": {
|
4
|
-
"name": "int1_lin1_str1",
|
5
|
-
"lines": {
|
6
|
-
"streams": {
|
7
|
-
"text": "Some text..."
|
8
|
-
}
|
9
|
-
}
|
10
|
-
}
|
11
|
-
},
|
12
|
-
"test_0002": {
|
13
|
-
"interfaces": {
|
14
|
-
"name": "int1_lin1_str3",
|
15
|
-
"lines": {
|
16
|
-
"streams": [
|
17
|
-
{
|
18
|
-
"text": "Some text..."
|
19
|
-
},
|
20
|
-
{
|
21
|
-
"text": " "
|
22
|
-
},
|
23
|
-
{
|
24
|
-
"text": "more text..."
|
25
|
-
}
|
26
|
-
]
|
27
|
-
}
|
28
|
-
}
|
29
|
-
},
|
30
|
-
"test_0003": {
|
31
|
-
"interfaces": {
|
32
|
-
"name": "int1_lin2_str1",
|
33
|
-
"lines": [
|
34
|
-
{
|
35
|
-
"streams": {
|
36
|
-
"text": "Some text..."
|
37
|
-
}
|
38
|
-
},
|
39
|
-
{
|
40
|
-
"streams": {
|
41
|
-
"text": "Some text..."
|
42
|
-
}
|
43
|
-
}
|
44
|
-
]
|
45
|
-
}
|
46
|
-
},
|
47
|
-
"test_0004": {
|
48
|
-
"interfaces": {
|
49
|
-
"name": "int1_lin2_str3",
|
50
|
-
"lines": [
|
51
|
-
{
|
52
|
-
"streams": [
|
53
|
-
{
|
54
|
-
"text": "Some text..."
|
55
|
-
},
|
56
|
-
{
|
57
|
-
"text": " "
|
58
|
-
},
|
59
|
-
{
|
60
|
-
"text": "more text..."
|
61
|
-
}
|
62
|
-
]
|
63
|
-
},
|
64
|
-
{
|
65
|
-
"streams": [
|
66
|
-
{
|
67
|
-
"text": "Some text..."
|
68
|
-
},
|
69
|
-
{
|
70
|
-
"text": " "
|
71
|
-
},
|
72
|
-
{
|
73
|
-
"text": "more text..."
|
74
|
-
}
|
75
|
-
]
|
76
|
-
}
|
77
|
-
]
|
78
|
-
}
|
79
|
-
},
|
80
|
-
"test_0005": {
|
81
|
-
"interfaces": {
|
82
|
-
"name": "int1_lin2_str3_styles",
|
83
|
-
"lines": [
|
84
|
-
{
|
85
|
-
"streams": [
|
86
|
-
{
|
87
|
-
"text": "Some text...",
|
88
|
-
"colour": {
|
89
|
-
"foreground": "#000000",
|
90
|
-
"background": "#0000ff"
|
91
|
-
},
|
92
|
-
"style": [
|
93
|
-
"normal",
|
94
|
-
"underline"
|
95
|
-
]
|
96
|
-
},
|
97
|
-
{
|
98
|
-
"text": " ",
|
99
|
-
"colour": {
|
100
|
-
"foreground": "#ffff00",
|
101
|
-
"background": "#00ff00"
|
102
|
-
},
|
103
|
-
"style": [
|
104
|
-
"normal"
|
105
|
-
]
|
106
|
-
},
|
107
|
-
{
|
108
|
-
"text": "more text...",
|
109
|
-
"colour": {
|
110
|
-
"foreground": "#ffffff",
|
111
|
-
"background": "#ff00ff"
|
112
|
-
},
|
113
|
-
"style": [
|
114
|
-
"bold",
|
115
|
-
"reverse"
|
116
|
-
]
|
117
|
-
}
|
118
|
-
]
|
119
|
-
}
|
120
|
-
]
|
121
|
-
}
|
122
|
-
},
|
123
|
-
"test_0006": {
|
124
|
-
"interfaces": [
|
125
|
-
{
|
126
|
-
"name": "int2_lin1_str1_1",
|
127
|
-
"lines": {
|
128
|
-
"streams": {
|
129
|
-
"text": "Some text..."
|
130
|
-
}
|
131
|
-
}
|
132
|
-
},
|
133
|
-
{
|
134
|
-
"name": "int2_lin1_str1_2",
|
135
|
-
"lines": {
|
136
|
-
"streams": {
|
137
|
-
"text": "Some text..."
|
138
|
-
}
|
139
|
-
}
|
140
|
-
}
|
141
|
-
]
|
142
|
-
},
|
143
|
-
"test_0007": {
|
144
|
-
"interfaces": [
|
145
|
-
{
|
146
|
-
"name": "int2_lin1_str3_1",
|
147
|
-
"lines": {
|
148
|
-
"streams": [
|
149
|
-
{
|
150
|
-
"text": "Some text..."
|
151
|
-
},
|
152
|
-
{
|
153
|
-
"text": " "
|
154
|
-
},
|
155
|
-
{
|
156
|
-
"text": "more text..."
|
157
|
-
}
|
158
|
-
]
|
159
|
-
}
|
160
|
-
},
|
161
|
-
{
|
162
|
-
"name": "int2_lin1_str3_2",
|
163
|
-
"lines": {
|
164
|
-
"streams": [
|
165
|
-
{
|
166
|
-
"text": "Some text..."
|
167
|
-
},
|
168
|
-
{
|
169
|
-
"text": " "
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"text": "more text..."
|
173
|
-
}
|
174
|
-
]
|
175
|
-
}
|
176
|
-
}
|
177
|
-
]
|
178
|
-
},
|
179
|
-
"test_0008": {
|
180
|
-
"interfaces": [
|
181
|
-
{
|
182
|
-
"name": "int2_lin2_str1_1",
|
183
|
-
"lines": [
|
184
|
-
{
|
185
|
-
"streams": {
|
186
|
-
"text": "Some text..."
|
187
|
-
}
|
188
|
-
},
|
189
|
-
{
|
190
|
-
"streams": {
|
191
|
-
"text": "Some text..."
|
192
|
-
}
|
193
|
-
}
|
194
|
-
]
|
195
|
-
},
|
196
|
-
{
|
197
|
-
"name": "int2_lin2_str1_1",
|
198
|
-
"lines": [
|
199
|
-
{
|
200
|
-
"streams": {
|
201
|
-
"text": "Some text..."
|
202
|
-
}
|
203
|
-
},
|
204
|
-
{
|
205
|
-
"streams": {
|
206
|
-
"text": "Some text..."
|
207
|
-
}
|
208
|
-
}
|
209
|
-
]
|
210
|
-
}
|
211
|
-
]
|
212
|
-
},
|
213
|
-
"test_0009": {
|
214
|
-
"interfaces": [
|
215
|
-
{
|
216
|
-
"name": "int2_lin2_str3_1",
|
217
|
-
"lines": [
|
218
|
-
{
|
219
|
-
"streams": [
|
220
|
-
{
|
221
|
-
"text": "Some text..."
|
222
|
-
},
|
223
|
-
{
|
224
|
-
"text": " "
|
225
|
-
},
|
226
|
-
{
|
227
|
-
"text": "more text..."
|
228
|
-
}
|
229
|
-
]
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"streams": [
|
233
|
-
{
|
234
|
-
"text": "Some text..."
|
235
|
-
},
|
236
|
-
{
|
237
|
-
"text": " "
|
238
|
-
},
|
239
|
-
{
|
240
|
-
"text": "more text..."
|
241
|
-
}
|
242
|
-
]
|
243
|
-
}
|
244
|
-
]
|
245
|
-
},
|
246
|
-
{
|
247
|
-
"name": "int2_lin2_str3_2",
|
248
|
-
"lines": [
|
249
|
-
{
|
250
|
-
"streams": [
|
251
|
-
{
|
252
|
-
"text": "Some text..."
|
253
|
-
},
|
254
|
-
{
|
255
|
-
"text": " "
|
256
|
-
},
|
257
|
-
{
|
258
|
-
"text": "more text..."
|
259
|
-
}
|
260
|
-
]
|
261
|
-
},
|
262
|
-
{
|
263
|
-
"streams": [
|
264
|
-
{
|
265
|
-
"text": "Some text..."
|
266
|
-
},
|
267
|
-
{
|
268
|
-
"text": " "
|
269
|
-
},
|
270
|
-
{
|
271
|
-
"text": "more text..."
|
272
|
-
}
|
273
|
-
]
|
274
|
-
}
|
275
|
-
]
|
276
|
-
}
|
277
|
-
]
|
278
|
-
},
|
279
|
-
"test_0010": {
|
280
|
-
"interfaces": [
|
281
|
-
{
|
282
|
-
"name": "int2_lin2_str3_styles_1",
|
283
|
-
"lines": [
|
284
|
-
{
|
285
|
-
"streams": [
|
286
|
-
{
|
287
|
-
"text": "Some text...",
|
288
|
-
"colour": {
|
289
|
-
"foreground": "#000000",
|
290
|
-
"background": "#0000ff"
|
291
|
-
},
|
292
|
-
"style": [
|
293
|
-
"normal",
|
294
|
-
"underline"
|
295
|
-
]
|
296
|
-
},
|
297
|
-
{
|
298
|
-
"text": " ",
|
299
|
-
"colour": {
|
300
|
-
"foreground": "#ffff00",
|
301
|
-
"background": "#00ff00"
|
302
|
-
},
|
303
|
-
"style": [
|
304
|
-
"normal"
|
305
|
-
]
|
306
|
-
},
|
307
|
-
{
|
308
|
-
"text": "more text...",
|
309
|
-
"colour": {
|
310
|
-
"foreground": "#ffffff",
|
311
|
-
"background": "#ff00ff"
|
312
|
-
},
|
313
|
-
"style": [
|
314
|
-
"bold",
|
315
|
-
"reverse"
|
316
|
-
]
|
317
|
-
}
|
318
|
-
]
|
319
|
-
},
|
320
|
-
{
|
321
|
-
"streams": [
|
322
|
-
{
|
323
|
-
"text": "Some text...",
|
324
|
-
"colour": {
|
325
|
-
"foreground": "#000000",
|
326
|
-
"background": "#0000ff"
|
327
|
-
},
|
328
|
-
"style": [
|
329
|
-
"normal",
|
330
|
-
"underline"
|
331
|
-
]
|
332
|
-
},
|
333
|
-
{
|
334
|
-
"text": " ",
|
335
|
-
"colour": {
|
336
|
-
"foreground": "#ffff00",
|
337
|
-
"background": "#00ff00"
|
338
|
-
},
|
339
|
-
"style": [
|
340
|
-
"normal"
|
341
|
-
]
|
342
|
-
},
|
343
|
-
{
|
344
|
-
"text": "more text...",
|
345
|
-
"colour": {
|
346
|
-
"foreground": "#ffffff",
|
347
|
-
"background": "#ff00ff"
|
348
|
-
},
|
349
|
-
"style": [
|
350
|
-
"bold",
|
351
|
-
"reverse"
|
352
|
-
]
|
353
|
-
}
|
354
|
-
]
|
355
|
-
}
|
356
|
-
]
|
357
|
-
},
|
358
|
-
{
|
359
|
-
"name": "int2_lin2_str3_styles_2",
|
360
|
-
"lines": [
|
361
|
-
{
|
362
|
-
"streams": [
|
363
|
-
{
|
364
|
-
"text": "Some text...",
|
365
|
-
"colour": {
|
366
|
-
"foreground": "#000000",
|
367
|
-
"background": "#0000ff"
|
368
|
-
},
|
369
|
-
"style": [
|
370
|
-
"normal",
|
371
|
-
"underline"
|
372
|
-
]
|
373
|
-
},
|
374
|
-
{
|
375
|
-
"text": " ",
|
376
|
-
"colour": {
|
377
|
-
"foreground": "#ffff00",
|
378
|
-
"background": "#00ff00"
|
379
|
-
},
|
380
|
-
"style": [
|
381
|
-
"normal"
|
382
|
-
]
|
383
|
-
},
|
384
|
-
{
|
385
|
-
"text": "more text...",
|
386
|
-
"colour": {
|
387
|
-
"foreground": "#ffffff",
|
388
|
-
"background": "#ff00ff"
|
389
|
-
},
|
390
|
-
"style": [
|
391
|
-
"bold",
|
392
|
-
"reverse"
|
393
|
-
]
|
394
|
-
}
|
395
|
-
]
|
396
|
-
},
|
397
|
-
{
|
398
|
-
"streams": [
|
399
|
-
{
|
400
|
-
"text": "Some text...",
|
401
|
-
"colour": {
|
402
|
-
"foreground": "#000000",
|
403
|
-
"background": "#0000ff"
|
404
|
-
},
|
405
|
-
"style": [
|
406
|
-
"normal",
|
407
|
-
"underline"
|
408
|
-
]
|
409
|
-
},
|
410
|
-
{
|
411
|
-
"text": " ",
|
412
|
-
"colour": {
|
413
|
-
"foreground": "#ffff00",
|
414
|
-
"background": "#00ff00"
|
415
|
-
},
|
416
|
-
"style": [
|
417
|
-
"normal"
|
418
|
-
]
|
419
|
-
},
|
420
|
-
{
|
421
|
-
"text": "more text...",
|
422
|
-
"colour": {
|
423
|
-
"foreground": "#ffffff",
|
424
|
-
"background": "#ff00ff"
|
425
|
-
},
|
426
|
-
"style": [
|
427
|
-
"bold",
|
428
|
-
"reverse"
|
429
|
-
]
|
430
|
-
}
|
431
|
-
]
|
432
|
-
}
|
433
|
-
]
|
434
|
-
}
|
435
|
-
]
|
436
|
-
}
|
437
|
-
}
|