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
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
|