vedeu 0.6.56 → 0.6.57
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/.rubocop.yml +3 -0
- data/Guardfile +1 -1
- data/Rakefile +3 -3
- data/lib/vedeu/borders/all.rb +1 -0
- data/lib/vedeu/borders/border.rb +14 -80
- data/lib/vedeu/borders/caption.rb +17 -0
- data/lib/vedeu/borders/dsl.rb +2 -2
- data/lib/vedeu/borders/null.rb +14 -34
- data/lib/vedeu/borders/refresh.rb +28 -14
- data/lib/vedeu/borders/title.rb +0 -10
- data/lib/vedeu/buffers/buffer.rb +1 -1
- data/lib/vedeu/buffers/view.rb +7 -6
- data/lib/vedeu/colours/repository.rb +0 -15
- data/lib/vedeu/cursors/cursor.rb +6 -6
- data/lib/vedeu/cursors/refresh.rb +11 -19
- data/lib/vedeu/cursors/reposition.rb +3 -5
- data/lib/vedeu/editor/cropper.rb +9 -9
- data/lib/vedeu/editor/cursor.rb +5 -5
- data/lib/vedeu/editor/editor.rb +1 -1
- data/lib/vedeu/events/event.rb +1 -1
- data/lib/vedeu/events/trigger.rb +1 -1
- data/lib/vedeu/geometry/area.rb +94 -17
- data/lib/vedeu/geometry/coordinate.rb +15 -15
- data/lib/vedeu/geometry/dimension.rb +2 -2
- data/lib/vedeu/geometry/geometry.rb +30 -27
- data/lib/vedeu/geometry/null.rb +17 -11
- data/lib/vedeu/interfaces/clear.rb +5 -12
- data/lib/vedeu/output/viewport.rb +13 -13
- data/lib/vedeu/plugins/plugin.rb +1 -1
- data/lib/vedeu/repositories/repository.rb +1 -3
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/borders/border_test.rb +4 -230
- data/test/lib/vedeu/borders/caption_test.rb +15 -0
- data/test/lib/vedeu/borders/dsl_test.rb +4 -4
- data/test/lib/vedeu/borders/null_test.rb +3 -39
- data/test/lib/vedeu/buffers/view_test.rb +2 -0
- data/test/lib/vedeu/colours/repository_test.rb +0 -19
- data/test/lib/vedeu/cursors/reposition_test.rb +17 -4
- data/test/lib/vedeu/dsl/shared_test.rb +34 -0
- data/test/lib/vedeu/geometry/area_test.rb +196 -3
- data/test/lib/vedeu/geometry/dimension_test.rb +79 -79
- data/test/lib/vedeu/geometry/geometry_test.rb +4 -0
- data/test/lib/vedeu/groups/refresh_test.rb +1 -1
- data/test/lib/vedeu/logging/clock_time_test.rb +14 -0
- data/test/lib/vedeu/logging/ips_test.rb +43 -0
- data/test/lib/vedeu/output/presentation/colour_test.rb +4 -0
- data/test/lib/vedeu/repositories/repositories_test.rb +7 -1
- data/test/lib/vedeu/terminal/buffer_test.rb +10 -0
- data/test/support/examples/material_colours_app.rb +306 -47
- data/test/test_helper.rb +5 -5
- metadata +7 -4
- data/test/support/examples/borders_app.rb +0 -330
data/test/test_helper.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
if ENV['SIMPLECOV'] == 1 || ENV['CONSOLE_COVERAGE'] == 1
|
|
1
|
+
if ENV['SIMPLECOV'].to_i == 1 || ENV['CONSOLE_COVERAGE'].to_i == 1
|
|
2
2
|
require 'simplecov'
|
|
3
|
-
require 'simplecov-console' if ENV['CONSOLE_COVERAGE'] == 1
|
|
3
|
+
require 'simplecov-console' if ENV['CONSOLE_COVERAGE'].to_i == 1
|
|
4
4
|
|
|
5
5
|
SimpleCov.start do
|
|
6
|
-
formatter SimpleCov::Formatter::Console if ENV['CONSOLE_COVERAGE'] == 1
|
|
6
|
+
formatter SimpleCov::Formatter::Console if ENV['CONSOLE_COVERAGE'].to_i == 1
|
|
7
7
|
command_name 'MiniTest::Spec'
|
|
8
8
|
add_filter '/test/'
|
|
9
9
|
add_group 'application', 'vedeu/application'
|
|
@@ -40,7 +40,7 @@ require 'minitest/pride'
|
|
|
40
40
|
require 'minitest/hell'
|
|
41
41
|
|
|
42
42
|
# Appears to remove ~20ms from test run speed.
|
|
43
|
-
if ENV['DISABLE_GC'] == 1
|
|
43
|
+
if ENV['DISABLE_GC'].to_i == 1
|
|
44
44
|
GC.disable
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -89,7 +89,7 @@ require 'mocha/setup'
|
|
|
89
89
|
require 'vedeu'
|
|
90
90
|
require 'support/helpers/model_test_class'
|
|
91
91
|
|
|
92
|
-
if ENV['PERFORMANCE'] == 1
|
|
92
|
+
if ENV['PERFORMANCE'].to_i == 1
|
|
93
93
|
require 'minitest/reporters'
|
|
94
94
|
require 'minitest/reporters/mean_time_reporter'
|
|
95
95
|
|
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.6.
|
|
4
|
+
version: 0.6.57
|
|
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-11-
|
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: guard
|
|
@@ -330,6 +330,7 @@ files:
|
|
|
330
330
|
- lib/vedeu/application/view.rb
|
|
331
331
|
- lib/vedeu/borders/all.rb
|
|
332
332
|
- lib/vedeu/borders/border.rb
|
|
333
|
+
- lib/vedeu/borders/caption.rb
|
|
333
334
|
- lib/vedeu/borders/dsl.rb
|
|
334
335
|
- lib/vedeu/borders/null.rb
|
|
335
336
|
- lib/vedeu/borders/refresh.rb
|
|
@@ -533,6 +534,7 @@ files:
|
|
|
533
534
|
- test/lib/vedeu/application/helper_test.rb
|
|
534
535
|
- test/lib/vedeu/application/view_test.rb
|
|
535
536
|
- test/lib/vedeu/borders/border_test.rb
|
|
537
|
+
- test/lib/vedeu/borders/caption_test.rb
|
|
536
538
|
- test/lib/vedeu/borders/dsl_test.rb
|
|
537
539
|
- test/lib/vedeu/borders/null_test.rb
|
|
538
540
|
- test/lib/vedeu/borders/refresh_test.rb
|
|
@@ -631,6 +633,7 @@ files:
|
|
|
631
633
|
- test/lib/vedeu/interfaces/repository_test.rb
|
|
632
634
|
- test/lib/vedeu/logging/clock_time_test.rb
|
|
633
635
|
- test/lib/vedeu/logging/debug_test.rb
|
|
636
|
+
- test/lib/vedeu/logging/ips_test.rb
|
|
634
637
|
- test/lib/vedeu/logging/lockless_log_device_test.rb
|
|
635
638
|
- test/lib/vedeu/logging/log_test.rb
|
|
636
639
|
- test/lib/vedeu/logging/mono_logger_test.rb
|
|
@@ -695,7 +698,6 @@ files:
|
|
|
695
698
|
- test/lib/vedeu_test.rb
|
|
696
699
|
- test/support/colour_support.sh
|
|
697
700
|
- test/support/coverage.rb
|
|
698
|
-
- test/support/examples/borders_app.rb
|
|
699
701
|
- test/support/examples/drb_app.rb
|
|
700
702
|
- test/support/examples/focus_app.rb
|
|
701
703
|
- test/support/examples/hello_world.rb
|
|
@@ -744,6 +746,7 @@ test_files:
|
|
|
744
746
|
- test/lib/vedeu/application/helper_test.rb
|
|
745
747
|
- test/lib/vedeu/application/view_test.rb
|
|
746
748
|
- test/lib/vedeu/borders/border_test.rb
|
|
749
|
+
- test/lib/vedeu/borders/caption_test.rb
|
|
747
750
|
- test/lib/vedeu/borders/dsl_test.rb
|
|
748
751
|
- test/lib/vedeu/borders/null_test.rb
|
|
749
752
|
- test/lib/vedeu/borders/refresh_test.rb
|
|
@@ -842,6 +845,7 @@ test_files:
|
|
|
842
845
|
- test/lib/vedeu/interfaces/repository_test.rb
|
|
843
846
|
- test/lib/vedeu/logging/clock_time_test.rb
|
|
844
847
|
- test/lib/vedeu/logging/debug_test.rb
|
|
848
|
+
- test/lib/vedeu/logging/ips_test.rb
|
|
845
849
|
- test/lib/vedeu/logging/lockless_log_device_test.rb
|
|
846
850
|
- test/lib/vedeu/logging/log_test.rb
|
|
847
851
|
- test/lib/vedeu/logging/mono_logger_test.rb
|
|
@@ -906,7 +910,6 @@ test_files:
|
|
|
906
910
|
- test/lib/vedeu_test.rb
|
|
907
911
|
- test/support/colour_support.sh
|
|
908
912
|
- test/support/coverage.rb
|
|
909
|
-
- test/support/examples/borders_app.rb
|
|
910
913
|
- test/support/examples/drb_app.rb
|
|
911
914
|
- test/support/examples/focus_app.rb
|
|
912
915
|
- test/support/examples/hello_world.rb
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'bundler/setup'
|
|
4
|
-
require 'vedeu'
|
|
5
|
-
|
|
6
|
-
# An example application to demonstrate borders.
|
|
7
|
-
#
|
|
8
|
-
# If you have cloned this repository from GitHub, you can run this example:
|
|
9
|
-
#
|
|
10
|
-
# ./test/support/examples/borders_app.rb
|
|
11
|
-
#
|
|
12
|
-
class VedeuBordersApp
|
|
13
|
-
|
|
14
|
-
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
|
15
|
-
|
|
16
|
-
# Be aware that running an application with profiling enabled will affect
|
|
17
|
-
# performance.
|
|
18
|
-
Vedeu.configure do
|
|
19
|
-
debug!
|
|
20
|
-
log '/tmp/vedeu_borders_app.log'
|
|
21
|
-
# profile!
|
|
22
|
-
raw!
|
|
23
|
-
run_once!
|
|
24
|
-
standalone!
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
Vedeu.interface 'default_border' do
|
|
28
|
-
geometry do
|
|
29
|
-
x 2
|
|
30
|
-
y 2
|
|
31
|
-
height 4
|
|
32
|
-
width 10
|
|
33
|
-
end
|
|
34
|
-
colour foreground: '#ffffff', background: '#f44336'
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
Vedeu.interface 'border_off' do
|
|
38
|
-
geometry do
|
|
39
|
-
x 14
|
|
40
|
-
y 2
|
|
41
|
-
height 4
|
|
42
|
-
width 10
|
|
43
|
-
end
|
|
44
|
-
colour foreground: '#ffffff', background: '#e91e63'
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
Vedeu.interface 'no_top' do
|
|
48
|
-
geometry do
|
|
49
|
-
x 26
|
|
50
|
-
y 2
|
|
51
|
-
height 4
|
|
52
|
-
width 10
|
|
53
|
-
end
|
|
54
|
-
colour foreground: '#000000', background: '#9c27b0'
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
Vedeu.interface 'no_bottom' do
|
|
58
|
-
geometry do
|
|
59
|
-
x 38
|
|
60
|
-
y 2
|
|
61
|
-
height 4
|
|
62
|
-
width 10
|
|
63
|
-
end
|
|
64
|
-
colour foreground: '#000000', background: '#673ab7'
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
Vedeu.interface 'no_left' do
|
|
68
|
-
geometry do
|
|
69
|
-
x 50
|
|
70
|
-
y 2
|
|
71
|
-
height 4
|
|
72
|
-
width 10
|
|
73
|
-
end
|
|
74
|
-
colour foreground: '#000000', background: '#3f51b5'
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
Vedeu.interface 'no_right' do
|
|
78
|
-
geometry do
|
|
79
|
-
x 62
|
|
80
|
-
y 2
|
|
81
|
-
height 4
|
|
82
|
-
width 10
|
|
83
|
-
end
|
|
84
|
-
colour foreground: '#000000', background: '#2196f3'
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
Vedeu.interface 'custom_corners' do
|
|
88
|
-
geometry do
|
|
89
|
-
x 2
|
|
90
|
-
y 8
|
|
91
|
-
height 4
|
|
92
|
-
width 10
|
|
93
|
-
end
|
|
94
|
-
colour foreground: '#000000', background: '#03a9f4'
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
Vedeu.interface 'custom_sides' do
|
|
98
|
-
geometry do
|
|
99
|
-
x 14
|
|
100
|
-
y 8
|
|
101
|
-
height 4
|
|
102
|
-
width 10
|
|
103
|
-
end
|
|
104
|
-
colour foreground: '#000000', background: '#00bcd4'
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Borders can be defined as part of the interface definition.
|
|
108
|
-
Vedeu.interface 'only_top' do
|
|
109
|
-
border do
|
|
110
|
-
foreground '#ffffff'
|
|
111
|
-
show_right false
|
|
112
|
-
show_bottom false
|
|
113
|
-
show_left false
|
|
114
|
-
end
|
|
115
|
-
geometry do
|
|
116
|
-
x 26
|
|
117
|
-
y 8
|
|
118
|
-
height 4
|
|
119
|
-
width 10
|
|
120
|
-
end
|
|
121
|
-
colour foreground: '#ffffff', background: '#009688'
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
Vedeu.interface 'only_bottom' do
|
|
125
|
-
border do
|
|
126
|
-
foreground '#000000'
|
|
127
|
-
show_top false
|
|
128
|
-
show_right false
|
|
129
|
-
show_left false
|
|
130
|
-
end
|
|
131
|
-
geometry do
|
|
132
|
-
x 38
|
|
133
|
-
y 8
|
|
134
|
-
height 4
|
|
135
|
-
width 10
|
|
136
|
-
end
|
|
137
|
-
colour foreground: '#000000', background: '#8bc34a'
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
Vedeu.interface 'only_left' do
|
|
141
|
-
border do
|
|
142
|
-
foreground '#000000'
|
|
143
|
-
show_top false
|
|
144
|
-
show_bottom false
|
|
145
|
-
show_right false
|
|
146
|
-
end
|
|
147
|
-
geometry do
|
|
148
|
-
x 50
|
|
149
|
-
y 8
|
|
150
|
-
height 4
|
|
151
|
-
width 10
|
|
152
|
-
end
|
|
153
|
-
colour foreground: '#000000', background: '#cddc39'
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
Vedeu.interface 'only_right' do
|
|
157
|
-
border do
|
|
158
|
-
foreground '#000000'
|
|
159
|
-
show_top false
|
|
160
|
-
show_bottom false
|
|
161
|
-
show_left false
|
|
162
|
-
end
|
|
163
|
-
geometry do
|
|
164
|
-
x 62
|
|
165
|
-
y 8
|
|
166
|
-
height 4
|
|
167
|
-
width 10
|
|
168
|
-
end
|
|
169
|
-
colour foreground: '#000000', background: '#ffeb3b'
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
Vedeu.interface 'custom_colour' do
|
|
173
|
-
geometry do
|
|
174
|
-
x 2
|
|
175
|
-
y 14
|
|
176
|
-
height 4
|
|
177
|
-
width 10
|
|
178
|
-
end
|
|
179
|
-
colour foreground: '#000000', background: '#ffc107'
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
Vedeu.interface 'negative' do
|
|
183
|
-
geometry do
|
|
184
|
-
x 14
|
|
185
|
-
y 14
|
|
186
|
-
height 4
|
|
187
|
-
width 10
|
|
188
|
-
end
|
|
189
|
-
colour foreground: '#000000', background: '#ff9800'
|
|
190
|
-
style 'normal'
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
Vedeu.keymap '_global_' do
|
|
194
|
-
key('r') { Vedeu.trigger(:_refresh_) }
|
|
195
|
-
|
|
196
|
-
key('q') { Vedeu.trigger(:_exit_) }
|
|
197
|
-
key(:escape) { Vedeu.trigger(:_mode_switch_) }
|
|
198
|
-
key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
|
|
199
|
-
key(:tab) { Vedeu.trigger(:_focus_next_) }
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
# Borders can be defined as standalone declarations.
|
|
203
|
-
Vedeu.border 'no_bottom' do
|
|
204
|
-
foreground '#ffffff'
|
|
205
|
-
show_bottom false
|
|
206
|
-
end
|
|
207
|
-
Vedeu.border 'no_left' do
|
|
208
|
-
foreground '#ffffff'
|
|
209
|
-
show_left false
|
|
210
|
-
end
|
|
211
|
-
Vedeu.border 'no_right' do
|
|
212
|
-
foreground '#ffffff'
|
|
213
|
-
show_right false
|
|
214
|
-
end
|
|
215
|
-
Vedeu.border 'no_top' do
|
|
216
|
-
foreground '#ffffff'
|
|
217
|
-
show_top false
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
# Borders can be defined as part of a view.
|
|
221
|
-
Vedeu.renders do
|
|
222
|
-
view('default_border') do
|
|
223
|
-
border do
|
|
224
|
-
foreground '#ffffff'
|
|
225
|
-
end
|
|
226
|
-
lines do
|
|
227
|
-
line 'all on'
|
|
228
|
-
end
|
|
229
|
-
end
|
|
230
|
-
view('border_off') do
|
|
231
|
-
lines do
|
|
232
|
-
line 'all off'
|
|
233
|
-
end
|
|
234
|
-
end
|
|
235
|
-
view('no_top') do
|
|
236
|
-
lines do
|
|
237
|
-
line 'no top'
|
|
238
|
-
end
|
|
239
|
-
end
|
|
240
|
-
view('no_bottom') do
|
|
241
|
-
lines do
|
|
242
|
-
line 'no'
|
|
243
|
-
line 'bottom'
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
|
-
view('no_left') do
|
|
247
|
-
lines do
|
|
248
|
-
line 'no left'
|
|
249
|
-
end
|
|
250
|
-
end
|
|
251
|
-
view('no_right') do
|
|
252
|
-
lines do
|
|
253
|
-
line 'no right'
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
|
-
view('custom_corners') do
|
|
257
|
-
border do
|
|
258
|
-
foreground '#ffffff'
|
|
259
|
-
top_right 'B'
|
|
260
|
-
top_left 'A'
|
|
261
|
-
bottom_right 'D'
|
|
262
|
-
bottom_left 'C'
|
|
263
|
-
end
|
|
264
|
-
lines do
|
|
265
|
-
line 'custom'
|
|
266
|
-
line 'corners'
|
|
267
|
-
end
|
|
268
|
-
end
|
|
269
|
-
view('custom_sides') do
|
|
270
|
-
border do
|
|
271
|
-
background '#ff5722'
|
|
272
|
-
horizontal '*'
|
|
273
|
-
vertical '$'
|
|
274
|
-
end
|
|
275
|
-
lines do
|
|
276
|
-
line 'custom'
|
|
277
|
-
line 'sides'
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
view('only_top') do
|
|
281
|
-
lines do
|
|
282
|
-
line 'only'
|
|
283
|
-
line 'top'
|
|
284
|
-
end
|
|
285
|
-
end
|
|
286
|
-
view('only_bottom') do
|
|
287
|
-
lines do
|
|
288
|
-
line 'only'
|
|
289
|
-
line 'bottom'
|
|
290
|
-
end
|
|
291
|
-
end
|
|
292
|
-
view('only_left') do
|
|
293
|
-
lines do
|
|
294
|
-
line 'only'
|
|
295
|
-
line 'left'
|
|
296
|
-
end
|
|
297
|
-
end
|
|
298
|
-
view('only_right') do
|
|
299
|
-
lines do
|
|
300
|
-
line 'only'
|
|
301
|
-
line 'right'
|
|
302
|
-
end
|
|
303
|
-
end
|
|
304
|
-
view('custom_colour') do
|
|
305
|
-
border do
|
|
306
|
-
colour foreground: '#ff5500', background: '#0000ff'
|
|
307
|
-
end
|
|
308
|
-
lines do
|
|
309
|
-
line 'custom'
|
|
310
|
-
line 'color'
|
|
311
|
-
end
|
|
312
|
-
end
|
|
313
|
-
view('negative') do
|
|
314
|
-
border do
|
|
315
|
-
style 'negative'
|
|
316
|
-
end
|
|
317
|
-
lines do
|
|
318
|
-
line 'custom'
|
|
319
|
-
line 'style'
|
|
320
|
-
end
|
|
321
|
-
end
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
def self.start(argv = ARGV)
|
|
325
|
-
Vedeu::Launcher.execute!(argv)
|
|
326
|
-
end
|
|
327
|
-
|
|
328
|
-
end # VedeuBordersApp
|
|
329
|
-
|
|
330
|
-
VedeuBordersApp.start(ARGV)
|