vedeu 0.4.43 → 0.4.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/bin/vedeu +19 -0
  4. data/lib/vedeu.rb +0 -34
  5. data/lib/vedeu/all.rb +4 -1
  6. data/lib/vedeu/application/application_view.rb +9 -9
  7. data/lib/vedeu/application/controller.rb +6 -5
  8. data/lib/vedeu/application/helper.rb +3 -16
  9. data/lib/vedeu/application/view.rb +3 -16
  10. data/lib/vedeu/bindings/all.rb +5 -0
  11. data/lib/vedeu/bindings/bindings.rb +115 -0
  12. data/lib/vedeu/bindings/drb.rb +45 -0
  13. data/lib/vedeu/bindings/menus.rb +53 -0
  14. data/lib/vedeu/bindings/movement.rb +76 -0
  15. data/lib/vedeu/bindings/visibility.rb +53 -0
  16. data/lib/vedeu/buffers/buffer.rb +2 -0
  17. data/lib/vedeu/cli/generator/templates/application/app/controllers/name.erb +2 -2
  18. data/lib/vedeu/cli/generator/templates/application/app/helpers/name.erb +2 -0
  19. data/lib/vedeu/cli/generator/templates/application/config/configuration.erb +3 -0
  20. data/lib/vedeu/cli/generator/view.rb +0 -5
  21. data/lib/vedeu/cli/main.rb +12 -0
  22. data/lib/vedeu/cursor/reposition.rb +4 -4
  23. data/lib/vedeu/dsl/interface.rb +0 -27
  24. data/lib/vedeu/exceptions.rb +65 -0
  25. data/lib/vedeu/geometry/geometry.rb +2 -2
  26. data/lib/vedeu/geometry/grid.rb +2 -2
  27. data/lib/vedeu/input/input.rb +34 -28
  28. data/lib/vedeu/null/geometry.rb +2 -2
  29. data/lib/vedeu/output/colour.rb +0 -2
  30. data/lib/vedeu/output/esc.rb +7 -1
  31. data/lib/vedeu/output/render_border.rb +5 -0
  32. data/lib/vedeu/output/renderers/json.rb +7 -2
  33. data/lib/vedeu/support/terminal.rb +1 -1
  34. data/lib/vedeu/version.rb +1 -1
  35. data/test/lib/vedeu/application/controller_test.rb +0 -4
  36. data/test/lib/vedeu/application/helper_test.rb +0 -8
  37. data/test/lib/vedeu/application/view_test.rb +0 -8
  38. data/test/lib/vedeu/bindings/bindings_test.rb +43 -0
  39. data/test/lib/vedeu/bindings/drb_test.rb +23 -0
  40. data/test/lib/vedeu/bindings/menus_test.rb +26 -0
  41. data/test/lib/vedeu/bindings/movement_test.rb +28 -0
  42. data/test/lib/vedeu/bindings/visibility_test.rb +27 -0
  43. data/test/lib/vedeu/buffers/buffer_test.rb +73 -38
  44. data/test/lib/vedeu/cli/main_test.rb +47 -0
  45. data/test/lib/vedeu/dsl/interface_test.rb +4 -7
  46. data/test/lib/vedeu/exceptions_test.rb +5 -0
  47. data/test/lib/vedeu/input/input_test.rb +9 -0
  48. data/test/lib/vedeu/output/esc_test.rb +4 -1
  49. metadata +21 -5
  50. data/lib/vedeu/bindings.rb +0 -275
  51. data/test/lib/vedeu/bindings_test.rb +0 -88
@@ -1,88 +0,0 @@
1
- require 'test_helper'
2
-
3
- module Vedeu
4
-
5
- describe Bindings do
6
-
7
- context 'the system events needed by Vedeu to run are defined' do
8
- it { Vedeu.events.registered?(:_clear_).must_equal(true) }
9
- it { Vedeu.events.registered?(:_clear_group_).must_equal(true) }
10
- it { Vedeu.events.registered?(:_cleanup_).must_equal(true) }
11
- it { Vedeu.events.registered?(:_command_).must_equal(true) }
12
- it { Vedeu.events.registered?(:_exit_).must_equal(true) }
13
- it { Vedeu.events.registered?(:_hide_group_).must_equal(true) }
14
- it { Vedeu.events.registered?(:_initialize_).must_equal(true) }
15
- it { Vedeu.events.registered?(:_keypress_).must_equal(true) }
16
- it { Vedeu.events.registered?(:_log_).must_equal(true) }
17
- it { Vedeu.events.registered?(:_mode_switch_).must_equal(true) }
18
- it { Vedeu.events.registered?(:_refresh_).must_equal(true) }
19
- it { Vedeu.events.registered?(:_refresh_cursor_).must_equal(true) }
20
- it { Vedeu.events.registered?(:_refresh_group_).must_equal(true) }
21
- it { Vedeu.events.registered?(:_resize_).must_equal(true) }
22
- it { Vedeu.events.registered?(:_show_group_).must_equal(true) }
23
- end
24
-
25
- context 'the cursor specific events are defined' do
26
- it { Vedeu.events.registered?(:_cursor_hide_).must_equal(true) }
27
- it { Vedeu.events.registered?(:_cursor_show_).must_equal(true) }
28
- it { Vedeu.events.registered?(:_hide_cursor_).must_equal(true) }
29
- it { Vedeu.events.registered?(:_show_cursor_).must_equal(true) }
30
- it { Vedeu.events.registered?(:_cursor_down_).must_equal(true) }
31
- it { Vedeu.events.registered?(:_cursor_left_).must_equal(true) }
32
- it { Vedeu.events.registered?(:_cursor_right_).must_equal(true) }
33
- it { Vedeu.events.registered?(:_cursor_up_).must_equal(true) }
34
- it { Vedeu.events.registered?(:_cursor_origin_).must_equal(true) }
35
- it { Vedeu.events.registered?(:_cursor_position_).must_equal(true) }
36
- it { Vedeu.events.registered?(:_cursor_reposition_).must_equal(true) }
37
- it { Vedeu.events.registered?(:_cursor_reset_).must_equal(true) }
38
- end
39
-
40
- context 'the geometry specific events are defined' do
41
- it { Vedeu.events.registered?(:_geometry_down_).must_equal(true) }
42
- it { Vedeu.events.registered?(:_geometry_left_).must_equal(true) }
43
- it { Vedeu.events.registered?(:_geometry_right_).must_equal(true) }
44
- it { Vedeu.events.registered?(:_geometry_up_).must_equal(true) }
45
- it { Vedeu.events.registered?(:_maximise_).must_equal(true) }
46
- it { Vedeu.events.registered?(:_unmaximise_).must_equal(true) }
47
- end
48
-
49
- context 'the drb specific events are defined' do
50
- it { Vedeu.events.registered?(:_drb_input_).must_equal(true) }
51
- it { Vedeu.events.registered?(:_drb_retrieve_output_).must_equal(true) }
52
- it { Vedeu.events.registered?(:_drb_store_output_).must_equal(true) }
53
- it { Vedeu.events.registered?(:_drb_restart_).must_equal(true) }
54
- it { Vedeu.events.registered?(:_drb_start_).must_equal(true) }
55
- it { Vedeu.events.registered?(:_drb_status_).must_equal(true) }
56
- it { Vedeu.events.registered?(:_drb_stop_).must_equal(true) }
57
- end
58
-
59
- context 'the focus specific events are defined' do
60
- it { Vedeu.events.registered?(:_focus_by_name_).must_equal(true) }
61
- it { Vedeu.events.registered?(:_focus_next_).must_equal(true) }
62
- it { Vedeu.events.registered?(:_focus_prev_).must_equal(true) }
63
- end
64
-
65
- context 'the menu specific events are defined' do
66
- it { Vedeu.events.registered?(:_menu_bottom_).must_equal(true) }
67
- it { Vedeu.events.registered?(:_menu_current_).must_equal(true) }
68
- it { Vedeu.events.registered?(:_menu_deselect_).must_equal(true) }
69
- it { Vedeu.events.registered?(:_menu_items_).must_equal(true) }
70
- it { Vedeu.events.registered?(:_menu_next_).must_equal(true) }
71
- it { Vedeu.events.registered?(:_menu_prev_).must_equal(true) }
72
- it { Vedeu.events.registered?(:_menu_selected_).must_equal(true) }
73
- it { Vedeu.events.registered?(:_menu_select_).must_equal(true) }
74
- it { Vedeu.events.registered?(:_menu_top_).must_equal(true) }
75
- it { Vedeu.events.registered?(:_menu_view_).must_equal(true) }
76
- end
77
-
78
- context 'the refresh event for all registered interfaces is defined' do
79
- it { Vedeu.events.registered?(:_refresh_).must_equal(true) }
80
- end
81
-
82
- it { Vedeu.events.registered?(:_hide_interface_).must_equal(true) }
83
- it { Vedeu.events.registered?(:_show_interface_).must_equal(true) }
84
- it { Vedeu.events.registered?(:_toggle_interface_).must_equal(true) }
85
-
86
- end # Bindings
87
-
88
- end # Vedeu