vedeu 0.6.29 → 0.6.30
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/Guardfile +6 -5
- data/README.md +50 -4
- data/Rakefile +16 -4
- data/docs/dsl.md +3 -3
- data/lib/vedeu/all.rb +6 -8
- data/lib/vedeu/bindings/all.rb +43 -13
- data/lib/vedeu/borders/border.rb +26 -3
- data/lib/vedeu/borders/refresh.rb +5 -0
- data/lib/vedeu/buffers/refresh.rb +10 -0
- data/lib/vedeu/cursors/cursor.rb +59 -0
- data/lib/vedeu/cursors/refresh.rb +5 -0
- data/lib/vedeu/distributed/server.rb +12 -0
- data/lib/vedeu/distributed/subprocess.rb +7 -2
- data/lib/vedeu/editor/editor.rb +5 -0
- data/lib/vedeu/editor/repository.rb +41 -0
- data/lib/vedeu/geometry/geometry.rb +19 -8
- data/lib/vedeu/geometry/repository.rb +25 -0
- data/lib/vedeu/groups/clear.rb +3 -0
- data/lib/vedeu/groups/group.rb +9 -0
- data/lib/vedeu/groups/refresh.rb +5 -0
- data/lib/vedeu/input/dsl.rb +4 -4
- data/lib/vedeu/input/mapper.rb +3 -0
- data/lib/vedeu/interfaces/all.rb +1 -0
- data/lib/vedeu/interfaces/dsl.rb +1 -1
- data/lib/vedeu/interfaces/interface.rb +12 -0
- data/lib/vedeu/logging/log.rb +3 -0
- data/lib/vedeu/menus/repository.rb +40 -0
- data/lib/vedeu/models/focus.rb +9 -0
- data/lib/vedeu/output/clear/interface.rb +9 -1
- data/lib/vedeu/output/refresh/refresh.rb +3 -0
- data/lib/vedeu/repositories/model.rb +1 -9
- data/lib/vedeu/runtime/application.rb +7 -0
- data/lib/vedeu/runtime/flags.rb +3 -0
- data/lib/vedeu/runtime/launcher.rb +2 -0
- data/lib/vedeu/runtime/router.rb +7 -0
- data/lib/vedeu/terminal/buffer.rb +11 -0
- data/lib/vedeu/terminal/terminal.rb +3 -0
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/bindings/all_test.rb +19 -0
- data/test/lib/vedeu/borders/border_test.rb +0 -4
- data/test/lib/vedeu/borders/refresh_test.rb +4 -0
- data/test/lib/vedeu/buffers/refresh_test.rb +5 -0
- data/test/lib/vedeu/cursors/cursor_test.rb +21 -0
- data/test/lib/vedeu/cursors/refresh_test.rb +4 -0
- data/test/lib/vedeu/distributed/server_test.rb +7 -0
- data/test/lib/vedeu/editor/editor_test.rb +4 -0
- data/test/lib/vedeu/editor/repository_test.rb +12 -0
- data/test/lib/vedeu/events/aliases_test.rb +0 -1
- data/test/lib/vedeu/geometry/geometry_test.rb +0 -3
- data/test/lib/vedeu/geometry/repository_test.rb +13 -0
- data/test/lib/vedeu/groups/clear_test.rb +4 -0
- data/test/lib/vedeu/groups/group_test.rb +6 -0
- data/test/lib/vedeu/groups/refresh_test.rb +4 -0
- data/test/lib/vedeu/input/dsl_test.rb +3 -3
- data/test/lib/vedeu/input/mapper_test.rb +4 -0
- data/test/lib/vedeu/interfaces/interface_test.rb +9 -0
- data/test/lib/vedeu/logging/log_test.rb +4 -0
- data/test/lib/vedeu/menus/repository_test.rb +13 -0
- data/test/lib/vedeu/models/focus_test.rb +6 -0
- data/test/lib/vedeu/output/clear/interface_test.rb +5 -0
- data/test/lib/vedeu/output/refresh/refresh_test.rb +4 -0
- data/test/lib/vedeu/repositories/model_test.rb +0 -15
- data/test/lib/vedeu/runtime/application_test.rb +5 -0
- data/test/lib/vedeu/runtime/flags_test.rb +4 -0
- data/test/lib/vedeu/runtime/router_test.rb +26 -0
- data/test/lib/vedeu/terminal/buffer_test.rb +8 -0
- data/test/lib/vedeu/terminal/terminal_test.rb +4 -0
- data/test/support/examples/material_colours_app.rb +24 -4
- data/test/test_helper.rb +23 -23
- metadata +4 -40
- data/lib/vedeu/bindings/application.rb +0 -41
- data/lib/vedeu/bindings/bindings.rb +0 -46
- data/lib/vedeu/bindings/cursors.rb +0 -101
- data/lib/vedeu/bindings/document.rb +0 -97
- data/lib/vedeu/bindings/drb.rb +0 -78
- data/lib/vedeu/bindings/focus.rb +0 -46
- data/lib/vedeu/bindings/menus.rb +0 -99
- data/lib/vedeu/bindings/movement.rb +0 -51
- data/lib/vedeu/bindings/refresh.rb +0 -74
- data/lib/vedeu/bindings/system.rb +0 -81
- data/lib/vedeu/bindings/view.rb +0 -50
- data/lib/vedeu/bindings/visibility.rb +0 -118
- data/test/lib/vedeu/bindings/application_test.rb +0 -39
- data/test/lib/vedeu/bindings/bindings_test.rb +0 -109
- data/test/lib/vedeu/bindings/cursors_test.rb +0 -24
- data/test/lib/vedeu/bindings/document_test.rb +0 -25
- data/test/lib/vedeu/bindings/drb_test.rb +0 -27
- data/test/lib/vedeu/bindings/focus_test.rb +0 -19
- data/test/lib/vedeu/bindings/menus_test.rb +0 -26
- data/test/lib/vedeu/bindings/movement_test.rb +0 -24
- data/test/lib/vedeu/bindings/refresh_test.rb +0 -22
- data/test/lib/vedeu/bindings/system_test.rb +0 -24
- data/test/lib/vedeu/bindings/view_test.rb +0 -19
- data/test/lib/vedeu/bindings/visibility_test.rb +0 -52
- data/test/support/all_seeds.sh +0 -9
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Vedeu
|
4
|
+
|
5
|
+
module Bindings
|
6
|
+
|
7
|
+
describe 'Bindings' do
|
8
|
+
before do
|
9
|
+
Vedeu.stubs(:log)
|
10
|
+
end
|
11
|
+
|
12
|
+
it { Vedeu.bound?(:_drb_input_).must_equal(true) }
|
13
|
+
it { Vedeu.bound?(:_cleanup_).must_equal(true) }
|
14
|
+
it { Vedeu.bound?(:_command_).must_equal(true) }
|
15
|
+
end
|
16
|
+
|
17
|
+
end # Bindings
|
18
|
+
|
19
|
+
end # Vedeu
|
@@ -2,6 +2,17 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_cursor_down_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_cursor_left_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_cursor_origin_).must_equal(true) }
|
9
|
+
it { Vedeu.bound?(:_cursor_position_).must_equal(true) }
|
10
|
+
it { Vedeu.bound?(:_cursor_reposition_).must_equal(true) }
|
11
|
+
# it { Vedeu.bound?(:_cursor_reset_).must_equal(true) }
|
12
|
+
it { Vedeu.bound?(:_cursor_right_).must_equal(true) }
|
13
|
+
it { Vedeu.bound?(:_cursor_up_).must_equal(true) }
|
14
|
+
end
|
15
|
+
|
5
16
|
module Cursors
|
6
17
|
|
7
18
|
describe Cursor do
|
@@ -402,4 +413,14 @@ module Vedeu
|
|
402
413
|
|
403
414
|
end # Cursors
|
404
415
|
|
416
|
+
describe 'Bindings' do
|
417
|
+
it { Vedeu.bound?(:_hide_cursor_).must_equal(true) }
|
418
|
+
# it { Vedeu.bound?(:_cursor_hide_).must_equal(true) }
|
419
|
+
|
420
|
+
it { Vedeu.bound?(:_show_cursor_).must_equal(true) }
|
421
|
+
# it { Vedeu.bound?(:_cursor_show_).must_equal(true) }
|
422
|
+
|
423
|
+
it { Vedeu.bound?(:_toggle_cursor_).must_equal(true) }
|
424
|
+
end
|
425
|
+
|
405
426
|
end # Vedeu
|
@@ -2,6 +2,13 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_drb_restart_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_drb_start_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_drb_status_).must_equal(true) }
|
9
|
+
it { Vedeu.bound?(:_drb_stop_).must_equal(true) }
|
10
|
+
end
|
11
|
+
|
5
12
|
module Distributed
|
6
13
|
|
7
14
|
describe Server do
|
@@ -2,6 +2,18 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_editor_execute_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_editor_delete_character_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_editor_delete_line_).must_equal(true) }
|
9
|
+
it { Vedeu.bound?(:_editor_down_).must_equal(true) }
|
10
|
+
it { Vedeu.bound?(:_editor_insert_character_).must_equal(true) }
|
11
|
+
it { Vedeu.bound?(:_editor_insert_line_).must_equal(true) }
|
12
|
+
it { Vedeu.bound?(:_editor_left_).must_equal(true) }
|
13
|
+
it { Vedeu.bound?(:_editor_right_).must_equal(true) }
|
14
|
+
it { Vedeu.bound?(:_editor_up_).must_equal(true) }
|
15
|
+
end
|
16
|
+
|
5
17
|
module Editor
|
6
18
|
|
7
19
|
describe Repository do
|
@@ -38,9 +38,6 @@ module Vedeu
|
|
38
38
|
|
39
39
|
describe '#initialize' do
|
40
40
|
it { instance.must_be_instance_of(described) }
|
41
|
-
it {
|
42
|
-
instance.instance_variable_get('@attributes').must_equal(attributes)
|
43
|
-
}
|
44
41
|
it { instance.instance_variable_get('@centred').must_equal(centred) }
|
45
42
|
it { instance.instance_variable_get('@client').must_equal(client) }
|
46
43
|
it { instance.instance_variable_get('@height').must_equal(height) }
|
@@ -2,6 +2,19 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_maximise_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_unmaximise_).must_equal(true) }
|
8
|
+
# it { Vedeu.bound?(:_geometry_down_).must_equal(true) }
|
9
|
+
# it { Vedeu.bound?(:_geometry_left_).must_equal(true) }
|
10
|
+
# it { Vedeu.bound?(:_geometry_right_).must_equal(true) }
|
11
|
+
# it { Vedeu.bound?(:_geometry_up_).must_equal(true) }
|
12
|
+
it { Vedeu.bound?(:_view_down_).must_equal(true) }
|
13
|
+
it { Vedeu.bound?(:_view_left_).must_equal(true) }
|
14
|
+
it { Vedeu.bound?(:_view_right_).must_equal(true) }
|
15
|
+
it { Vedeu.bound?(:_view_up_).must_equal(true) }
|
16
|
+
end
|
17
|
+
|
5
18
|
module Geometry
|
6
19
|
|
7
20
|
describe Repository do
|
@@ -2,6 +2,12 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_hide_group_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_show_group_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_toggle_group_).must_equal(true) }
|
9
|
+
end
|
10
|
+
|
5
11
|
module Groups
|
6
12
|
|
7
13
|
describe Group do
|
@@ -2,11 +2,11 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
module
|
5
|
+
module Input
|
6
6
|
|
7
7
|
describe DSL do
|
8
8
|
|
9
|
-
let(:described) { Vedeu::
|
9
|
+
let(:described) { Vedeu::Input::DSL }
|
10
10
|
let(:instance) { described.new(model) }
|
11
11
|
let(:model) { Vedeu::Input::Keymap.new(name: '_test_') }
|
12
12
|
|
@@ -66,6 +66,6 @@ module Vedeu
|
|
66
66
|
|
67
67
|
end # DSL
|
68
68
|
|
69
|
-
end #
|
69
|
+
end # Input
|
70
70
|
|
71
71
|
end # Vedeu
|
@@ -95,4 +95,13 @@ module Vedeu
|
|
95
95
|
|
96
96
|
end # Interfaces
|
97
97
|
|
98
|
+
describe 'Bindings' do
|
99
|
+
it { Vedeu.bound?(:_hide_interface_).must_equal(true) }
|
100
|
+
it { Vedeu.bound?(:_show_interface_).must_equal(true) }
|
101
|
+
it { Vedeu.bound?(:_toggle_interface_).must_equal(true) }
|
102
|
+
# it { Vedeu.bound?(:_hide_view_).must_equal(true) }
|
103
|
+
# it { Vedeu.bound?(:_show_view_).must_equal(true) }
|
104
|
+
# it { Vedeu.bound?(:_toggle_view_).must_equal(true) }
|
105
|
+
end
|
106
|
+
|
98
107
|
end # Vedeu
|
@@ -2,6 +2,19 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_menu_bottom_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_menu_current_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_menu_deselect_).must_equal(true) }
|
9
|
+
it { Vedeu.bound?(:_menu_items_).must_equal(true) }
|
10
|
+
it { Vedeu.bound?(:_menu_next_).must_equal(true) }
|
11
|
+
it { Vedeu.bound?(:_menu_prev_).must_equal(true) }
|
12
|
+
it { Vedeu.bound?(:_menu_selected_).must_equal(true) }
|
13
|
+
it { Vedeu.bound?(:_menu_select_).must_equal(true) }
|
14
|
+
it { Vedeu.bound?(:_menu_top_).must_equal(true) }
|
15
|
+
it { Vedeu.bound?(:_menu_view_).must_equal(true) }
|
16
|
+
end
|
17
|
+
|
5
18
|
module Menus
|
6
19
|
|
7
20
|
describe Repository do
|
@@ -2,6 +2,12 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_focus_by_name_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_focus_next_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_focus_prev_).must_equal(true) }
|
9
|
+
end
|
10
|
+
|
5
11
|
module Models
|
6
12
|
|
7
13
|
describe Focus do
|
@@ -28,21 +28,6 @@ module Vedeu
|
|
28
28
|
# it { skip }
|
29
29
|
end
|
30
30
|
|
31
|
-
describe '.by_name' do
|
32
|
-
let(:_name) {}
|
33
|
-
|
34
|
-
subject { described.by_name(_name) }
|
35
|
-
|
36
|
-
context 'when the model has no repository set' do
|
37
|
-
it { subject.must_be_instance_of(NilClass) }
|
38
|
-
end
|
39
|
-
|
40
|
-
context 'when the model has a repository set' do
|
41
|
-
# @todo Add more tests.
|
42
|
-
# it { skip }
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
31
|
describe '.child' do
|
47
32
|
let(:klass) {}
|
48
33
|
|
@@ -13,6 +13,11 @@ module Vedeu
|
|
13
13
|
|
14
14
|
end # SomeController
|
15
15
|
|
16
|
+
describe 'Bindings' do
|
17
|
+
it { Vedeu.bound?(:_goto_).must_equal(true) }
|
18
|
+
# it { Vedeu.bound?(:_action_).must_equal(true) }
|
19
|
+
end
|
20
|
+
|
16
21
|
module Runtime
|
17
22
|
|
18
23
|
describe Router do
|
@@ -119,6 +124,27 @@ module Vedeu
|
|
119
124
|
end
|
120
125
|
end
|
121
126
|
|
127
|
+
# describe '.goto!' do
|
128
|
+
# let(:controller) { :some_controller }
|
129
|
+
# let(:action) { :show_basket }
|
130
|
+
# let(:args) {
|
131
|
+
# {
|
132
|
+
# customer_id: 3,
|
133
|
+
# product_id: 16,
|
134
|
+
# }
|
135
|
+
# }
|
136
|
+
|
137
|
+
# before { Vedeu::Runtime::Router.stubs(:goto) }
|
138
|
+
|
139
|
+
# subject { Vedeu.trigger(:_goto_, controller, action, **args) }
|
140
|
+
|
141
|
+
# it {
|
142
|
+
# Vedeu::Runtime::Router.expects(:goto)
|
143
|
+
# .with(:some_controller, :show_basket, args)
|
144
|
+
# subject
|
145
|
+
# }
|
146
|
+
# end
|
147
|
+
|
122
148
|
describe '.goto' do
|
123
149
|
let(:controller) { :some_controller }
|
124
150
|
let(:action) { :some_action }
|
@@ -2,6 +2,12 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
+
describe 'Bindings' do
|
6
|
+
it { Vedeu.bound?(:_clear_).must_equal(true) }
|
7
|
+
it { Vedeu.bound?(:_drb_retrieve_output_).must_equal(true) }
|
8
|
+
it { Vedeu.bound?(:_drb_store_output_).must_equal(true) }
|
9
|
+
end
|
10
|
+
|
5
11
|
module Terminal
|
6
12
|
|
7
13
|
describe Buffer do
|
@@ -86,4 +92,6 @@ module Vedeu
|
|
86
92
|
|
87
93
|
end # Terminal
|
88
94
|
|
95
|
+
|
96
|
+
|
89
97
|
end # Vedeu
|