vedeu 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vedeu/all.rb +17 -103
  3. data/lib/vedeu/api/all.rb +15 -0
  4. data/lib/vedeu/api/internal.rb +4 -0
  5. data/lib/vedeu/application/all.rb +6 -0
  6. data/lib/vedeu/bindings/all.rb +32 -0
  7. data/lib/vedeu/bindings/bindings.rb +0 -14
  8. data/lib/vedeu/bindings/refresh.rb +8 -2
  9. data/lib/vedeu/bindings/system.rb +1 -0
  10. data/lib/vedeu/borders/border.rb +1 -1
  11. data/lib/vedeu/borders/repository.rb +1 -1
  12. data/lib/vedeu/buffers/buffer.rb +2 -4
  13. data/lib/vedeu/buffers/repository.rb +1 -1
  14. data/lib/vedeu/colours/background.rb +1 -1
  15. data/lib/vedeu/colours/backgrounds.rb +1 -1
  16. data/lib/vedeu/colours/foreground.rb +1 -1
  17. data/lib/vedeu/colours/foregrounds.rb +1 -1
  18. data/lib/vedeu/colours/translator.rb +4 -3
  19. data/lib/vedeu/configuration/api.rb +2 -1
  20. data/lib/vedeu/configuration/cli.rb +1 -1
  21. data/lib/vedeu/cursors/cursor.rb +26 -26
  22. data/lib/vedeu/cursors/repository.rb +1 -1
  23. data/lib/vedeu/distributed/all.rb +16 -0
  24. data/lib/vedeu/distributed/test_application.rb +3 -3
  25. data/lib/vedeu/dsl/all.rb +22 -0
  26. data/lib/vedeu/dsl/composition.rb +43 -40
  27. data/lib/vedeu/dsl/dsl.rb +6 -3
  28. data/lib/vedeu/dsl/group.rb +23 -16
  29. data/lib/vedeu/dsl/interface.rb +48 -38
  30. data/lib/vedeu/dsl/keymap.rb +6 -7
  31. data/lib/vedeu/dsl/line.rb +6 -3
  32. data/lib/vedeu/dsl/stream.rb +2 -1
  33. data/lib/vedeu/editor/cursor.rb +1 -3
  34. data/lib/vedeu/editor/document.rb +4 -5
  35. data/lib/vedeu/editor/documents.rb +1 -1
  36. data/lib/vedeu/editor/line.rb +2 -3
  37. data/lib/vedeu/editor/lines.rb +2 -3
  38. data/lib/vedeu/esc/all.rb +14 -0
  39. data/lib/vedeu/esc/colours.rb +8 -4
  40. data/lib/vedeu/esc/esc.rb +89 -84
  41. data/lib/vedeu/events/aliases.rb +1 -2
  42. data/lib/vedeu/events/collection.rb +1 -1
  43. data/lib/vedeu/events/event.rb +1 -1
  44. data/lib/vedeu/events/repository.rb +1 -1
  45. data/lib/vedeu/events/trigger.rb +11 -9
  46. data/lib/vedeu/geometry/dimension.rb +1 -3
  47. data/lib/vedeu/geometry/generic_coordinate.rb +1 -3
  48. data/lib/vedeu/geometry/geometry.rb +1 -1
  49. data/lib/vedeu/geometry/repository.rb +3 -3
  50. data/lib/vedeu/input/all.rb +3 -0
  51. data/lib/vedeu/input/keymap.rb +10 -11
  52. data/lib/vedeu/input/keymaps.rb +1 -1
  53. data/lib/vedeu/input/keys.rb +1 -1
  54. data/lib/vedeu/input/mapper.rb +14 -12
  55. data/lib/vedeu/logging/all.rb +3 -0
  56. data/lib/vedeu/logging/log.rb +4 -2
  57. data/lib/vedeu/menus/menu.rb +2 -4
  58. data/lib/vedeu/menus/repository.rb +1 -1
  59. data/lib/vedeu/models/all.rb +15 -0
  60. data/lib/vedeu/models/cell.rb +1 -1
  61. data/lib/vedeu/models/escape.rb +1 -1
  62. data/lib/vedeu/models/group.rb +4 -3
  63. data/lib/vedeu/models/groups.rb +1 -1
  64. data/lib/vedeu/models/interface.rb +1 -1
  65. data/lib/vedeu/models/interfaces.rb +1 -1
  66. data/lib/vedeu/models/views/char.rb +1 -1
  67. data/lib/vedeu/models/views/collections/chars.rb +1 -1
  68. data/lib/vedeu/models/views/collections/lines.rb +1 -1
  69. data/lib/vedeu/models/views/collections/streams.rb +1 -1
  70. data/lib/vedeu/models/views/collections/view_collection.rb +1 -1
  71. data/lib/vedeu/models/views/composition.rb +1 -1
  72. data/lib/vedeu/models/views/line.rb +8 -6
  73. data/lib/vedeu/models/views/stream.rb +1 -1
  74. data/lib/vedeu/models/views/view.rb +1 -1
  75. data/lib/vedeu/null/all.rb +12 -0
  76. data/lib/vedeu/output/clear/named_group.rb +2 -1
  77. data/lib/vedeu/output/clear/named_interface.rb +5 -4
  78. data/lib/vedeu/output/compressor.rb +1 -0
  79. data/lib/vedeu/output/output.rb +3 -0
  80. data/lib/vedeu/output/presentation/colour.rb +10 -10
  81. data/lib/vedeu/output/presentation/presentation.rb +9 -9
  82. data/lib/vedeu/output/presentation/style.rb +2 -2
  83. data/lib/vedeu/output/refresh/refresh.rb +35 -0
  84. data/lib/vedeu/output/refresh/refresh_group.rb +66 -0
  85. data/lib/vedeu/output/renderers/all.rb +17 -0
  86. data/lib/vedeu/output/renderers/escape_sequence.rb +4 -2
  87. data/lib/vedeu/output/renderers/file.rb +7 -6
  88. data/lib/vedeu/output/renderers/html.rb +9 -7
  89. data/lib/vedeu/output/renderers/null.rb +1 -1
  90. data/lib/vedeu/output/renderers/renderer_options.rb +24 -20
  91. data/lib/vedeu/output/renderers/terminal.rb +1 -1
  92. data/lib/vedeu/output/renderers/text.rb +1 -1
  93. data/lib/vedeu/output/wordwrap.rb +7 -4
  94. data/lib/vedeu/plugins/all.rb +2 -0
  95. data/lib/vedeu/repositories/all.rb +16 -0
  96. data/lib/vedeu/repositories/collection.rb +93 -89
  97. data/lib/vedeu/repositories/model.rb +113 -102
  98. data/lib/vedeu/repositories/registerable.rb +60 -56
  99. data/lib/vedeu/repositories/repository.rb +161 -156
  100. data/lib/vedeu/repositories/store.rb +70 -66
  101. data/lib/vedeu/runtime/all.rb +15 -0
  102. data/lib/vedeu/runtime/launcher.rb +19 -16
  103. data/lib/vedeu/templating/all.rb +6 -0
  104. data/lib/vedeu/terminal/all.rb +14 -0
  105. data/lib/vedeu/terminal/buffer.rb +8 -7
  106. data/lib/vedeu/terminal/mode.rb +11 -10
  107. data/lib/vedeu/terminal/terminal.rb +50 -45
  108. data/lib/vedeu/version.rb +1 -1
  109. data/test/lib/vedeu/cursors/cursor_test.rb +4 -2
  110. data/test/lib/vedeu/editor/cursor_test.rb +0 -3
  111. data/test/lib/vedeu/esc/esc_test.rb +58 -54
  112. data/test/lib/vedeu/events/collection_test.rb +1 -1
  113. data/test/lib/vedeu/input/keys_test.rb +1 -1
  114. data/test/lib/vedeu/input/mapper_test.rb +1 -1
  115. data/test/lib/vedeu/models/views/collections/chars_test.rb +1 -1
  116. data/test/lib/vedeu/models/views/collections/lines_test.rb +1 -1
  117. data/test/lib/vedeu/models/views/collections/streams_test.rb +1 -1
  118. data/test/lib/vedeu/models/views/collections/view_collection_test.rb +1 -1
  119. data/test/lib/vedeu/output/refresh/refresh_group_test.rb +43 -0
  120. data/test/lib/vedeu/output/refresh/refresh_test.rb +50 -0
  121. data/test/lib/vedeu/output/renderers/renderer_options_test.rb +8 -4
  122. data/test/lib/vedeu/output/renderers_test.rb +2 -1
  123. data/test/lib/vedeu/repositories/collection_test.rb +105 -101
  124. data/test/lib/vedeu/repositories/model_test.rb +56 -52
  125. data/test/lib/vedeu/repositories/registerable_test.rb +36 -32
  126. data/test/lib/vedeu/repositories/repository_test.rb +178 -174
  127. data/test/lib/vedeu/repositories/store_test.rb +109 -105
  128. data/test/support/examples/material_colours_app.rb +0 -1
  129. data/test/support/helpers/model_test_class.rb +50 -46
  130. data/test/test_helper.rb +2 -2
  131. metadata +21 -9
  132. data/lib/vedeu/refresh/refresh.rb +0 -31
  133. data/lib/vedeu/refresh/refresh_group.rb +0 -59
  134. data/out_ +0 -50
  135. data/test/lib/vedeu/refresh/refresh_group_test.rb +0 -39
  136. data/test/lib/vedeu/refresh/refresh_test.rb +0 -46
data/out_ DELETED
@@ -1,50 +0,0 @@
1
- <html>
2
- <head>
3
- <style type='text/css'>
4
- body {
5
- background:#000;
6
- }
7
- td {
8
- border:1px #171717 solid;
9
- font-size:12px;
10
- font-family:monospace;
11
- height:18px;
12
- margin:1px;
13
- text-align:center;
14
- vertical-align:center;
15
- width:18px;
16
- }
17
- </style>
18
- </head>
19
- <body>
20
- <table>
21
- <tr>
22
-
23
- </tr>
24
- <tr>
25
-
26
- </tr>
27
- <tr>
28
-
29
- </tr>
30
- <tr>
31
-
32
- </tr>
33
- <tr>
34
-
35
- </tr>
36
- <tr>
37
-
38
- </tr>
39
- <tr>
40
-
41
- </tr>
42
- <tr>
43
-
44
- </tr>
45
- <tr>
46
-
47
- </tr>
48
- </table>
49
- </body>
50
- </html>
@@ -1,39 +0,0 @@
1
- require 'test_helper'
2
-
3
- module Vedeu
4
-
5
- describe RefreshGroup do
6
-
7
- let(:described) { Vedeu::RefreshGroup }
8
- let(:instance) { described.new(_name) }
9
- let(:_name) { 'Vedeu::RefreshGroup' }
10
-
11
- describe '#initialize' do
12
- it { instance.must_be_instance_of(described) }
13
- it { instance.instance_variable_get('@name').must_equal(_name) }
14
- end
15
-
16
- describe '.by_name' do
17
- subject { described.by_name(_name) }
18
-
19
- context 'when the name is not present' do
20
- let(:_name) { '' }
21
-
22
- it { proc { subject }.must_raise(Vedeu::Error::MissingRequired) }
23
- end
24
-
25
- context 'when the name is present' do
26
- it {
27
- Vedeu::RefreshGroup.expects(:by_name).with(_name)
28
- subject
29
- }
30
- end
31
- end
32
-
33
- describe '#by_name' do
34
- it { instance.must_respond_to(:by_name) }
35
- end
36
-
37
- end # RefreshGroup
38
-
39
- end # Vedeu
@@ -1,46 +0,0 @@
1
- require 'test_helper'
2
-
3
- module Vedeu
4
-
5
- describe Refresh do
6
-
7
- let(:described) { Vedeu::Refresh }
8
- let(:instance) { described.new }
9
-
10
- describe '.all' do
11
- before { Vedeu.stubs(:trigger) }
12
-
13
- subject { described.all }
14
-
15
- it { subject.must_be_instance_of(Array) }
16
-
17
- context 'when there are no registered interfaces' do
18
- before { Vedeu.interfaces.reset }
19
-
20
- it { subject.must_equal([]) }
21
- end
22
-
23
- context 'when there are registered interfaces' do
24
- let(:interface) {
25
- Vedeu::Models::Interface.new(name: 'Vedeu::Refresh')
26
- }
27
- let(:interfaces) { [interface] }
28
-
29
- before { Vedeu.interfaces.stubs(:zindexed).returns(interfaces) }
30
-
31
- it {
32
- Vedeu.expects(:trigger).with(:_refresh_, 'Vedeu::Refresh')
33
- subject
34
- }
35
-
36
- it { subject.must_equal([interface]) }
37
- end
38
- end
39
-
40
- describe '#all' do
41
- it { instance.must_respond_to(:all) }
42
- end
43
-
44
- end # Refresh
45
-
46
- end # Vedeu