vedeu 0.6.63 → 0.6.64
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 +4 -4
- data/.yardopts +2 -0
- data/docs/api.md +354 -25
- data/docs/group.md +40 -0
- data/lib/vedeu/borders/caption.rb +3 -3
- data/lib/vedeu/borders/title.rb +3 -3
- data/lib/vedeu/colours/repository.rb +1 -0
- data/lib/vedeu/colours/translator.rb +7 -7
- data/lib/vedeu/geometries/move.rb +1 -1
- data/lib/vedeu/menus/all.rb +0 -1
- data/lib/vedeu/menus/repository.rb +1 -1
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/buffers/empty_test.rb +10 -10
- data/test/lib/vedeu/buffers/terminal_test.rb +6 -0
- data/test/lib/vedeu/geometries/move_test.rb +9 -1
- metadata +1 -4
- data/lib/vedeu/menus/null.rb +0 -25
- data/test/lib/vedeu/menus/null_test.rb +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 998283356866d82e0bd3b67de95edd9fbe89fd5f
|
|
4
|
+
data.tar.gz: 2dd548c709f2b1cda90bc46befe65f666fd28dfd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e53be9215177a8cf0aeeab573ca9f0f2a6ef871480b5bd4a1cc5795af184a7efd2c88c8a2188c12ceb9a04e742f3c54e8ed85c89bc733355bd83dceae478bba8
|
|
7
|
+
data.tar.gz: a4e513ce13024657f52396d7ad249de4f0329e1c9f6b7939bf910b5856ed2f83c9a6a4b88dfc483e2c0ee93463314e57718dff54be5406f61e7bd548eb5953a6
|
data/.yardopts
CHANGED
data/docs/api.md
CHANGED
|
@@ -43,18 +43,6 @@ See {file:docs/configuration.md}
|
|
|
43
43
|
|
|
44
44
|
See {file:docs/events.md}
|
|
45
45
|
|
|
46
|
-
## Borders
|
|
47
|
-
|
|
48
|
-
### Vedeu.border
|
|
49
|
-
|
|
50
|
-
## Geometry
|
|
51
|
-
|
|
52
|
-
### Vedeu.geometry
|
|
53
|
-
|
|
54
|
-
## Groups
|
|
55
|
-
|
|
56
|
-
### Vedeu.group
|
|
57
|
-
|
|
58
46
|
## Input
|
|
59
47
|
|
|
60
48
|
### Vedeu.keypress
|
|
@@ -144,36 +132,377 @@ See {file:docs/events.md}
|
|
|
144
132
|
## Renderers
|
|
145
133
|
|
|
146
134
|
### Vedeu.renderer
|
|
147
|
-
### Vedeu.renderers
|
|
148
135
|
|
|
149
|
-
## Repositories
|
|
150
136
|
|
|
151
|
-
|
|
137
|
+
# API Methods
|
|
138
|
+
|
|
139
|
+
### Vedeu.add_command
|
|
140
|
+
|
|
141
|
+
@todo Add more documentation.
|
|
142
|
+
|
|
143
|
+
### Vedeu.add_keypress
|
|
144
|
+
|
|
145
|
+
@todo Add more documentation.
|
|
146
|
+
|
|
147
|
+
### Vedeu.all_commands
|
|
148
|
+
|
|
149
|
+
@todo Add more documentation.
|
|
150
|
+
|
|
151
|
+
### Vedeu.all_keypresses
|
|
152
|
+
|
|
153
|
+
@todo Add more documentation.
|
|
152
154
|
|
|
153
155
|
### Vedeu.background_colours
|
|
154
|
-
|
|
156
|
+
|
|
157
|
+
Repository method. Access registered background colours.
|
|
158
|
+
|
|
159
|
+
Vedeu.background_colours # => [Vedeu::Colours::Backgrounds]
|
|
160
|
+
|
|
161
|
+
Vedeu.background_colours.all # => [Hash<String => String>]
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
### Vedeu.bind
|
|
165
|
+
|
|
166
|
+
@todo Add more documentation.
|
|
167
|
+
|
|
168
|
+
### Vedeu.bind_alias
|
|
169
|
+
|
|
170
|
+
@todo Add more documentation.
|
|
171
|
+
|
|
172
|
+
### Vedeu.border
|
|
173
|
+
|
|
174
|
+
@todo Add more documentation.
|
|
175
|
+
|
|
155
176
|
### Vedeu.borders
|
|
177
|
+
|
|
178
|
+
Repository method. Access registered borders.
|
|
179
|
+
|
|
180
|
+
Vedeu.borders # [Vedeu::Borders::Repository]
|
|
181
|
+
|
|
182
|
+
Vedeu.borders.all # [Array<Vedeu::Borders::Border>]
|
|
183
|
+
|
|
184
|
+
### Vedeu.bound?
|
|
185
|
+
|
|
186
|
+
@todo Add more documentation.
|
|
187
|
+
|
|
188
|
+
### Vedeu.buffer_update
|
|
189
|
+
|
|
190
|
+
@todo Add more documentation.
|
|
191
|
+
|
|
192
|
+
### Vedeu.buffer_write
|
|
193
|
+
|
|
194
|
+
@todo Add more documentation.
|
|
195
|
+
|
|
156
196
|
### Vedeu.buffers
|
|
197
|
+
|
|
198
|
+
Repository method. Access registered borders.
|
|
199
|
+
|
|
200
|
+
Vedeu.buffers # [Vedeu::Buffers::Repository]
|
|
201
|
+
|
|
202
|
+
Vedeu.buffers.all # [Array<Vedeu::Buffers::Buffer>]
|
|
203
|
+
|
|
204
|
+
### Vedeu.clear
|
|
205
|
+
|
|
206
|
+
@todo Add more documentation.
|
|
207
|
+
|
|
208
|
+
### Vedeu.clear_by_group
|
|
209
|
+
|
|
210
|
+
@todo Add more documentation.
|
|
211
|
+
|
|
212
|
+
### Vedeu.clear_by_name
|
|
213
|
+
|
|
214
|
+
@todo Add more documentation.
|
|
215
|
+
|
|
216
|
+
### Vedeu.clear_content_by_name
|
|
217
|
+
|
|
218
|
+
@todo Add more documentation.
|
|
219
|
+
|
|
220
|
+
### Vedeu.clock_time
|
|
221
|
+
|
|
222
|
+
@todo Add more documentation.
|
|
223
|
+
|
|
224
|
+
### Vedeu.configuration
|
|
225
|
+
|
|
226
|
+
@todo Add more documentation.
|
|
227
|
+
|
|
228
|
+
### Vedeu.configure
|
|
229
|
+
|
|
230
|
+
@todo Add more documentation.
|
|
231
|
+
|
|
232
|
+
### Vedeu.cursor
|
|
233
|
+
|
|
234
|
+
@todo Add more documentation.
|
|
235
|
+
|
|
157
236
|
### Vedeu.cursors
|
|
237
|
+
|
|
238
|
+
Repository method. Access registered cursors.
|
|
239
|
+
|
|
240
|
+
Vedeu.cursors # [Vedeu::Cursors::Repository]
|
|
241
|
+
|
|
242
|
+
Vedeu.cursors.all # [Array<Vedeu::Cursors::Cursor>]
|
|
243
|
+
|
|
244
|
+
### Vedeu.direct_write
|
|
245
|
+
|
|
246
|
+
@todo Add more documentation.
|
|
247
|
+
|
|
248
|
+
### Vedeu.documents
|
|
249
|
+
|
|
250
|
+
@todo Add more documentation.
|
|
251
|
+
|
|
252
|
+
### Vedeu.drb_restart
|
|
253
|
+
|
|
254
|
+
@todo Add more documentation.
|
|
255
|
+
|
|
256
|
+
### Vedeu.drb_start
|
|
257
|
+
|
|
258
|
+
@todo Add more documentation.
|
|
259
|
+
|
|
260
|
+
### Vedeu.drb_status
|
|
261
|
+
|
|
262
|
+
@todo Add more documentation.
|
|
263
|
+
|
|
264
|
+
### Vedeu.drb_stop
|
|
265
|
+
|
|
266
|
+
@todo Add more documentation.
|
|
267
|
+
|
|
158
268
|
### Vedeu.events
|
|
159
|
-
### Vedeu.geometries
|
|
160
|
-
### Vedeu.groups
|
|
161
|
-
### Vedeu.interfaces
|
|
162
|
-
### Vedeu.keymaps
|
|
163
|
-
### Vedeu.menus
|
|
164
269
|
|
|
165
|
-
|
|
270
|
+
Repository method. Access registered events.
|
|
271
|
+
|
|
272
|
+
Vedeu.events # [Vedeu::Events::Repository]
|
|
273
|
+
|
|
274
|
+
Vedeu.events.all # [Array<Vedeu::Events::Collection>]
|
|
275
|
+
|
|
276
|
+
### Vedeu.exit
|
|
277
|
+
|
|
278
|
+
@todo Add more documentation.
|
|
166
279
|
|
|
167
|
-
### Vedeu.cursor
|
|
168
280
|
### Vedeu.focus
|
|
281
|
+
|
|
282
|
+
@todo Add more documentation.
|
|
283
|
+
|
|
169
284
|
### Vedeu.focus_by_name
|
|
170
|
-
|
|
285
|
+
|
|
286
|
+
@todo Add more documentation.
|
|
287
|
+
|
|
171
288
|
### Vedeu.focus_next
|
|
289
|
+
|
|
290
|
+
@todo Add more documentation.
|
|
291
|
+
|
|
172
292
|
### Vedeu.focus_previous
|
|
293
|
+
|
|
294
|
+
@todo Add more documentation.
|
|
295
|
+
|
|
296
|
+
### Vedeu.focussed?
|
|
297
|
+
|
|
298
|
+
@todo Add more documentation.
|
|
299
|
+
|
|
300
|
+
### Vedeu.foreground_colours
|
|
301
|
+
|
|
302
|
+
Show all the registered foreground colours.
|
|
303
|
+
|
|
304
|
+
Vedeu.foreground_colours.all # => [Hash<String => String>]
|
|
305
|
+
|
|
306
|
+
Vedeu.foreground_colours # => [Vedeu::Colours::Foregrounds]
|
|
307
|
+
|
|
308
|
+
### Vedeu.geometries
|
|
309
|
+
|
|
310
|
+
Repository method. Access registered interface/view geometry.
|
|
311
|
+
|
|
312
|
+
Vedeu.geometries # [Vedeu::Geometries::Repository]
|
|
313
|
+
|
|
314
|
+
Vedeu.geometries.all # [Array<Vedeu::Geometries::Geometry>]
|
|
315
|
+
|
|
316
|
+
### Vedeu.geometry
|
|
317
|
+
|
|
318
|
+
@todo Add more documentation.
|
|
319
|
+
|
|
320
|
+
### Vedeu.goto
|
|
321
|
+
|
|
322
|
+
@todo Add more documentation.
|
|
323
|
+
|
|
324
|
+
### Vedeu.group
|
|
325
|
+
|
|
326
|
+
@todo Add more documentation.
|
|
327
|
+
|
|
328
|
+
### Vedeu.groups
|
|
329
|
+
|
|
330
|
+
Repository method. Access registered groups.
|
|
331
|
+
|
|
332
|
+
Vedeu.groups # [Vedeu::Groups::Repository]
|
|
333
|
+
|
|
334
|
+
Vedeu.groups.all # [Array<Vedeu::Groups::Group>]
|
|
335
|
+
|
|
173
336
|
### Vedeu.height
|
|
337
|
+
|
|
338
|
+
@todo Add more documentation.
|
|
339
|
+
|
|
340
|
+
### Vedeu.hide_cursor
|
|
341
|
+
|
|
342
|
+
@todo Add more documentation.
|
|
343
|
+
|
|
344
|
+
### Vedeu.hide_group
|
|
345
|
+
|
|
346
|
+
@todo Add more documentation.
|
|
347
|
+
|
|
348
|
+
### Vedeu.hide_interface
|
|
349
|
+
|
|
350
|
+
@todo Add more documentation.
|
|
351
|
+
|
|
352
|
+
### Vedeu.interface
|
|
353
|
+
|
|
354
|
+
@todo Add more documentation.
|
|
355
|
+
|
|
356
|
+
### Vedeu.interfaces
|
|
357
|
+
|
|
358
|
+
Repository method. Access registered interfaces.
|
|
359
|
+
|
|
360
|
+
Vedeu.interfaces # [Vedeu::Interfaces::Repository]
|
|
361
|
+
|
|
362
|
+
Vedeu.interfaces.all # [Array<Vedeu::Interfaces::Interface>]
|
|
363
|
+
|
|
364
|
+
### Vedeu.keymap
|
|
365
|
+
|
|
366
|
+
@todo Add more documentation.
|
|
367
|
+
|
|
368
|
+
### Vedeu.keymaps
|
|
369
|
+
|
|
370
|
+
Repository method. Access registered keymaps.
|
|
371
|
+
|
|
372
|
+
Vedeu.keymaps # [Vedeu::Input::Repository]
|
|
373
|
+
|
|
374
|
+
Vedeu.keymaps.all # [Array<Vedeu::Input::Keymap>]
|
|
375
|
+
|
|
376
|
+
### Vedeu.keypress
|
|
377
|
+
|
|
378
|
+
@todo Add more documentation.
|
|
379
|
+
|
|
380
|
+
### Vedeu.keys
|
|
381
|
+
|
|
382
|
+
@todo Add more documentation.
|
|
383
|
+
|
|
384
|
+
### Vedeu.last_command
|
|
385
|
+
|
|
386
|
+
@todo Add more documentation.
|
|
387
|
+
|
|
388
|
+
### Vedeu.last_keypress
|
|
389
|
+
|
|
390
|
+
@todo Add more documentation.
|
|
391
|
+
|
|
174
392
|
### Vedeu.log
|
|
175
|
-
|
|
393
|
+
|
|
394
|
+
@todo Add more documentation.
|
|
395
|
+
|
|
176
396
|
### Vedeu.log_stderr
|
|
397
|
+
|
|
398
|
+
@todo Add more documentation.
|
|
399
|
+
|
|
400
|
+
### Vedeu.log_stdout
|
|
401
|
+
|
|
402
|
+
@todo Add more documentation.
|
|
403
|
+
|
|
404
|
+
### Vedeu.menu
|
|
405
|
+
|
|
406
|
+
@todo Add more documentation.
|
|
407
|
+
|
|
408
|
+
### Vedeu.menus
|
|
409
|
+
|
|
410
|
+
Repository method. Access registered menus.
|
|
411
|
+
|
|
412
|
+
Vedeu.menus # [Vedeu::Menus::Repository]
|
|
413
|
+
|
|
414
|
+
Vedeu.menus.all # [Array<Vedeu::Menus::Menu>]
|
|
415
|
+
|
|
416
|
+
### Vedeu.profile
|
|
417
|
+
|
|
418
|
+
@todo Add more documentation.
|
|
419
|
+
|
|
420
|
+
### Vedeu.ready!
|
|
421
|
+
|
|
422
|
+
@todo Add more documentation.
|
|
423
|
+
|
|
424
|
+
### Vedeu.ready?
|
|
425
|
+
|
|
426
|
+
@todo Add more documentation.
|
|
427
|
+
|
|
428
|
+
### Vedeu.refresh
|
|
429
|
+
|
|
430
|
+
@todo Add more documentation.
|
|
431
|
+
|
|
432
|
+
### Vedeu.render
|
|
433
|
+
|
|
434
|
+
@todo Add more documentation.
|
|
435
|
+
|
|
436
|
+
### Vedeu.render_output
|
|
437
|
+
|
|
438
|
+
@todo Add more documentation.
|
|
439
|
+
|
|
440
|
+
### Vedeu.renderer
|
|
441
|
+
|
|
442
|
+
@todo Add more documentation.
|
|
443
|
+
|
|
444
|
+
### Vedeu.renderers
|
|
445
|
+
|
|
446
|
+
Repository method. Access registered renderers.
|
|
447
|
+
|
|
448
|
+
Vedeu.renderers # [Vedeu::Renderers]
|
|
449
|
+
|
|
450
|
+
### Vedeu.renders
|
|
451
|
+
|
|
452
|
+
@todo Add more documentation.
|
|
453
|
+
|
|
454
|
+
### Vedeu.renders
|
|
455
|
+
|
|
456
|
+
@todo Add more documentation.
|
|
457
|
+
|
|
177
458
|
### Vedeu.resize
|
|
459
|
+
|
|
460
|
+
@todo Add more documentation.
|
|
461
|
+
|
|
462
|
+
### Vedeu.show_cursor
|
|
463
|
+
|
|
464
|
+
@todo Add more documentation.
|
|
465
|
+
|
|
466
|
+
### Vedeu.show_group
|
|
467
|
+
|
|
468
|
+
@todo Add more documentation.
|
|
469
|
+
|
|
470
|
+
### Vedeu.show_interface
|
|
471
|
+
|
|
472
|
+
@todo Add more documentation.
|
|
473
|
+
|
|
178
474
|
### Vedeu.timer
|
|
475
|
+
|
|
476
|
+
@todo Add more documentation.
|
|
477
|
+
|
|
478
|
+
### Vedeu.toggle_cursor
|
|
479
|
+
|
|
480
|
+
@todo Add more documentation.
|
|
481
|
+
|
|
482
|
+
### Vedeu.toggle_group
|
|
483
|
+
|
|
484
|
+
@todo Add more documentation.
|
|
485
|
+
|
|
486
|
+
### Vedeu.toggle_interface
|
|
487
|
+
|
|
488
|
+
@todo Add more documentation.
|
|
489
|
+
|
|
490
|
+
### Vedeu.trigger
|
|
491
|
+
|
|
492
|
+
@todo Add more documentation.
|
|
493
|
+
|
|
494
|
+
### Vedeu.unbind
|
|
495
|
+
|
|
496
|
+
@todo Add more documentation.
|
|
497
|
+
|
|
498
|
+
### Vedeu.view
|
|
499
|
+
|
|
500
|
+
@todo Add more documentation.
|
|
501
|
+
|
|
502
|
+
### Vedeu.views
|
|
503
|
+
|
|
504
|
+
@todo Add more documentation.
|
|
505
|
+
|
|
179
506
|
### Vedeu.width
|
|
507
|
+
|
|
508
|
+
@todo Add more documentation.
|
data/docs/group.md
CHANGED
|
@@ -11,3 +11,43 @@ Groups.
|
|
|
11
11
|
multiple groups.
|
|
12
12
|
- They can be visible or invisible, this affects all of the members of
|
|
13
13
|
the group.
|
|
14
|
+
|
|
15
|
+
## API
|
|
16
|
+
|
|
17
|
+
### All groups
|
|
18
|
+
|
|
19
|
+
This repository contains all the registered groups for a client
|
|
20
|
+
application. They can be listed via:
|
|
21
|
+
|
|
22
|
+
Vedeu.groups.all
|
|
23
|
+
|
|
24
|
+
### An individual group
|
|
25
|
+
|
|
26
|
+
You can access an individual group by name:
|
|
27
|
+
|
|
28
|
+
Vedeu.groups.find(:name)
|
|
29
|
+
|
|
30
|
+
# or...
|
|
31
|
+
|
|
32
|
+
Vedeu.groups.by_name(:name)
|
|
33
|
+
|
|
34
|
+
### Hiding a group
|
|
35
|
+
|
|
36
|
+
You can hide a group, and all of its interfaces/views:
|
|
37
|
+
|
|
38
|
+
Vedeu.trigger(:_hide_group_, :name)
|
|
39
|
+
|
|
40
|
+
# or...
|
|
41
|
+
|
|
42
|
+
Vedeu.hide_group(:name)
|
|
43
|
+
|
|
44
|
+
### Showing a group
|
|
45
|
+
|
|
46
|
+
You can show a group, and all of its interfaces/views:
|
|
47
|
+
|
|
48
|
+
Vedeu.trigger(:_show_group_, :name)
|
|
49
|
+
|
|
50
|
+
# or...
|
|
51
|
+
|
|
52
|
+
Vedeu.show_group(:name)
|
|
53
|
+
|
|
@@ -10,10 +10,10 @@ module Vedeu
|
|
|
10
10
|
#
|
|
11
11
|
class Caption < Title
|
|
12
12
|
|
|
13
|
-
# Overwrite the border from
|
|
14
|
-
#
|
|
13
|
+
# Overwrite the border from
|
|
14
|
+
# {Vedeu::Borders::Border#build_horizontal} on the bottom border
|
|
15
|
+
# to include the caption if given.
|
|
15
16
|
#
|
|
16
|
-
# @param [Array<Vedeu::Views::Char>]
|
|
17
17
|
# @return [Array<Vedeu::Views::Char>]
|
|
18
18
|
def render
|
|
19
19
|
return chars if empty?
|
data/lib/vedeu/borders/title.rb
CHANGED
|
@@ -41,10 +41,10 @@ module Vedeu
|
|
|
41
41
|
end
|
|
42
42
|
alias_method :==, :eql?
|
|
43
43
|
|
|
44
|
-
# Overwrite the border from
|
|
45
|
-
#
|
|
44
|
+
# Overwrite the border from
|
|
45
|
+
# {Vedeu::Borders::Border#build_horizontal} on the top border to
|
|
46
|
+
# include the title if given.
|
|
46
47
|
#
|
|
47
|
-
# @param [Array<Vedeu::Views::Char>]
|
|
48
48
|
# @return [Array<Vedeu::Views::Char>]
|
|
49
49
|
def render
|
|
50
50
|
return chars if empty?
|
|
@@ -185,17 +185,17 @@ module Vedeu
|
|
|
185
185
|
#
|
|
186
186
|
# @return [String]
|
|
187
187
|
def rgb
|
|
188
|
-
if
|
|
189
|
-
|
|
190
|
-
retrieve(colour)
|
|
188
|
+
if registered?(colour)
|
|
189
|
+
retrieve(colour)
|
|
191
190
|
|
|
192
|
-
|
|
191
|
+
else
|
|
192
|
+
if Vedeu::Configuration.colour_mode == 16_777_216
|
|
193
193
|
register(colour, format(rgb_prefix, *css_to_rgb))
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
else
|
|
196
|
+
register(colour, numbered)
|
|
196
197
|
|
|
197
|
-
|
|
198
|
-
numbered
|
|
198
|
+
end
|
|
199
199
|
|
|
200
200
|
end
|
|
201
201
|
end
|
data/lib/vedeu/menus/all.rb
CHANGED
data/lib/vedeu/version.rb
CHANGED
|
@@ -15,38 +15,38 @@ module Vedeu
|
|
|
15
15
|
width: width,
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
let(:height) {
|
|
18
|
+
let(:height) { 3 }
|
|
19
19
|
let(:_name) {}
|
|
20
|
-
let(:width) {
|
|
20
|
+
let(:width) { 9 }
|
|
21
21
|
|
|
22
22
|
before do
|
|
23
|
-
Vedeu.stubs(:height).returns(
|
|
24
|
-
Vedeu.stubs(:width).returns(
|
|
23
|
+
Vedeu.stubs(:height).returns(4)
|
|
24
|
+
Vedeu.stubs(:width).returns(12)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
describe '#initialize' do
|
|
28
28
|
it { instance.must_be_instance_of(described) }
|
|
29
29
|
|
|
30
30
|
context 'when the height is given' do
|
|
31
|
-
it { instance.instance_variable_get('@height').must_equal(
|
|
31
|
+
it { instance.instance_variable_get('@height').must_equal(3) }
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
context 'when the height not is given' do
|
|
35
35
|
let(:height) {}
|
|
36
36
|
|
|
37
|
-
it { instance.instance_variable_get('@height').must_equal(
|
|
37
|
+
it { instance.instance_variable_get('@height').must_equal(4) }
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
it { instance.instance_variable_get('@name').must_equal(_name) }
|
|
41
41
|
|
|
42
42
|
context 'when the width is given' do
|
|
43
|
-
it { instance.instance_variable_get('@width').must_equal(
|
|
43
|
+
it { instance.instance_variable_get('@width').must_equal(9) }
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
context 'when the width not is given' do
|
|
47
47
|
let(:width) {}
|
|
48
48
|
|
|
49
|
-
it { instance.instance_variable_get('@width').must_equal(
|
|
49
|
+
it { instance.instance_variable_get('@width').must_equal(12) }
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -63,8 +63,8 @@ module Vedeu
|
|
|
63
63
|
it { subject.first.must_be_instance_of(Array) }
|
|
64
64
|
it { subject.first.first.must_be_instance_of(Vedeu::Models::Cell) }
|
|
65
65
|
|
|
66
|
-
it { subject.size.must_equal(
|
|
67
|
-
it { subject.first.size.must_equal(
|
|
66
|
+
it { subject.size.must_equal(3) }
|
|
67
|
+
it { subject.first.size.must_equal(9) }
|
|
68
68
|
it { subject.first.first.position.must_equal(position) }
|
|
69
69
|
end
|
|
70
70
|
|
|
@@ -22,6 +22,15 @@ module Vedeu
|
|
|
22
22
|
Vedeu::Geometries::Geometry.new(name: _name, x: 2, xn: 8, y: 2, yn: 8)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
before do
|
|
26
|
+
Vedeu.stubs(:trigger).with(:_movement_refresh_, _name)
|
|
27
|
+
Vedeu.stubs(:trigger).with(:_cursor_down_, _name)
|
|
28
|
+
Vedeu.stubs(:trigger).with(:_cursor_left_, _name)
|
|
29
|
+
Vedeu.stubs(:trigger).with(:_cursor_origin_, _name)
|
|
30
|
+
Vedeu.stubs(:trigger).with(:_cursor_right_, _name)
|
|
31
|
+
Vedeu.stubs(:trigger).with(:_cursor_up_, _name)
|
|
32
|
+
end
|
|
33
|
+
|
|
25
34
|
describe '#initialize' do
|
|
26
35
|
it { instance.must_be_instance_of(described) }
|
|
27
36
|
|
|
@@ -61,7 +70,6 @@ module Vedeu
|
|
|
61
70
|
describe '.move' do
|
|
62
71
|
before do
|
|
63
72
|
Vedeu.geometries.stubs(:by_name).with(_name).returns(geometry)
|
|
64
|
-
Vedeu.stubs(:trigger)
|
|
65
73
|
Vedeu.stubs(:height).returns(10)
|
|
66
74
|
Vedeu.stubs(:width).returns(10)
|
|
67
75
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vedeu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.64
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gavin Laking
|
|
@@ -460,7 +460,6 @@ files:
|
|
|
460
460
|
- lib/vedeu/menus/all.rb
|
|
461
461
|
- lib/vedeu/menus/dsl.rb
|
|
462
462
|
- lib/vedeu/menus/menu.rb
|
|
463
|
-
- lib/vedeu/menus/null.rb
|
|
464
463
|
- lib/vedeu/menus/repository.rb
|
|
465
464
|
- lib/vedeu/models/all.rb
|
|
466
465
|
- lib/vedeu/models/cell.rb
|
|
@@ -641,7 +640,6 @@ files:
|
|
|
641
640
|
- test/lib/vedeu/logging/timer_test.rb
|
|
642
641
|
- test/lib/vedeu/menus/dsl_test.rb
|
|
643
642
|
- test/lib/vedeu/menus/menu_test.rb
|
|
644
|
-
- test/lib/vedeu/menus/null_test.rb
|
|
645
643
|
- test/lib/vedeu/menus/repository_test.rb
|
|
646
644
|
- test/lib/vedeu/models/cell_test.rb
|
|
647
645
|
- test/lib/vedeu/models/escape_test.rb
|
|
@@ -854,7 +852,6 @@ test_files:
|
|
|
854
852
|
- test/lib/vedeu/logging/timer_test.rb
|
|
855
853
|
- test/lib/vedeu/menus/dsl_test.rb
|
|
856
854
|
- test/lib/vedeu/menus/menu_test.rb
|
|
857
|
-
- test/lib/vedeu/menus/null_test.rb
|
|
858
855
|
- test/lib/vedeu/menus/repository_test.rb
|
|
859
856
|
- test/lib/vedeu/models/cell_test.rb
|
|
860
857
|
- test/lib/vedeu/models/escape_test.rb
|
data/lib/vedeu/menus/null.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module Vedeu
|
|
2
|
-
|
|
3
|
-
module Menus
|
|
4
|
-
|
|
5
|
-
# Provides a non-existent model to swallow messages.
|
|
6
|
-
#
|
|
7
|
-
# @api private
|
|
8
|
-
#
|
|
9
|
-
class Null < Vedeu::Null::Generic
|
|
10
|
-
|
|
11
|
-
# Returns an instance of the Vedeu::Menus::Null class.
|
|
12
|
-
#
|
|
13
|
-
# @param attributes [Hash<Symbol => void>]
|
|
14
|
-
# @option attributes name [String|Symbol|NilClass]
|
|
15
|
-
# @return [Vedeu::Menus::Null]
|
|
16
|
-
def initialize(attributes = {})
|
|
17
|
-
@attributes = attributes
|
|
18
|
-
@name = @attributes[:name]
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
end # Null
|
|
22
|
-
|
|
23
|
-
end # Menus
|
|
24
|
-
|
|
25
|
-
end # Vedeu
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
require 'test_helper'
|
|
2
|
-
|
|
3
|
-
module Vedeu
|
|
4
|
-
|
|
5
|
-
module Menus
|
|
6
|
-
|
|
7
|
-
describe Null do
|
|
8
|
-
|
|
9
|
-
let(:described) { Vedeu::Menus::Null }
|
|
10
|
-
let(:instance) { described.new(attributes) }
|
|
11
|
-
let(:_name) { 'null_menu' }
|
|
12
|
-
let(:attributes) {
|
|
13
|
-
{
|
|
14
|
-
name: _name
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
describe '#initialize' do
|
|
19
|
-
it { instance.must_be_instance_of(described) }
|
|
20
|
-
it {
|
|
21
|
-
instance.instance_variable_get('@attributes').must_equal(attributes)
|
|
22
|
-
}
|
|
23
|
-
it { instance.instance_variable_get('@name').must_equal(_name) }
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
end # Null
|
|
27
|
-
|
|
28
|
-
end # Menus
|
|
29
|
-
|
|
30
|
-
end # Vedeu
|