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
@@ -2,163 +2,167 @@ require 'test_helper'
2
2
 
3
3
  module Vedeu
4
4
 
5
- class StoreTestClass
6
- include Vedeu::Store
5
+ module Repositories
7
6
 
8
- attr_reader :model
7
+ class StoreTestClass
8
+ include Vedeu::Repositories::Store
9
9
 
10
- def initialize(model = nil, storage = {})
11
- @model = model
12
- @storage = storage
13
- end
10
+ attr_reader :model
11
+
12
+ def initialize(model = nil, storage = {})
13
+ @model = model
14
+ @storage = storage
15
+ end
14
16
 
15
- private
17
+ private
16
18
 
17
- def in_memory
18
- {}
19
+ def in_memory
20
+ {}
21
+ end
19
22
  end
20
- end
21
23
 
22
- describe Store do
24
+ describe Store do
23
25
 
24
- let(:described) { Vedeu::Store }
25
- let(:instance) { Vedeu::StoreTestClass.new(model, storage) }
26
- let(:model) {}
27
- let(:storage) {}
26
+ let(:described) { Vedeu::Repositories::Store }
27
+ let(:instance) { Vedeu::Repositories::StoreTestClass.new(model, storage) }
28
+ let(:model) {}
29
+ let(:storage) {}
28
30
 
29
- describe '#each' do
30
- subject { instance.each }
31
+ describe '#each' do
32
+ subject { instance.each }
31
33
 
32
- it { subject.must_be_instance_of(Enumerator) }
33
- end
34
+ it { subject.must_be_instance_of(Enumerator) }
35
+ end
34
36
 
35
- describe '#empty?' do
36
- subject { instance.empty? }
37
+ describe '#empty?' do
38
+ subject { instance.empty? }
37
39
 
38
- context 'when empty' do
39
- it { subject.must_equal(true) }
40
- end
40
+ context 'when empty' do
41
+ it { subject.must_equal(true) }
42
+ end
41
43
 
42
- context 'when not empty' do
43
- let(:storage) { [:item] }
44
+ context 'when not empty' do
45
+ let(:storage) { [:item] }
44
46
 
45
- it { subject.must_equal(false) }
47
+ it { subject.must_equal(false) }
48
+ end
46
49
  end
47
- end
48
50
 
49
- describe '#exists?' do
50
- let(:_name) {}
51
+ describe '#exists?' do
52
+ let(:_name) {}
51
53
 
52
- subject { instance.exists?(_name) }
54
+ subject { instance.exists?(_name) }
53
55
 
54
- context 'when empty' do
55
- let(:_name) { 'terbium' }
56
+ context 'when empty' do
57
+ let(:_name) { 'terbium' }
56
58
 
57
- it { subject.must_equal(false) }
58
- end
59
+ it { subject.must_equal(false) }
60
+ end
59
61
 
60
- context 'with no name' do
61
- it { subject.must_equal(false) }
62
- end
62
+ context 'with no name' do
63
+ it { subject.must_equal(false) }
64
+ end
63
65
 
64
- context 'with empty name' do
65
- let(:_name) { '' }
66
+ context 'with empty name' do
67
+ let(:_name) { '' }
66
68
 
67
- it { subject.must_equal(false) }
68
- end
69
+ it { subject.must_equal(false) }
70
+ end
69
71
 
70
- context 'when the model does not exist' do
71
- let(:storage) { { 'samarium' => [:some_model_data] } }
72
- let(:_name) { 'terbium' }
72
+ context 'when the model does not exist' do
73
+ let(:storage) { { 'samarium' => [:some_model_data] } }
74
+ let(:_name) { 'terbium' }
73
75
 
74
- it { subject.must_equal(false) }
75
- end
76
+ it { subject.must_equal(false) }
77
+ end
76
78
 
77
- context 'when the model exists' do
78
- let(:storage) { { 'samarium' => [:some_model_data] } }
79
- let(:_name) { 'samarium' }
79
+ context 'when the model exists' do
80
+ let(:storage) { { 'samarium' => [:some_model_data] } }
81
+ let(:_name) { 'samarium' }
80
82
 
81
- it { subject.must_equal(true) }
82
- end
83
+ it { subject.must_equal(true) }
84
+ end
83
85
 
84
- it { instance.must_respond_to(:registered?) }
85
- end
86
+ it { instance.must_respond_to(:registered?) }
87
+ end
86
88
 
87
- describe '#registered' do
88
- subject { instance.registered }
89
+ describe '#registered' do
90
+ subject { instance.registered }
89
91
 
90
- it { subject.must_be_instance_of(Array) }
92
+ it { subject.must_be_instance_of(Array) }
91
93
 
92
- context 'when the storage is a Hash' do
93
- let(:storage) {
94
- {
95
- 'rutherfordium' => { name: 'rutherfordium' }
94
+ context 'when the storage is a Hash' do
95
+ let(:storage) {
96
+ {
97
+ 'rutherfordium' => { name: 'rutherfordium' }
98
+ }
96
99
  }
97
- }
98
100
 
99
- it 'returns a collection of the names of all the registered entities' do
100
- subject.must_equal(['rutherfordium'])
101
+ it 'returns a collection of the names of all the registered entities' do
102
+ subject.must_equal(['rutherfordium'])
103
+ end
101
104
  end
102
- end
103
105
 
104
- context 'when the storage is an Array' do
105
- let(:storage) { ['rutherfordium'] }
106
+ context 'when the storage is an Array' do
107
+ let(:storage) { ['rutherfordium'] }
106
108
 
107
- it 'returns the registered entities' do
108
- subject.must_equal(['rutherfordium'])
109
+ it 'returns the registered entities' do
110
+ subject.must_equal(['rutherfordium'])
111
+ end
109
112
  end
110
- end
111
113
 
112
- context 'when the storage is a Set' do
113
- let(:storage) { Set['rutherfordium'] }
114
+ context 'when the storage is a Set' do
115
+ let(:storage) { Set['rutherfordium'] }
114
116
 
115
- it 'returns the registered entities' do
116
- subject.must_equal(['rutherfordium'])
117
+ it 'returns the registered entities' do
118
+ subject.must_equal(['rutherfordium'])
119
+ end
117
120
  end
118
- end
119
121
 
120
- context 'when the storage is empty' do
121
- it 'returns an empty collection' do
122
- subject.must_equal([])
122
+ context 'when the storage is empty' do
123
+ it 'returns an empty collection' do
124
+ subject.must_equal([])
125
+ end
123
126
  end
124
127
  end
125
- end
126
128
 
127
- describe '#reset' do
128
- it 'returns a Hash' do
129
- instance.reset.must_be_instance_of(Hash)
130
- end
129
+ describe '#reset' do
130
+ it 'returns a Hash' do
131
+ instance.reset.must_be_instance_of(Hash)
132
+ end
131
133
 
132
- it 'resets the repository' do
133
- instance.reset.must_equal({})
134
- end
134
+ it 'resets the repository' do
135
+ instance.reset.must_equal({})
136
+ end
135
137
 
136
- it { instance.must_respond_to(:reset!) }
137
- it { instance.must_respond_to(:clear) }
138
- end
138
+ it { instance.must_respond_to(:reset!) }
139
+ it { instance.must_respond_to(:clear) }
140
+ end
139
141
 
140
- describe '#size' do
141
- subject { instance.size }
142
+ describe '#size' do
143
+ subject { instance.size }
142
144
 
143
- context 'when empty' do
144
- it { subject.must_equal(0) }
145
- end
145
+ context 'when empty' do
146
+ it { subject.must_equal(0) }
147
+ end
146
148
 
147
- context 'when not empty' do
148
- let(:storage) { [:item] }
149
+ context 'when not empty' do
150
+ let(:storage) { [:item] }
149
151
 
150
- it { subject.must_equal(1) }
152
+ it { subject.must_equal(1) }
153
+ end
151
154
  end
152
- end
153
155
 
154
- describe '#storage' do
155
- subject { instance.storage }
156
+ describe '#storage' do
157
+ subject { instance.storage }
156
158
 
157
- it { subject.must_equal({}) }
159
+ it { subject.must_equal({}) }
158
160
 
159
- it { instance.must_respond_to(:all) }
160
- end
161
+ it { instance.must_respond_to(:all) }
162
+ end
163
+
164
+ end # Store
161
165
 
162
- end # Store
166
+ end # Repositories
163
167
 
164
168
  end # Vedeu
@@ -26,7 +26,6 @@ class VedeuMaterialColoursApp
26
26
  Vedeu.configure do
27
27
  debug!
28
28
  log '/tmp/vedeu_material_colours_app.log'
29
- renderers Vedeu::Renderers::HTML.new(filename: '/tmp/material', timestamp: true)
30
29
  end
31
30
 
32
31
  Vedeu.interface 'main_interface' do
@@ -1,72 +1,76 @@
1
1
  module Vedeu
2
2
 
3
- module RepositoryTestModule
3
+ module Repositories
4
4
 
5
- extend self
5
+ module DSL
6
6
 
7
- def by_name(name)
8
- model
9
- end
7
+ class ModelTestClass
10
8
 
11
- # The real repository stores the model and returns it.
12
- def store(model)
13
- model
14
- end
9
+ include Vedeu::DSL::Presentation
15
10
 
16
- private
11
+ def initialize(model, client = nil)
12
+ @model = model
13
+ @client = client
14
+ end
17
15
 
18
- # A storage solution that uses memory to persist models.
19
- def in_memory
20
- {}
21
- end
16
+ protected
22
17
 
23
- end # RepositoryTestModule
18
+ attr_reader :model
24
19
 
25
- module DSL
20
+ end # DSL
26
21
 
27
- class ModelTestClass
22
+ end # ModelTestClass
28
23
 
29
- include Vedeu::DSL::Presentation
24
+ module RepositoryTestModule
30
25
 
31
- def initialize(model, client = nil)
32
- @model = model
33
- @client = client
34
- end
26
+ extend self
35
27
 
36
- protected
28
+ def by_name(name)
29
+ model
30
+ end
37
31
 
38
- attr_reader :model
32
+ # The real repository stores the model and returns it.
33
+ def store(model)
34
+ model
35
+ end
39
36
 
40
- end # ModelTestClass
37
+ private
41
38
 
42
- end # DSL
39
+ # A storage solution that uses memory to persist models.
40
+ def in_memory
41
+ {}
42
+ end
43
43
 
44
- class ModelTestClass
44
+ end # RepositoryTestModule
45
45
 
46
- include Vedeu::Model
47
- include Vedeu::Presentation
46
+ class ModelTestClass
48
47
 
49
- attr_accessor :background, :colour, :name, :style
48
+ include Vedeu::Repositories::Model
49
+ include Vedeu::Presentation
50
50
 
51
- def initialize(attributes = {})
52
- @attributes = defaults.merge!(attributes)
51
+ attr_accessor :background, :colour, :name, :style
53
52
 
54
- @attributes.each { |key, value| instance_variable_set("@#{key}", value) }
55
- end
53
+ def initialize(attributes = {})
54
+ defaults.merge!(attributes).each do |key, value|
55
+ instance_variable_set("@#{key}", value)
56
+ end
57
+ end
56
58
 
57
- private
59
+ private
60
+
61
+ # Returns the default options/attributes for this class.
62
+ #
63
+ def defaults
64
+ {
65
+ colour: {},
66
+ name: '',
67
+ repository: Vedeu::Repositories::RepositoryTestModule,
68
+ style: [],
69
+ }
70
+ end
58
71
 
59
- # Returns the default options/attributes for this class.
60
- #
61
- def defaults
62
- {
63
- colour: {},
64
- name: '',
65
- repository: Vedeu::RepositoryTestModule,
66
- style: [],
67
- }
68
- end
72
+ end # ModelTestClass
69
73
 
70
- end # ModelTestClass
74
+ end # Repositories
71
75
 
72
76
  end # Vedeu
data/test/test_helper.rb CHANGED
@@ -16,6 +16,7 @@ unless ENV['NO_SIMPLECOV']
16
16
  formatter SimpleCov::Formatter::Console if ENV['CONSOLE_COVERAGE']
17
17
  command_name 'MiniTest::Spec'
18
18
  add_filter '/test/'
19
+ add_group 'api', 'vedeu/api'
19
20
  add_group 'application', 'vedeu/application'
20
21
  add_group 'bindings', 'vedeu/bindings'
21
22
  add_group 'borders', 'vedeu/borders'
@@ -30,13 +31,12 @@ unless ENV['NO_SIMPLECOV']
30
31
  add_group 'events', 'vedeu/events'
31
32
  add_group 'geometry', 'vedeu/geometry'
32
33
  add_group 'input', 'vedeu/input'
33
- add_group 'log', 'vedeu/logging'
34
+ add_group 'logging', 'vedeu/logging'
34
35
  add_group 'menus', 'vedeu/menus'
35
36
  add_group 'models', 'vedeu/models'
36
37
  add_group 'null', 'vedeu/null'
37
38
  add_group 'output', 'vedeu/output'
38
39
  add_group 'plugins', 'vedeu/plugins'
39
- add_group 'refresh', 'vedeu/refresh'
40
40
  add_group 'repositories', 'vedeu/repositories'
41
41
  add_group 'runtime', 'vedeu/runtime'
42
42
  add_group 'templating', 'vedeu/templating'
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.10
4
+ version: 0.6.11
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-09-17 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -252,14 +252,17 @@ files:
252
252
  - docs/object_graph.md
253
253
  - lib/vedeu.rb
254
254
  - lib/vedeu/all.rb
255
+ - lib/vedeu/api/all.rb
255
256
  - lib/vedeu/api/external.rb
256
257
  - lib/vedeu/api/internal.rb
258
+ - lib/vedeu/application/all.rb
257
259
  - lib/vedeu/application/application_controller.rb
258
260
  - lib/vedeu/application/application_helper.rb
259
261
  - lib/vedeu/application/application_view.rb
260
262
  - lib/vedeu/application/controller.rb
261
263
  - lib/vedeu/application/helper.rb
262
264
  - lib/vedeu/application/view.rb
265
+ - lib/vedeu/bindings/all.rb
263
266
  - lib/vedeu/bindings/application.rb
264
267
  - lib/vedeu/bindings/bindings.rb
265
268
  - lib/vedeu/bindings/document.rb
@@ -297,6 +300,7 @@ files:
297
300
  - lib/vedeu/cursors/cursor.rb
298
301
  - lib/vedeu/cursors/refresh.rb
299
302
  - lib/vedeu/cursors/repository.rb
303
+ - lib/vedeu/distributed/all.rb
300
304
  - lib/vedeu/distributed/client.rb
301
305
  - lib/vedeu/distributed/server.rb
302
306
  - lib/vedeu/distributed/subprocess.rb
@@ -311,6 +315,7 @@ files:
311
315
  - lib/vedeu/distributed/templates/default_views.vedeu
312
316
  - lib/vedeu/distributed/test_application.rb
313
317
  - lib/vedeu/distributed/uri.rb
318
+ - lib/vedeu/dsl/all.rb
314
319
  - lib/vedeu/dsl/composition.rb
315
320
  - lib/vedeu/dsl/dsl.rb
316
321
  - lib/vedeu/dsl/group.rb
@@ -335,6 +340,7 @@ files:
335
340
  - lib/vedeu/editor/lines.rb
336
341
  - lib/vedeu/error.rb
337
342
  - lib/vedeu/esc/actions.rb
343
+ - lib/vedeu/esc/all.rb
338
344
  - lib/vedeu/esc/borders.rb
339
345
  - lib/vedeu/esc/colours.rb
340
346
  - lib/vedeu/esc/esc.rb
@@ -374,6 +380,7 @@ files:
374
380
  - lib/vedeu/menus/menu.rb
375
381
  - lib/vedeu/menus/null.rb
376
382
  - lib/vedeu/menus/repository.rb
383
+ - lib/vedeu/models/all.rb
377
384
  - lib/vedeu/models/cell.rb
378
385
  - lib/vedeu/models/escape.rb
379
386
  - lib/vedeu/models/focus.rb
@@ -395,6 +402,7 @@ files:
395
402
  - lib/vedeu/models/views/line.rb
396
403
  - lib/vedeu/models/views/stream.rb
397
404
  - lib/vedeu/models/views/view.rb
405
+ - lib/vedeu/null/all.rb
398
406
  - lib/vedeu/null/generic.rb
399
407
  - lib/vedeu/null/interface.rb
400
408
  - lib/vedeu/null/null.rb
@@ -409,7 +417,10 @@ files:
409
417
  - lib/vedeu/output/presentation/presentation.rb
410
418
  - lib/vedeu/output/presentation/style.rb
411
419
  - lib/vedeu/output/presentation/styles.rb
420
+ - lib/vedeu/output/refresh/refresh.rb
421
+ - lib/vedeu/output/refresh/refresh_group.rb
412
422
  - lib/vedeu/output/renderers.rb
423
+ - lib/vedeu/output/renderers/all.rb
413
424
  - lib/vedeu/output/renderers/escape_sequence.rb
414
425
  - lib/vedeu/output/renderers/file.rb
415
426
  - lib/vedeu/output/renderers/html.rb
@@ -422,16 +433,17 @@ files:
422
433
  - lib/vedeu/output/text.rb
423
434
  - lib/vedeu/output/viewport.rb
424
435
  - lib/vedeu/output/wordwrap.rb
436
+ - lib/vedeu/plugins/all.rb
425
437
  - lib/vedeu/plugins/plugin.rb
426
438
  - lib/vedeu/plugins/plugins.rb
427
- - lib/vedeu/refresh/refresh.rb
428
- - lib/vedeu/refresh/refresh_group.rb
439
+ - lib/vedeu/repositories/all.rb
429
440
  - lib/vedeu/repositories/collection.rb
430
441
  - lib/vedeu/repositories/model.rb
431
442
  - lib/vedeu/repositories/registerable.rb
432
443
  - lib/vedeu/repositories/repositories.rb
433
444
  - lib/vedeu/repositories/repository.rb
434
445
  - lib/vedeu/repositories/store.rb
446
+ - lib/vedeu/runtime/all.rb
435
447
  - lib/vedeu/runtime/application.rb
436
448
  - lib/vedeu/runtime/bootstrap.rb
437
449
  - lib/vedeu/runtime/flags.rb
@@ -445,11 +457,11 @@ files:
445
457
  - lib/vedeu/templating/helpers.rb
446
458
  - lib/vedeu/templating/template.rb
447
459
  - lib/vedeu/templating/view_template.rb
460
+ - lib/vedeu/terminal/all.rb
448
461
  - lib/vedeu/terminal/buffer.rb
449
462
  - lib/vedeu/terminal/mode.rb
450
463
  - lib/vedeu/terminal/terminal.rb
451
464
  - lib/vedeu/version.rb
452
- - out_
453
465
  - test/lib/vedeu/api/external_test.rb
454
466
  - test/lib/vedeu/api/internal_test.rb
455
467
  - test/lib/vedeu/application/application_controller_test.rb
@@ -587,6 +599,8 @@ files:
587
599
  - test/lib/vedeu/output/presentation/presentation_test.rb
588
600
  - test/lib/vedeu/output/presentation/style_test.rb
589
601
  - test/lib/vedeu/output/presentation/styles_test.rb
602
+ - test/lib/vedeu/output/refresh/refresh_group_test.rb
603
+ - test/lib/vedeu/output/refresh/refresh_test.rb
590
604
  - test/lib/vedeu/output/renderers/escape_sequence_test.rb
591
605
  - test/lib/vedeu/output/renderers/file_test.rb
592
606
  - test/lib/vedeu/output/renderers/html_test.rb
@@ -601,8 +615,6 @@ files:
601
615
  - test/lib/vedeu/output/wordwrap_test.rb
602
616
  - test/lib/vedeu/plugins/plugin_test.rb
603
617
  - test/lib/vedeu/plugins/plugins_test.rb
604
- - test/lib/vedeu/refresh/refresh_group_test.rb
605
- - test/lib/vedeu/refresh/refresh_test.rb
606
618
  - test/lib/vedeu/repositories/collection_test.rb
607
619
  - test/lib/vedeu/repositories/model_test.rb
608
620
  - test/lib/vedeu/repositories/registerable_test.rb
@@ -812,6 +824,8 @@ test_files:
812
824
  - test/lib/vedeu/output/presentation/presentation_test.rb
813
825
  - test/lib/vedeu/output/presentation/style_test.rb
814
826
  - test/lib/vedeu/output/presentation/styles_test.rb
827
+ - test/lib/vedeu/output/refresh/refresh_group_test.rb
828
+ - test/lib/vedeu/output/refresh/refresh_test.rb
815
829
  - test/lib/vedeu/output/renderers/escape_sequence_test.rb
816
830
  - test/lib/vedeu/output/renderers/file_test.rb
817
831
  - test/lib/vedeu/output/renderers/html_test.rb
@@ -826,8 +840,6 @@ test_files:
826
840
  - test/lib/vedeu/output/wordwrap_test.rb
827
841
  - test/lib/vedeu/plugins/plugin_test.rb
828
842
  - test/lib/vedeu/plugins/plugins_test.rb
829
- - test/lib/vedeu/refresh/refresh_group_test.rb
830
- - test/lib/vedeu/refresh/refresh_test.rb
831
843
  - test/lib/vedeu/repositories/collection_test.rb
832
844
  - test/lib/vedeu/repositories/model_test.rb
833
845
  - test/lib/vedeu/repositories/registerable_test.rb
@@ -1,31 +0,0 @@
1
- module Vedeu
2
-
3
- # @see Vedeu::Bindings::System#refresh!
4
- class Refresh
5
-
6
- # Refresh all registered interfaces.
7
- #
8
- # @return [Array<Vedeu::Models::Interface>]
9
- def self.all
10
- new.all
11
- end
12
-
13
- # Return a new instance of Vedeu::Refresh.
14
- #
15
- # @return [Vedeu::Refresh]
16
- def initialize; end
17
-
18
- # Refresh all registered interfaces.
19
- #
20
- # @return [Array<Vedeu::Models::Interface>]
21
- def all
22
- Vedeu.timer('Refreshing all') do
23
- Vedeu.interfaces.zindexed.each do |interface|
24
- Vedeu.trigger(:_refresh_, interface.name)
25
- end
26
- end
27
- end
28
-
29
- end # Refresh
30
-
31
- end # Vedeu
@@ -1,59 +0,0 @@
1
- module Vedeu
2
-
3
- # Refresh an interface, or collection of interfaces belonging to a group.
4
- #
5
- # The interfaces will be refreshed in z-index order, meaning that interfaces
6
- # with a lower z-index will be drawn first. This means overlapping interfaces
7
- # will be drawn as specified.
8
- #
9
- # @example
10
- # Vedeu.trigger(:_refresh_group_, group_name)
11
- #
12
- class RefreshGroup
13
-
14
- include Vedeu::Common
15
-
16
- # @param name [String] The name of the group to be refreshed.
17
- # @return [Array|Vedeu::Error::ModelNotFound] A collection of the names of
18
- # interfaces refreshed, or an exception when the group was not found.
19
- def self.by_name(name)
20
- new(name).by_name
21
- end
22
-
23
- # Return a new instance of Vedeu::RefreshGroup.
24
- #
25
- # @param name [String]
26
- # @return [Vedeu::RefreshGroup]
27
- def initialize(name)
28
- @name = name
29
- end
30
-
31
- # @return [void]
32
- def by_name
33
- Vedeu.timer("Refresh Group: '#{group_name}'") do
34
- Vedeu.groups.by_name(group_name).by_zindex.each do |name|
35
- Vedeu::Buffers::Refresh.by_name(name)
36
- end
37
- end
38
- end
39
-
40
- protected
41
-
42
- # @!attribute [r] name
43
- # @return [String]
44
- attr_reader :name
45
-
46
- private
47
-
48
- # @raise [Vedeu::Error::MissingRequired] When the name is empty or nil.
49
- # @return [String]
50
- def group_name
51
- return name if present?(name)
52
-
53
- fail Vedeu::Error::MissingRequired,
54
- 'Cannot refresh group with an empty group name.'
55
- end
56
-
57
- end # RefreshGroup
58
-
59
- end # Vedeu