vedeu 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vedeu.rb +43 -17
  3. data/lib/vedeu/api/api.rb +21 -0
  4. data/lib/vedeu/api/base.rb +7 -15
  5. data/lib/vedeu/api/events.rb +5 -10
  6. data/lib/vedeu/api/grid.rb +0 -2
  7. data/lib/vedeu/api/interface.rb +15 -37
  8. data/lib/vedeu/api/line.rb +0 -3
  9. data/lib/vedeu/{instrumentation.rb → api/log.rb} +2 -5
  10. data/lib/vedeu/api/store.rb +3 -9
  11. data/lib/vedeu/api/stream.rb +0 -2
  12. data/lib/vedeu/api/view.rb +4 -15
  13. data/lib/vedeu/application.rb +1 -5
  14. data/lib/vedeu/configuration.rb +0 -2
  15. data/lib/vedeu/launcher.rb +0 -3
  16. data/lib/vedeu/models/attributes/background.rb +0 -4
  17. data/lib/vedeu/models/attributes/foreground.rb +0 -4
  18. data/lib/vedeu/models/attributes/interface_collection.rb +3 -8
  19. data/lib/vedeu/models/attributes/line_collection.rb +0 -5
  20. data/lib/vedeu/models/attributes/stream_collection.rb +0 -5
  21. data/lib/vedeu/models/colour.rb +0 -5
  22. data/lib/vedeu/models/composition.rb +0 -15
  23. data/lib/vedeu/models/geometry.rb +0 -5
  24. data/lib/vedeu/models/interface.rb +0 -14
  25. data/lib/vedeu/models/line.rb +0 -6
  26. data/lib/vedeu/models/stream.rb +0 -5
  27. data/lib/vedeu/models/style.rb +0 -4
  28. data/lib/vedeu/output/buffers.rb +13 -4
  29. data/lib/vedeu/output/render.rb +1 -4
  30. data/lib/vedeu/output/view.rb +7 -3
  31. data/lib/vedeu/support/input.rb +0 -3
  32. data/lib/vedeu/support/menu.rb +0 -5
  33. data/lib/vedeu/support/terminal.rb +0 -4
  34. data/test/lib/vedeu/api/events_test.rb +0 -1
  35. data/test/lib/vedeu/api/grid_test.rb +0 -2
  36. data/test/lib/vedeu/api/interface_test.rb +0 -1
  37. data/test/lib/vedeu/api/store_test.rb +0 -1
  38. data/test/lib/vedeu/api/view_test.rb +1 -4
  39. data/test/lib/vedeu/configuration_test.rb +0 -1
  40. data/test/lib/vedeu/models/attributes/collection_test.rb +0 -1
  41. data/test/lib/vedeu/models/attributes/interface_collection_test.rb +0 -5
  42. data/test/lib/vedeu/models/attributes/line_collection_test.rb +0 -2
  43. data/test/lib/vedeu/models/attributes/stream_collection_test.rb +0 -2
  44. data/test/lib/vedeu/models/colour_test.rb +0 -1
  45. data/test/lib/vedeu/models/composition_test.rb +14 -34
  46. data/test/lib/vedeu/models/geometry_test.rb +0 -1
  47. data/test/lib/vedeu/models/interface_test.rb +0 -1
  48. data/test/lib/vedeu/models/line_test.rb +0 -1
  49. data/test/lib/vedeu/models/stream_test.rb +0 -1
  50. data/test/lib/vedeu/models/style_test.rb +0 -1
  51. data/test/lib/vedeu/output/buffers_test.rb +0 -2
  52. data/test/lib/vedeu/output/clear_test.rb +0 -3
  53. data/test/lib/vedeu/output/render_test.rb +0 -3
  54. data/test/lib/vedeu/support/esc_test.rb +0 -1
  55. data/test/lib/vedeu/support/input_test.rb +0 -1
  56. data/test/lib/vedeu/support/menu_test.rb +0 -1
  57. data/test/lib/vedeu/support/terminal_test.rb +0 -1
  58. data/test/support/model_test_data.json +437 -0
  59. data/test/test_helper.rb +4 -2
  60. data/vedeu.gemspec +1 -1
  61. metadata +6 -44
  62. data/lib/vedeu/support/wordwrap.rb +0 -88
  63. data/test/lib/vedeu/api/base_test.rb +0 -12
  64. data/test/lib/vedeu/api/line_test.rb +0 -10
  65. data/test/lib/vedeu/api/stream_test.rb +0 -12
  66. data/test/lib/vedeu/application_test.rb +0 -10
  67. data/test/lib/vedeu/launcher_test.rb +0 -7
  68. data/test/lib/vedeu/models/attributes/background_test.rb +0 -8
  69. data/test/lib/vedeu/models/attributes/foreground_test.rb +0 -8
  70. data/test/lib/vedeu/output/view_test.rb +0 -9
  71. data/test/lib/vedeu/support/wordwrap_test.rb +0 -56
  72. data/test/lib/vedeu_test.rb +0 -10
  73. data/test/support/json/int1_lin1_str1.json +0 -10
  74. data/test/support/json/int1_lin1_str3.json +0 -18
  75. data/test/support/json/int1_lin2_str1.json +0 -17
  76. data/test/support/json/int1_lin2_str3.json +0 -33
  77. data/test/support/json/int1_lin2_str3_styles.json +0 -43
  78. data/test/support/json/int2_lin1_str1.json +0 -20
  79. data/test/support/json/int2_lin1_str3.json +0 -36
  80. data/test/support/json/int2_lin2_str1.json +0 -34
  81. data/test/support/json/int2_lin2_str3.json +0 -66
  82. data/test/support/json/int2_lin2_str3_styles.json +0 -158
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/models/geometry'
3
2
 
4
3
  module Vedeu
5
4
  describe Geometry do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/models/interface'
3
2
 
4
3
  module Vedeu
5
4
  describe Interface do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/models/line'
3
2
 
4
3
  module Vedeu
5
4
  describe Line do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/models/stream'
3
2
 
4
3
  module Vedeu
5
4
  describe Stream do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/models/style'
3
2
 
4
3
  module Vedeu
5
4
  class TestStyle
@@ -1,7 +1,5 @@
1
1
  require 'test_helper'
2
2
 
3
- require 'vedeu/output/buffers'
4
-
5
3
  module Vedeu
6
4
  describe Buffers do
7
5
  describe '.create' do
@@ -1,7 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/output/clear'
3
- require 'vedeu/models/interface'
4
- require 'vedeu/api/store'
5
2
 
6
3
  module Vedeu
7
4
  describe Clear do
@@ -1,7 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/output/render'
3
- require 'vedeu/models/interface'
4
- require 'vedeu/api/store'
5
2
 
6
3
  module Vedeu
7
4
  describe Render do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/support/esc'
3
2
 
4
3
  module Vedeu
5
4
  describe Esc do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/support/input'
3
2
 
4
3
  module Vedeu
5
4
  describe Input do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/support/menu'
3
2
 
4
3
  module Vedeu
5
4
  describe Menu do
@@ -1,5 +1,4 @@
1
1
  require 'test_helper'
2
- require 'vedeu/support/terminal'
3
2
 
4
3
  module Vedeu
5
4
  describe Terminal do
@@ -0,0 +1,437 @@
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
+ }