vedeu 0.6.21 → 0.6.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/bin/vedeu_drb_server +1 -0
  4. data/docs/configuration.md +3 -0
  5. data/docs/events/refresh.md +5 -0
  6. data/docs/events/visibility.md +6 -0
  7. data/examples/hello_worlds.rb +79 -0
  8. data/lib/vedeu/all.rb +2 -2
  9. data/lib/vedeu/bindings/refresh.rb +8 -0
  10. data/lib/vedeu/bindings/visibility.rb +8 -0
  11. data/lib/vedeu/borders/border.rb +1 -1
  12. data/lib/vedeu/borders/render.rb +13 -10
  13. data/lib/vedeu/buffers/buffer.rb +5 -49
  14. data/lib/vedeu/buffers/refresh.rb +33 -15
  15. data/lib/vedeu/configuration/api.rb +32 -3
  16. data/lib/vedeu/configuration/configuration.rb +16 -2
  17. data/lib/vedeu/cursors/refresh.rb +1 -1
  18. data/lib/vedeu/distributed/templates/default_configuration.vedeu +1 -0
  19. data/lib/vedeu/editor/document.rb +1 -3
  20. data/lib/vedeu/logging/debug.rb +11 -8
  21. data/lib/vedeu/logging/timer.rb +18 -4
  22. data/lib/vedeu/models/interface.rb +18 -6
  23. data/lib/vedeu/models/views/view.rb +2 -9
  24. data/lib/vedeu/output/clear/interface.rb +93 -9
  25. data/lib/vedeu/output/direct.rb +0 -2
  26. data/lib/vedeu/output/viewport.rb +18 -16
  27. data/lib/vedeu/runtime/launcher.rb +25 -26
  28. data/lib/vedeu/version.rb +1 -1
  29. data/test/lib/vedeu/bindings/refresh_test.rb +1 -0
  30. data/test/lib/vedeu/bindings/visibility_test.rb +1 -0
  31. data/test/lib/vedeu/borders/border_test.rb +2 -2
  32. data/test/lib/vedeu/borders/render_test.rb +12 -69
  33. data/test/lib/vedeu/buffers/buffer_test.rb +0 -31
  34. data/test/lib/vedeu/buffers/refresh_test.rb +2 -10
  35. data/test/lib/vedeu/cursors/refresh_test.rb +2 -2
  36. data/test/lib/vedeu/editor/document_test.rb +3 -3
  37. data/test/lib/vedeu/logging/debug_test.rb +3 -3
  38. data/test/lib/vedeu/logging/timer_test.rb +24 -6
  39. data/test/lib/vedeu/models/interface_test.rb +4 -8
  40. data/test/lib/vedeu/models/views/view_test.rb +12 -22
  41. data/test/lib/vedeu/output/clear/interface_test.rb +7 -1
  42. data/test/lib/vedeu/output/viewport_test.rb +11 -190
  43. data/test/lib/vedeu/runtime/launcher_test.rb +2 -1
  44. data/test/lib/vedeu_test.rb +18 -19
  45. data/test/support/examples/borders_app.rb +4 -3
  46. data/test/support/examples/drb_app.rb +4 -3
  47. data/test/support/examples/editor_app.rb +3 -7
  48. data/test/support/examples/focus_app.rb +4 -4
  49. data/test/support/examples/hello_world.rb +5 -2
  50. data/test/support/examples/material_colours_app.rb +3 -42
  51. data/test/test_helper.rb +1 -0
  52. metadata +2 -1
@@ -8,12 +8,7 @@ require 'vedeu'
8
8
  #
9
9
  # If you have cloned this repository from GitHub, you can run this example:
10
10
  #
11
- # ./examples/material_colours_app.rb
12
- #
13
- # Running this application once, and immediately exiting produces the diagram
14
- # at `./examples/material_colours_app_20150721.svg`. Hopefully this will help
15
- # you to understand how parts of Vedeu work together. Questions are always
16
- # welcome at `https://github.com/gavinlaking/vedeu/issues`
11
+ # ./test/support/examples/material_colours_app.rb
17
12
  #
18
13
  class VedeuMaterialColoursApp
19
14
 
@@ -22,7 +17,8 @@ class VedeuMaterialColoursApp
22
17
  # Be aware that running an application with debugging enabled will affect
23
18
  # performance.
24
19
  Vedeu.configure do
25
- # debug!
20
+ debug!
21
+ # profile!
26
22
  log '/tmp/vedeu_material_colours_app.log'
27
23
  # height 11
28
24
  # width 20
@@ -188,41 +184,6 @@ class VedeuMaterialColoursApp
188
184
  line { line '' }
189
185
  end
190
186
 
191
- Vedeu.keymap('_global_') do
192
- key(:up) { Vedeu.trigger(:_cursor_up_) }
193
- key(:right) { Vedeu.trigger(:_cursor_right_) }
194
- key(:down) { Vedeu.trigger(:_cursor_down_) }
195
- key(:left) { Vedeu.trigger(:_cursor_left_) }
196
-
197
- key('q') { Vedeu.trigger(:_exit_) }
198
- key(:escape) { Vedeu.trigger(:_mode_switch_) }
199
- key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
200
- key(:tab) { Vedeu.trigger(:_focus_next_) }
201
-
202
- key('a') { Vedeu.trigger(:_view_left_, 'main_interface') }
203
- key('s') { Vedeu.trigger(:_view_down_, 'main_interface') }
204
- key('d') { Vedeu.trigger(:_view_up_, 'main_interface') }
205
- key('f') { Vedeu.trigger(:_view_right_, 'main_interface') }
206
-
207
- key('h') { Vedeu.trigger(:_view_left_, 'other_interface') }
208
- key('j') { Vedeu.trigger(:_view_down_, 'other_interface') }
209
- key('k') { Vedeu.trigger(:_view_up_, 'other_interface') }
210
- key('l') { Vedeu.trigger(:_view_right_, 'other_interface') }
211
-
212
- key('t') do
213
- Vedeu.trigger(:_toggle_interface_, 'main_interface')
214
- Vedeu.trigger(:_toggle_interface_, 'other_interface')
215
- end
216
- key('1') { Vedeu.trigger(:_hide_interface_, 'main_interface') }
217
- key('2') { Vedeu.trigger(:_show_interface_, 'main_interface') }
218
- key('3') { Vedeu.trigger(:_hide_interface_, 'other_interface') }
219
- key('4') { Vedeu.trigger(:_show_interface_, 'other_interface') }
220
- key('m') { Vedeu.trigger(:_maximise_, 'main_interface') }
221
- key('n') { Vedeu.trigger(:_unmaximise_, 'main_interface') }
222
- key('b') { Vedeu.trigger(:_maximise_, 'other_interface') }
223
- key('v') { Vedeu.trigger(:_unmaximise_, 'other_interface') }
224
- end
225
-
226
187
  view 'keys_interface' do
227
188
  line { left 'left,down,up,right - Move cursor' }
228
189
  line { left 'q - exit' }
data/test/test_helper.rb CHANGED
@@ -110,6 +110,7 @@ def test_configuration
110
110
  colour_mode 16_777_216
111
111
  # adds ~40ms to test run speed
112
112
  # debug!
113
+ # profile!
113
114
 
114
115
  # if debug! above is commented out, then only
115
116
  # `Vedeu.log(type: <any type>, message: '...', force: true)`
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.21
4
+ version: 0.6.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Laking
@@ -264,6 +264,7 @@ files:
264
264
  - docs/events/visibility.md
265
265
  - docs/getting_started.md
266
266
  - docs/object_graph.md
267
+ - examples/hello_worlds.rb
267
268
  - lib/vedeu.rb
268
269
  - lib/vedeu/all.rb
269
270
  - lib/vedeu/application/all.rb