vedeu 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vedeu/all.rb +17 -103
- data/lib/vedeu/api/all.rb +15 -0
- data/lib/vedeu/api/internal.rb +4 -0
- data/lib/vedeu/application/all.rb +6 -0
- data/lib/vedeu/bindings/all.rb +32 -0
- data/lib/vedeu/bindings/bindings.rb +0 -14
- data/lib/vedeu/bindings/refresh.rb +8 -2
- data/lib/vedeu/bindings/system.rb +1 -0
- data/lib/vedeu/borders/border.rb +1 -1
- data/lib/vedeu/borders/repository.rb +1 -1
- data/lib/vedeu/buffers/buffer.rb +2 -4
- data/lib/vedeu/buffers/repository.rb +1 -1
- data/lib/vedeu/colours/background.rb +1 -1
- data/lib/vedeu/colours/backgrounds.rb +1 -1
- data/lib/vedeu/colours/foreground.rb +1 -1
- data/lib/vedeu/colours/foregrounds.rb +1 -1
- data/lib/vedeu/colours/translator.rb +4 -3
- data/lib/vedeu/configuration/api.rb +2 -1
- data/lib/vedeu/configuration/cli.rb +1 -1
- data/lib/vedeu/cursors/cursor.rb +26 -26
- data/lib/vedeu/cursors/repository.rb +1 -1
- data/lib/vedeu/distributed/all.rb +16 -0
- data/lib/vedeu/distributed/test_application.rb +3 -3
- data/lib/vedeu/dsl/all.rb +22 -0
- data/lib/vedeu/dsl/composition.rb +43 -40
- data/lib/vedeu/dsl/dsl.rb +6 -3
- data/lib/vedeu/dsl/group.rb +23 -16
- data/lib/vedeu/dsl/interface.rb +48 -38
- data/lib/vedeu/dsl/keymap.rb +6 -7
- data/lib/vedeu/dsl/line.rb +6 -3
- data/lib/vedeu/dsl/stream.rb +2 -1
- data/lib/vedeu/editor/cursor.rb +1 -3
- data/lib/vedeu/editor/document.rb +4 -5
- data/lib/vedeu/editor/documents.rb +1 -1
- data/lib/vedeu/editor/line.rb +2 -3
- data/lib/vedeu/editor/lines.rb +2 -3
- data/lib/vedeu/esc/all.rb +14 -0
- data/lib/vedeu/esc/colours.rb +8 -4
- data/lib/vedeu/esc/esc.rb +89 -84
- data/lib/vedeu/events/aliases.rb +1 -2
- data/lib/vedeu/events/collection.rb +1 -1
- data/lib/vedeu/events/event.rb +1 -1
- data/lib/vedeu/events/repository.rb +1 -1
- data/lib/vedeu/events/trigger.rb +11 -9
- data/lib/vedeu/geometry/dimension.rb +1 -3
- data/lib/vedeu/geometry/generic_coordinate.rb +1 -3
- data/lib/vedeu/geometry/geometry.rb +1 -1
- data/lib/vedeu/geometry/repository.rb +3 -3
- data/lib/vedeu/input/all.rb +3 -0
- data/lib/vedeu/input/keymap.rb +10 -11
- data/lib/vedeu/input/keymaps.rb +1 -1
- data/lib/vedeu/input/keys.rb +1 -1
- data/lib/vedeu/input/mapper.rb +14 -12
- data/lib/vedeu/logging/all.rb +3 -0
- data/lib/vedeu/logging/log.rb +4 -2
- data/lib/vedeu/menus/menu.rb +2 -4
- data/lib/vedeu/menus/repository.rb +1 -1
- data/lib/vedeu/models/all.rb +15 -0
- data/lib/vedeu/models/cell.rb +1 -1
- data/lib/vedeu/models/escape.rb +1 -1
- data/lib/vedeu/models/group.rb +4 -3
- data/lib/vedeu/models/groups.rb +1 -1
- data/lib/vedeu/models/interface.rb +1 -1
- data/lib/vedeu/models/interfaces.rb +1 -1
- data/lib/vedeu/models/views/char.rb +1 -1
- data/lib/vedeu/models/views/collections/chars.rb +1 -1
- data/lib/vedeu/models/views/collections/lines.rb +1 -1
- data/lib/vedeu/models/views/collections/streams.rb +1 -1
- data/lib/vedeu/models/views/collections/view_collection.rb +1 -1
- data/lib/vedeu/models/views/composition.rb +1 -1
- data/lib/vedeu/models/views/line.rb +8 -6
- data/lib/vedeu/models/views/stream.rb +1 -1
- data/lib/vedeu/models/views/view.rb +1 -1
- data/lib/vedeu/null/all.rb +12 -0
- data/lib/vedeu/output/clear/named_group.rb +2 -1
- data/lib/vedeu/output/clear/named_interface.rb +5 -4
- data/lib/vedeu/output/compressor.rb +1 -0
- data/lib/vedeu/output/output.rb +3 -0
- data/lib/vedeu/output/presentation/colour.rb +10 -10
- data/lib/vedeu/output/presentation/presentation.rb +9 -9
- data/lib/vedeu/output/presentation/style.rb +2 -2
- data/lib/vedeu/output/refresh/refresh.rb +35 -0
- data/lib/vedeu/output/refresh/refresh_group.rb +66 -0
- data/lib/vedeu/output/renderers/all.rb +17 -0
- data/lib/vedeu/output/renderers/escape_sequence.rb +4 -2
- data/lib/vedeu/output/renderers/file.rb +7 -6
- data/lib/vedeu/output/renderers/html.rb +9 -7
- data/lib/vedeu/output/renderers/null.rb +1 -1
- data/lib/vedeu/output/renderers/renderer_options.rb +24 -20
- data/lib/vedeu/output/renderers/terminal.rb +1 -1
- data/lib/vedeu/output/renderers/text.rb +1 -1
- data/lib/vedeu/output/wordwrap.rb +7 -4
- data/lib/vedeu/plugins/all.rb +2 -0
- data/lib/vedeu/repositories/all.rb +16 -0
- data/lib/vedeu/repositories/collection.rb +93 -89
- data/lib/vedeu/repositories/model.rb +113 -102
- data/lib/vedeu/repositories/registerable.rb +60 -56
- data/lib/vedeu/repositories/repository.rb +161 -156
- data/lib/vedeu/repositories/store.rb +70 -66
- data/lib/vedeu/runtime/all.rb +15 -0
- data/lib/vedeu/runtime/launcher.rb +19 -16
- data/lib/vedeu/templating/all.rb +6 -0
- data/lib/vedeu/terminal/all.rb +14 -0
- data/lib/vedeu/terminal/buffer.rb +8 -7
- data/lib/vedeu/terminal/mode.rb +11 -10
- data/lib/vedeu/terminal/terminal.rb +50 -45
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/cursors/cursor_test.rb +4 -2
- data/test/lib/vedeu/editor/cursor_test.rb +0 -3
- data/test/lib/vedeu/esc/esc_test.rb +58 -54
- data/test/lib/vedeu/events/collection_test.rb +1 -1
- data/test/lib/vedeu/input/keys_test.rb +1 -1
- data/test/lib/vedeu/input/mapper_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/chars_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/lines_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/streams_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/view_collection_test.rb +1 -1
- data/test/lib/vedeu/output/refresh/refresh_group_test.rb +43 -0
- data/test/lib/vedeu/output/refresh/refresh_test.rb +50 -0
- data/test/lib/vedeu/output/renderers/renderer_options_test.rb +8 -4
- data/test/lib/vedeu/output/renderers_test.rb +2 -1
- data/test/lib/vedeu/repositories/collection_test.rb +105 -101
- data/test/lib/vedeu/repositories/model_test.rb +56 -52
- data/test/lib/vedeu/repositories/registerable_test.rb +36 -32
- data/test/lib/vedeu/repositories/repository_test.rb +178 -174
- data/test/lib/vedeu/repositories/store_test.rb +109 -105
- data/test/support/examples/material_colours_app.rb +0 -1
- data/test/support/helpers/model_test_class.rb +50 -46
- data/test/test_helper.rb +2 -2
- metadata +21 -9
- data/lib/vedeu/refresh/refresh.rb +0 -31
- data/lib/vedeu/refresh/refresh_group.rb +0 -59
- data/out_ +0 -50
- data/test/lib/vedeu/refresh/refresh_group_test.rb +0 -39
- 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
|
-
|
6
|
-
include Vedeu::Store
|
5
|
+
module Repositories
|
7
6
|
|
8
|
-
|
7
|
+
class StoreTestClass
|
8
|
+
include Vedeu::Repositories::Store
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
attr_reader :model
|
11
|
+
|
12
|
+
def initialize(model = nil, storage = {})
|
13
|
+
@model = model
|
14
|
+
@storage = storage
|
15
|
+
end
|
14
16
|
|
15
|
-
|
17
|
+
private
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
+
def in_memory
|
20
|
+
{}
|
21
|
+
end
|
19
22
|
end
|
20
|
-
end
|
21
23
|
|
22
|
-
|
24
|
+
describe Store do
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
let(:described) { Vedeu::Repositories::Store }
|
27
|
+
let(:instance) { Vedeu::Repositories::StoreTestClass.new(model, storage) }
|
28
|
+
let(:model) {}
|
29
|
+
let(:storage) {}
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
+
describe '#each' do
|
32
|
+
subject { instance.each }
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
+
it { subject.must_be_instance_of(Enumerator) }
|
35
|
+
end
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
+
describe '#empty?' do
|
38
|
+
subject { instance.empty? }
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
context 'when empty' do
|
41
|
+
it { subject.must_equal(true) }
|
42
|
+
end
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
+
context 'when not empty' do
|
45
|
+
let(:storage) { [:item] }
|
44
46
|
|
45
|
-
|
47
|
+
it { subject.must_equal(false) }
|
48
|
+
end
|
46
49
|
end
|
47
|
-
end
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
+
describe '#exists?' do
|
52
|
+
let(:_name) {}
|
51
53
|
|
52
|
-
|
54
|
+
subject { instance.exists?(_name) }
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
+
context 'when empty' do
|
57
|
+
let(:_name) { 'terbium' }
|
56
58
|
|
57
|
-
|
58
|
-
|
59
|
+
it { subject.must_equal(false) }
|
60
|
+
end
|
59
61
|
|
60
|
-
|
61
|
-
|
62
|
-
|
62
|
+
context 'with no name' do
|
63
|
+
it { subject.must_equal(false) }
|
64
|
+
end
|
63
65
|
|
64
|
-
|
65
|
-
|
66
|
+
context 'with empty name' do
|
67
|
+
let(:_name) { '' }
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
+
it { subject.must_equal(false) }
|
70
|
+
end
|
69
71
|
|
70
|
-
|
71
|
-
|
72
|
-
|
72
|
+
context 'when the model does not exist' do
|
73
|
+
let(:storage) { { 'samarium' => [:some_model_data] } }
|
74
|
+
let(:_name) { 'terbium' }
|
73
75
|
|
74
|
-
|
75
|
-
|
76
|
+
it { subject.must_equal(false) }
|
77
|
+
end
|
76
78
|
|
77
|
-
|
78
|
-
|
79
|
-
|
79
|
+
context 'when the model exists' do
|
80
|
+
let(:storage) { { 'samarium' => [:some_model_data] } }
|
81
|
+
let(:_name) { 'samarium' }
|
80
82
|
|
81
|
-
|
82
|
-
|
83
|
+
it { subject.must_equal(true) }
|
84
|
+
end
|
83
85
|
|
84
|
-
|
85
|
-
|
86
|
+
it { instance.must_respond_to(:registered?) }
|
87
|
+
end
|
86
88
|
|
87
|
-
|
88
|
-
|
89
|
+
describe '#registered' do
|
90
|
+
subject { instance.registered }
|
89
91
|
|
90
|
-
|
92
|
+
it { subject.must_be_instance_of(Array) }
|
91
93
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
94
|
+
context 'when the storage is a Hash' do
|
95
|
+
let(:storage) {
|
96
|
+
{
|
97
|
+
'rutherfordium' => { name: 'rutherfordium' }
|
98
|
+
}
|
96
99
|
}
|
97
|
-
}
|
98
100
|
|
99
|
-
|
100
|
-
|
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
|
-
|
105
|
-
|
106
|
+
context 'when the storage is an Array' do
|
107
|
+
let(:storage) { ['rutherfordium'] }
|
106
108
|
|
107
|
-
|
108
|
-
|
109
|
+
it 'returns the registered entities' do
|
110
|
+
subject.must_equal(['rutherfordium'])
|
111
|
+
end
|
109
112
|
end
|
110
|
-
end
|
111
113
|
|
112
|
-
|
113
|
-
|
114
|
+
context 'when the storage is a Set' do
|
115
|
+
let(:storage) { Set['rutherfordium'] }
|
114
116
|
|
115
|
-
|
116
|
-
|
117
|
+
it 'returns the registered entities' do
|
118
|
+
subject.must_equal(['rutherfordium'])
|
119
|
+
end
|
117
120
|
end
|
118
|
-
end
|
119
121
|
|
120
|
-
|
121
|
-
|
122
|
-
|
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
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
129
|
+
describe '#reset' do
|
130
|
+
it 'returns a Hash' do
|
131
|
+
instance.reset.must_be_instance_of(Hash)
|
132
|
+
end
|
131
133
|
|
132
|
-
|
133
|
-
|
134
|
-
|
134
|
+
it 'resets the repository' do
|
135
|
+
instance.reset.must_equal({})
|
136
|
+
end
|
135
137
|
|
136
|
-
|
137
|
-
|
138
|
-
|
138
|
+
it { instance.must_respond_to(:reset!) }
|
139
|
+
it { instance.must_respond_to(:clear) }
|
140
|
+
end
|
139
141
|
|
140
|
-
|
141
|
-
|
142
|
+
describe '#size' do
|
143
|
+
subject { instance.size }
|
142
144
|
|
143
|
-
|
144
|
-
|
145
|
-
|
145
|
+
context 'when empty' do
|
146
|
+
it { subject.must_equal(0) }
|
147
|
+
end
|
146
148
|
|
147
|
-
|
148
|
-
|
149
|
+
context 'when not empty' do
|
150
|
+
let(:storage) { [:item] }
|
149
151
|
|
150
|
-
|
152
|
+
it { subject.must_equal(1) }
|
153
|
+
end
|
151
154
|
end
|
152
|
-
end
|
153
155
|
|
154
|
-
|
155
|
-
|
156
|
+
describe '#storage' do
|
157
|
+
subject { instance.storage }
|
156
158
|
|
157
|
-
|
159
|
+
it { subject.must_equal({}) }
|
158
160
|
|
159
|
-
|
160
|
-
|
161
|
+
it { instance.must_respond_to(:all) }
|
162
|
+
end
|
163
|
+
|
164
|
+
end # Store
|
161
165
|
|
162
|
-
end #
|
166
|
+
end # Repositories
|
163
167
|
|
164
168
|
end # Vedeu
|
@@ -1,72 +1,76 @@
|
|
1
1
|
module Vedeu
|
2
2
|
|
3
|
-
module
|
3
|
+
module Repositories
|
4
4
|
|
5
|
-
|
5
|
+
module DSL
|
6
6
|
|
7
|
-
|
8
|
-
model
|
9
|
-
end
|
7
|
+
class ModelTestClass
|
10
8
|
|
11
|
-
|
12
|
-
def store(model)
|
13
|
-
model
|
14
|
-
end
|
9
|
+
include Vedeu::DSL::Presentation
|
15
10
|
|
16
|
-
|
11
|
+
def initialize(model, client = nil)
|
12
|
+
@model = model
|
13
|
+
@client = client
|
14
|
+
end
|
17
15
|
|
18
|
-
|
19
|
-
def in_memory
|
20
|
-
{}
|
21
|
-
end
|
16
|
+
protected
|
22
17
|
|
23
|
-
|
18
|
+
attr_reader :model
|
24
19
|
|
25
|
-
|
20
|
+
end # DSL
|
26
21
|
|
27
|
-
|
22
|
+
end # ModelTestClass
|
28
23
|
|
29
|
-
|
24
|
+
module RepositoryTestModule
|
30
25
|
|
31
|
-
|
32
|
-
@model = model
|
33
|
-
@client = client
|
34
|
-
end
|
26
|
+
extend self
|
35
27
|
|
36
|
-
|
28
|
+
def by_name(name)
|
29
|
+
model
|
30
|
+
end
|
37
31
|
|
38
|
-
|
32
|
+
# The real repository stores the model and returns it.
|
33
|
+
def store(model)
|
34
|
+
model
|
35
|
+
end
|
39
36
|
|
40
|
-
|
37
|
+
private
|
41
38
|
|
42
|
-
|
39
|
+
# A storage solution that uses memory to persist models.
|
40
|
+
def in_memory
|
41
|
+
{}
|
42
|
+
end
|
43
43
|
|
44
|
-
|
44
|
+
end # RepositoryTestModule
|
45
45
|
|
46
|
-
|
47
|
-
include Vedeu::Presentation
|
46
|
+
class ModelTestClass
|
48
47
|
|
49
|
-
|
48
|
+
include Vedeu::Repositories::Model
|
49
|
+
include Vedeu::Presentation
|
50
50
|
|
51
|
-
|
52
|
-
@attributes = defaults.merge!(attributes)
|
51
|
+
attr_accessor :background, :colour, :name, :style
|
53
52
|
|
54
|
-
|
55
|
-
|
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
|
-
|
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
|
-
#
|
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 #
|
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 '
|
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.
|
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-
|
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/
|
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
|