vedeu 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/borders.md +1 -5
- data/docs/cursors.md +23 -92
- data/docs/events/application.md +1 -8
- data/docs/events/by_name/cleanup.md +7 -0
- data/docs/events/by_name/clear.md +2 -0
- data/docs/events/by_name/clear_group.md +6 -0
- data/docs/events/by_name/clear_view.md +5 -0
- data/docs/events/by_name/clear_view_content.md +5 -0
- data/docs/events/by_name/command.md +19 -0
- data/docs/events/by_name/cursor_bottom.md +7 -0
- data/docs/events/by_name/cursor_down.md +4 -0
- data/docs/events/by_name/cursor_left.md +6 -0
- data/docs/events/by_name/cursor_origin.md +6 -0
- data/docs/events/by_name/cursor_position.md +10 -0
- data/docs/events/by_name/cursor_reposition.md +4 -0
- data/docs/events/by_name/cursor_right.md +4 -0
- data/docs/events/by_name/cursor_top.md +7 -0
- data/docs/events/by_name/cursor_up.md +6 -0
- data/docs/events/by_name/drb_input.md +7 -0
- data/docs/events/by_name/drb_restart.md +5 -0
- data/docs/events/by_name/drb_retrieve_output.md +2 -0
- data/docs/events/by_name/drb_start.md +5 -0
- data/docs/events/by_name/drb_status.md +5 -0
- data/docs/events/by_name/drb_stop.md +5 -0
- data/docs/events/by_name/drb_store_output.md +2 -0
- data/docs/events/by_name/editor.md +9 -0
- data/docs/events/by_name/editor_delete_character.md +5 -0
- data/docs/events/by_name/editor_delete_line.md +5 -0
- data/docs/events/by_name/editor_down.md +5 -0
- data/docs/events/by_name/editor_execute.md +3 -0
- data/docs/events/by_name/editor_insert_character.md +7 -0
- data/docs/events/by_name/editor_insert_line.md +5 -0
- data/docs/events/by_name/editor_left.md +5 -0
- data/docs/events/by_name/editor_right.md +5 -0
- data/docs/events/by_name/editor_up.md +5 -0
- data/docs/events/by_name/exit.md +6 -0
- data/docs/events/by_name/focus_by_name.md +6 -0
- data/docs/events/by_name/focus_next.md +6 -0
- data/docs/events/by_name/focus_prev.md +6 -0
- data/docs/events/by_name/goto.md +8 -0
- data/docs/events/by_name/hide_cursor.md +10 -0
- data/docs/events/by_name/hide_group.md +5 -0
- data/docs/events/by_name/hide_interface.md +5 -0
- data/docs/events/by_name/initialize.md +6 -0
- data/docs/events/by_name/keypress.md +40 -0
- data/docs/events/by_name/log.md +7 -0
- data/docs/events/by_name/maximise.md +6 -0
- data/docs/events/by_name/menu_bottom.md +4 -0
- data/docs/events/by_name/menu_current.md +4 -0
- data/docs/events/by_name/menu_deselect.md +4 -0
- data/docs/events/by_name/menu_items.md +5 -0
- data/docs/events/by_name/menu_next.md +5 -0
- data/docs/events/by_name/menu_prev.md +5 -0
- data/docs/events/by_name/menu_select.md +4 -0
- data/docs/events/by_name/menu_selected.md +4 -0
- data/docs/events/by_name/menu_top.md +4 -0
- data/docs/events/by_name/menu_view.md +5 -0
- data/docs/events/by_name/mode_switch.md +7 -0
- data/docs/events/by_name/movement_refresh.md +19 -0
- data/docs/events/by_name/refresh.md +9 -0
- data/docs/events/by_name/refresh_border.md +5 -0
- data/docs/events/by_name/refresh_cursor.md +5 -0
- data/docs/events/by_name/refresh_group.md +4 -0
- data/docs/events/by_name/refresh_view.md +4 -0
- data/docs/events/by_name/refresh_view_content.md +4 -0
- data/docs/events/by_name/resize.md +5 -0
- data/docs/events/by_name/show_cursor.md +10 -0
- data/docs/events/by_name/show_group.md +5 -0
- data/docs/events/by_name/show_interface.md +5 -0
- data/docs/events/by_name/toggle_cursor.md +9 -0
- data/docs/events/by_name/toggle_group.md +5 -0
- data/docs/events/by_name/toggle_interface.md +5 -0
- data/docs/events/by_name/unmaximise.md +6 -0
- data/docs/events/document.md +9 -45
- data/docs/events/drb.md +7 -31
- data/docs/events/focus.md +3 -18
- data/docs/events/menu.md +10 -44
- data/docs/events/refresh.md +6 -25
- data/docs/events/system.md +8 -101
- data/docs/events/view.md +4 -36
- data/docs/events/visibility.md +10 -48
- data/lib/vedeu/borders/border.rb +117 -37
- data/lib/vedeu/borders/refresh.rb +29 -113
- data/lib/vedeu/borders/repository.rb +0 -5
- data/lib/vedeu/buffers/buffer.rb +13 -17
- data/lib/vedeu/buffers/refresh.rb +4 -4
- data/lib/vedeu/cursors/refresh.rb +2 -7
- data/lib/vedeu/groups/clear.rb +3 -1
- data/lib/vedeu/groups/refresh.rb +2 -2
- data/lib/vedeu/interfaces/clear.rb +2 -2
- data/lib/vedeu/output/refresh.rb +2 -2
- data/lib/vedeu/repositories/model.rb +2 -6
- data/lib/vedeu/repositories/repository.rb +17 -6
- data/lib/vedeu/runtime/flags.rb +2 -0
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/borders/border_test.rb +128 -12
- data/test/lib/vedeu/cursors/dsl_test.rb +13 -0
- metadata +72 -2
data/lib/vedeu/version.rb
CHANGED
@@ -10,27 +10,39 @@ module Vedeu
|
|
10
10
|
let(:instance) { described.new(attributes) }
|
11
11
|
let(:attributes) {
|
12
12
|
{
|
13
|
-
|
14
|
-
|
13
|
+
bottom_horizontal: bottom_horizontal,
|
14
|
+
bottom_left: bottom_left,
|
15
|
+
bottom_right: bottom_right,
|
15
16
|
caption: '',
|
16
17
|
client: nil,
|
17
18
|
colour: nil,
|
18
19
|
enabled: false,
|
19
20
|
horizontal: 'q',
|
21
|
+
left_vertical: left_vertical,
|
20
22
|
name: _name,
|
21
23
|
parent: nil,
|
22
24
|
repository: Vedeu.borders,
|
25
|
+
right_vertical: right_vertical,
|
23
26
|
show_bottom: true,
|
24
27
|
show_left: true,
|
25
28
|
show_right: true,
|
26
29
|
show_top: true,
|
27
30
|
style: nil,
|
28
31
|
title: '',
|
29
|
-
|
30
|
-
|
32
|
+
top_horizontal: top_horizontal,
|
33
|
+
top_left: top_left,
|
34
|
+
top_right: top_right,
|
31
35
|
vertical: 'x',
|
32
36
|
}
|
33
37
|
}
|
38
|
+
let(:bottom_horizontal) { 'B' }
|
39
|
+
let(:bottom_left) { 'm' }
|
40
|
+
let(:bottom_right) { 'j' }
|
41
|
+
let(:left_vertical) { 'L' }
|
42
|
+
let(:right_vertical) { 'R' }
|
43
|
+
let(:top_horizontal) { 'T' }
|
44
|
+
let(:top_left) { 'l' }
|
45
|
+
let(:top_right) { 'k' }
|
34
46
|
let(:geometry) {}
|
35
47
|
let(:_name) { 'borders' }
|
36
48
|
|
@@ -51,11 +63,8 @@ module Vedeu
|
|
51
63
|
describe 'accessors' do
|
52
64
|
it do
|
53
65
|
instance.must_respond_to(:attributes)
|
54
|
-
instance.must_respond_to(:bottom_horizontal)
|
55
66
|
instance.must_respond_to(:bottom_horizontal=)
|
56
|
-
instance.must_respond_to(:bottom_left)
|
57
67
|
instance.must_respond_to(:bottom_left=)
|
58
|
-
instance.must_respond_to(:bottom_right)
|
59
68
|
instance.must_respond_to(:bottom_right=)
|
60
69
|
instance.must_respond_to(:caption)
|
61
70
|
instance.must_respond_to(:caption=)
|
@@ -75,15 +84,10 @@ module Vedeu
|
|
75
84
|
instance.must_respond_to(:show_top=)
|
76
85
|
instance.must_respond_to(:title)
|
77
86
|
instance.must_respond_to(:title=)
|
78
|
-
instance.must_respond_to(:top_horizontal)
|
79
87
|
instance.must_respond_to(:top_horizontal=)
|
80
|
-
instance.must_respond_to(:top_left)
|
81
88
|
instance.must_respond_to(:top_left=)
|
82
|
-
instance.must_respond_to(:top_right)
|
83
89
|
instance.must_respond_to(:top_right=)
|
84
|
-
instance.must_respond_to(:left_vertical)
|
85
90
|
instance.must_respond_to(:left_vertical=)
|
86
|
-
instance.must_respond_to(:right_vertical)
|
87
91
|
instance.must_respond_to(:right_vertical=)
|
88
92
|
instance.must_respond_to(:vertical)
|
89
93
|
instance.must_respond_to(:vertical=)
|
@@ -102,6 +106,118 @@ module Vedeu
|
|
102
106
|
end
|
103
107
|
end
|
104
108
|
|
109
|
+
describe '#bottom_horizontal' do
|
110
|
+
subject { instance.bottom_horizontal }
|
111
|
+
|
112
|
+
context 'when a custom border is specified' do
|
113
|
+
it { subject.must_equal(bottom_horizontal) }
|
114
|
+
end
|
115
|
+
|
116
|
+
context 'when a custom border is not specified' do
|
117
|
+
let(:bottom_horizontal) {}
|
118
|
+
|
119
|
+
it { subject.must_be_instance_of(Vedeu::Cells::BottomHorizontal) }
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe '#bottom_left' do
|
124
|
+
subject { instance.bottom_left }
|
125
|
+
|
126
|
+
context 'when a custom border is specified' do
|
127
|
+
it { subject.must_equal(bottom_left) }
|
128
|
+
end
|
129
|
+
|
130
|
+
context 'when a custom border is not specified' do
|
131
|
+
let(:bottom_left) {}
|
132
|
+
|
133
|
+
it { subject.must_be_instance_of(Vedeu::Cells::BottomLeft) }
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
describe '#bottom_right' do
|
138
|
+
subject { instance.bottom_right }
|
139
|
+
|
140
|
+
context 'when a custom border is specified' do
|
141
|
+
it { subject.must_equal(bottom_right) }
|
142
|
+
end
|
143
|
+
|
144
|
+
context 'when a custom border is not specified' do
|
145
|
+
let(:bottom_right) {}
|
146
|
+
|
147
|
+
it { subject.must_be_instance_of(Vedeu::Cells::BottomRight) }
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe '#left_vertical' do
|
152
|
+
subject { instance.left_vertical }
|
153
|
+
|
154
|
+
context 'when a custom border is specified' do
|
155
|
+
it { subject.must_equal(left_vertical) }
|
156
|
+
end
|
157
|
+
|
158
|
+
context 'when a custom border is not specified' do
|
159
|
+
let(:left_vertical) {}
|
160
|
+
|
161
|
+
it { subject.must_be_instance_of(Vedeu::Cells::LeftVertical) }
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
describe '#right_vertical' do
|
166
|
+
subject { instance.right_vertical }
|
167
|
+
|
168
|
+
context 'when a custom border is specified' do
|
169
|
+
it { subject.must_equal(right_vertical) }
|
170
|
+
end
|
171
|
+
|
172
|
+
context 'when a custom border is not specified' do
|
173
|
+
let(:right_vertical) {}
|
174
|
+
|
175
|
+
it { subject.must_be_instance_of(Vedeu::Cells::RightVertical) }
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
describe '#top_horizontal' do
|
180
|
+
subject { instance.top_horizontal }
|
181
|
+
|
182
|
+
context 'when a custom border is specified' do
|
183
|
+
it { subject.must_equal(top_horizontal) }
|
184
|
+
end
|
185
|
+
|
186
|
+
context 'when a custom border is not specified' do
|
187
|
+
let(:top_horizontal) {}
|
188
|
+
|
189
|
+
it { subject.must_be_instance_of(Vedeu::Cells::TopHorizontal) }
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
describe '#top_left' do
|
194
|
+
subject { instance.top_left }
|
195
|
+
|
196
|
+
context 'when a custom border is specified' do
|
197
|
+
it { subject.must_equal(top_left) }
|
198
|
+
end
|
199
|
+
|
200
|
+
context 'when a custom border is not specified' do
|
201
|
+
let(:top_left) {}
|
202
|
+
|
203
|
+
it { subject.must_be_instance_of(Vedeu::Cells::TopLeft) }
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
describe '#top_right' do
|
208
|
+
subject { instance.top_right }
|
209
|
+
|
210
|
+
context 'when a custom border is specified' do
|
211
|
+
it { subject.must_equal(top_right) }
|
212
|
+
end
|
213
|
+
|
214
|
+
context 'when a custom border is not specified' do
|
215
|
+
let(:top_right) {}
|
216
|
+
|
217
|
+
it { subject.must_be_instance_of(Vedeu::Cells::TopRight) }
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
105
221
|
describe '#enabled?' do
|
106
222
|
subject { instance.enabled? }
|
107
223
|
|
@@ -4,9 +4,22 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Cursors
|
6
6
|
|
7
|
+
class DSLTestClass
|
8
|
+
|
9
|
+
include Vedeu::Cursors::DSL
|
10
|
+
|
11
|
+
end # DSLTestClass
|
12
|
+
|
7
13
|
describe DSL do
|
8
14
|
|
9
15
|
let(:described) { Vedeu::Cursors::DSL }
|
16
|
+
let(:instance) { Vedeu::Cursors::DSLTestClass.new }
|
17
|
+
|
18
|
+
it { instance.must_respond_to(:cursor) }
|
19
|
+
it { instance.must_respond_to(:cursor!) }
|
20
|
+
it { instance.must_respond_to(:show_cursor!) }
|
21
|
+
it { instance.must_respond_to(:no_cursor!) }
|
22
|
+
it { instance.must_respond_to(:hide_cursor!) }
|
10
23
|
|
11
24
|
# describe '#cursor' do
|
12
25
|
# let(:_value) {}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vedeu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Laking
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -289,6 +289,76 @@ files:
|
|
289
289
|
- docs/dsl.md
|
290
290
|
- docs/events.md
|
291
291
|
- docs/events/application.md
|
292
|
+
- docs/events/by_name/cleanup.md
|
293
|
+
- docs/events/by_name/clear.md
|
294
|
+
- docs/events/by_name/clear_group.md
|
295
|
+
- docs/events/by_name/clear_view.md
|
296
|
+
- docs/events/by_name/clear_view_content.md
|
297
|
+
- docs/events/by_name/command.md
|
298
|
+
- docs/events/by_name/cursor_bottom.md
|
299
|
+
- docs/events/by_name/cursor_down.md
|
300
|
+
- docs/events/by_name/cursor_left.md
|
301
|
+
- docs/events/by_name/cursor_origin.md
|
302
|
+
- docs/events/by_name/cursor_position.md
|
303
|
+
- docs/events/by_name/cursor_reposition.md
|
304
|
+
- docs/events/by_name/cursor_right.md
|
305
|
+
- docs/events/by_name/cursor_top.md
|
306
|
+
- docs/events/by_name/cursor_up.md
|
307
|
+
- docs/events/by_name/drb_input.md
|
308
|
+
- docs/events/by_name/drb_restart.md
|
309
|
+
- docs/events/by_name/drb_retrieve_output.md
|
310
|
+
- docs/events/by_name/drb_start.md
|
311
|
+
- docs/events/by_name/drb_status.md
|
312
|
+
- docs/events/by_name/drb_stop.md
|
313
|
+
- docs/events/by_name/drb_store_output.md
|
314
|
+
- docs/events/by_name/editor.md
|
315
|
+
- docs/events/by_name/editor_delete_character.md
|
316
|
+
- docs/events/by_name/editor_delete_line.md
|
317
|
+
- docs/events/by_name/editor_down.md
|
318
|
+
- docs/events/by_name/editor_execute.md
|
319
|
+
- docs/events/by_name/editor_insert_character.md
|
320
|
+
- docs/events/by_name/editor_insert_line.md
|
321
|
+
- docs/events/by_name/editor_left.md
|
322
|
+
- docs/events/by_name/editor_right.md
|
323
|
+
- docs/events/by_name/editor_up.md
|
324
|
+
- docs/events/by_name/exit.md
|
325
|
+
- docs/events/by_name/focus_by_name.md
|
326
|
+
- docs/events/by_name/focus_next.md
|
327
|
+
- docs/events/by_name/focus_prev.md
|
328
|
+
- docs/events/by_name/goto.md
|
329
|
+
- docs/events/by_name/hide_cursor.md
|
330
|
+
- docs/events/by_name/hide_group.md
|
331
|
+
- docs/events/by_name/hide_interface.md
|
332
|
+
- docs/events/by_name/initialize.md
|
333
|
+
- docs/events/by_name/keypress.md
|
334
|
+
- docs/events/by_name/log.md
|
335
|
+
- docs/events/by_name/maximise.md
|
336
|
+
- docs/events/by_name/menu_bottom.md
|
337
|
+
- docs/events/by_name/menu_current.md
|
338
|
+
- docs/events/by_name/menu_deselect.md
|
339
|
+
- docs/events/by_name/menu_items.md
|
340
|
+
- docs/events/by_name/menu_next.md
|
341
|
+
- docs/events/by_name/menu_prev.md
|
342
|
+
- docs/events/by_name/menu_select.md
|
343
|
+
- docs/events/by_name/menu_selected.md
|
344
|
+
- docs/events/by_name/menu_top.md
|
345
|
+
- docs/events/by_name/menu_view.md
|
346
|
+
- docs/events/by_name/mode_switch.md
|
347
|
+
- docs/events/by_name/movement_refresh.md
|
348
|
+
- docs/events/by_name/refresh.md
|
349
|
+
- docs/events/by_name/refresh_border.md
|
350
|
+
- docs/events/by_name/refresh_cursor.md
|
351
|
+
- docs/events/by_name/refresh_group.md
|
352
|
+
- docs/events/by_name/refresh_view.md
|
353
|
+
- docs/events/by_name/refresh_view_content.md
|
354
|
+
- docs/events/by_name/resize.md
|
355
|
+
- docs/events/by_name/show_cursor.md
|
356
|
+
- docs/events/by_name/show_group.md
|
357
|
+
- docs/events/by_name/show_interface.md
|
358
|
+
- docs/events/by_name/toggle_cursor.md
|
359
|
+
- docs/events/by_name/toggle_group.md
|
360
|
+
- docs/events/by_name/toggle_interface.md
|
361
|
+
- docs/events/by_name/unmaximise.md
|
292
362
|
- docs/events/document.md
|
293
363
|
- docs/events/drb.md
|
294
364
|
- docs/events/focus.md
|