vedeu 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/docs/events.md +0 -12
- data/examples/configuration_app.rb +1 -1
- data/lib/vedeu/all.rb +0 -1
- data/lib/vedeu/bindings.rb +18 -3
- data/lib/vedeu/buffers/display_buffer.rb +0 -22
- data/lib/vedeu/configuration/api.rb +8 -44
- data/lib/vedeu/configuration/cli.rb +6 -36
- data/lib/vedeu/configuration/configuration.rb +0 -4
- data/lib/vedeu/distributed/server.rb +4 -10
- data/lib/vedeu/dsl/components/keymap.rb +3 -5
- data/lib/vedeu/input/keymap.rb +22 -45
- data/lib/vedeu/main_loop.rb +2 -0
- data/lib/vedeu/models/focus.rb +1 -1
- data/lib/vedeu/models/geometry.rb +2 -2
- data/lib/vedeu/models/view/char.rb +1 -1
- data/lib/vedeu/models/view/composition.rb +1 -1
- data/lib/vedeu/models/view/interface.rb +4 -2
- data/lib/vedeu/models/view/line.rb +1 -2
- data/lib/vedeu/models/view/stream.rb +1 -1
- data/lib/vedeu/output/all.rb +8 -0
- data/lib/vedeu/{presentation → output}/background.rb +0 -0
- data/lib/vedeu/{presentation → output}/colour.rb +0 -0
- data/lib/vedeu/{presentation → output}/foreground.rb +1 -1
- data/lib/vedeu/output/html_renderer.rb +13 -30
- data/lib/vedeu/{presentation → output}/presentation.rb +0 -0
- data/lib/vedeu/{presentation → output}/style.rb +0 -0
- data/lib/vedeu/output/templates/html_renderer.vedeu +24 -0
- data/lib/vedeu/{presentation → output}/translator.rb +0 -0
- data/lib/vedeu/support/log.rb +1 -0
- data/test/integration/dsl/compositions_test.rb +0 -8
- data/test/integration/dsl/interfaces_test.rb +0 -68
- data/test/integration/dsl/keymaps_test.rb +0 -12
- data/test/integration/dsl/lines_test.rb +0 -42
- data/test/integration/dsl/streams_test.rb +0 -26
- data/test/integration/dsl/views_test.rb +0 -18
- data/test/lib/vedeu/api_test.rb +0 -97
- data/test/lib/vedeu/configuration/api_test.rb +3 -14
- data/test/lib/vedeu/configuration/cli_test.rb +0 -14
- data/test/lib/vedeu/cursor/cursor_test.rb +0 -2
- data/test/lib/vedeu/distributed/client_test.rb +0 -2
- data/test/lib/vedeu/distributed/test_application_test.rb +0 -1
- data/test/lib/vedeu/dsl/components/keymap_test.rb +1 -7
- data/test/lib/vedeu/dsl/components/menu_test.rb +0 -48
- data/test/lib/vedeu/dsl/interface_test.rb +1 -263
- data/test/lib/vedeu/dsl/shared/text_test.rb +0 -6
- data/test/lib/vedeu/dsl/stream_test.rb +0 -2
- data/test/lib/vedeu/events/event_test.rb +0 -1
- data/test/lib/vedeu/input/keymap_test.rb +8 -2
- data/test/lib/vedeu/input/mapper_test.rb +2 -2
- data/test/lib/vedeu/launcher_test.rb +0 -12
- data/test/lib/vedeu/main_loop_test.rb +0 -17
- data/test/lib/vedeu/models/focus_test.rb +59 -19
- data/test/lib/vedeu/models/geometry_test.rb +20 -26
- data/test/lib/vedeu/models/view/interface_test.rb +0 -27
- data/test/lib/vedeu/models/view/stream_test.rb +0 -1
- data/test/lib/vedeu/{presentation → output}/background_test.rb +0 -0
- data/test/lib/vedeu/{presentation → output}/colour_test.rb +0 -0
- data/test/lib/vedeu/output/compositor_test.rb +0 -5
- data/test/lib/vedeu/{presentation → output}/foreground_test.rb +0 -0
- data/test/lib/vedeu/output/html_renderer_test.rb +1 -0
- data/test/lib/vedeu/{presentation → output}/presentation_test.rb +0 -0
- data/test/lib/vedeu/{presentation → output}/style_test.rb +0 -0
- data/test/lib/vedeu/{presentation → output}/translator_test.rb +0 -0
- data/test/lib/vedeu/output/writer_test.rb +8 -21
- data/test/lib/vedeu/repositories/repository_test.rb +0 -24
- data/test/lib/vedeu/support/refresh_test.rb +0 -10
- data/test/support/helpers/model_test_class.rb +1 -1
- data/vedeu.gemspec +1 -1
- metadata +22 -22
- data/lib/vedeu/presentation/all.rb +0 -9
@@ -49,26 +49,34 @@ module Vedeu
|
|
49
49
|
end
|
50
50
|
|
51
51
|
describe '#y' do
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
subject { instance.y }
|
53
|
+
|
54
|
+
context 'when it is a proc' do
|
55
|
+
let(:attributes) { { y: proc { 17 } } }
|
56
|
+
|
57
|
+
it { subject.must_equal(17) }
|
55
58
|
end
|
56
59
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
+
context 'when just an attribute' do
|
61
|
+
let(:attributes) { { y: 19 } }
|
62
|
+
|
63
|
+
it { subject.must_equal(19) }
|
60
64
|
end
|
61
65
|
end
|
62
66
|
|
63
67
|
describe '#yn' do
|
64
|
-
|
65
|
-
|
66
|
-
|
68
|
+
subject { instance.yn }
|
69
|
+
|
70
|
+
context 'when it is a proc' do
|
71
|
+
let(:attributes) { { yn: proc { 17 } } }
|
72
|
+
|
73
|
+
it { subject.must_equal(17) }
|
67
74
|
end
|
68
75
|
|
69
|
-
|
70
|
-
|
71
|
-
|
76
|
+
context 'when just an attribute' do
|
77
|
+
let(:attributes) { { yn: 19 } }
|
78
|
+
|
79
|
+
it { subject.must_equal(19) }
|
72
80
|
end
|
73
81
|
end
|
74
82
|
|
@@ -307,20 +315,6 @@ module Vedeu
|
|
307
315
|
end
|
308
316
|
end
|
309
317
|
|
310
|
-
describe '#virtual_y' do
|
311
|
-
it 'returns the virtual y positions within the interfaces dimensions' do
|
312
|
-
geometry = Geometry.new({ height: 6, width: 6, x: 7, y: 5 })
|
313
|
-
geometry.virtual_y.must_equal([5, 6, 7, 8, 9, 10])
|
314
|
-
end
|
315
|
-
end
|
316
|
-
|
317
|
-
describe '#virtual_x' do
|
318
|
-
it 'returns the virtual x positions within the interfaces dimensions' do
|
319
|
-
geometry = Geometry.new({ height: 6, width: 6, x: 7, y: 5 })
|
320
|
-
geometry.virtual_x.must_equal([7, 8, 9, 10, 11, 12])
|
321
|
-
end
|
322
|
-
end
|
323
|
-
|
324
318
|
end # Geometry
|
325
319
|
|
326
320
|
end # Vedeu
|
@@ -83,33 +83,6 @@ module Vedeu
|
|
83
83
|
it { proc { subject }.must_raise(MissingRequired) }
|
84
84
|
end
|
85
85
|
|
86
|
-
# context 'when the interface has a name' do
|
87
|
-
# context 'when a buffer exists' do
|
88
|
-
# it { skip }
|
89
|
-
# end
|
90
|
-
|
91
|
-
# context 'when a buffer does not exist' do
|
92
|
-
# it { skip }
|
93
|
-
# end
|
94
|
-
|
95
|
-
# context 'when a refresh event exists' do
|
96
|
-
# it { skip }
|
97
|
-
# end
|
98
|
-
|
99
|
-
# context 'when a refresh event does not exist' do
|
100
|
-
# it { skip }
|
101
|
-
# end
|
102
|
-
|
103
|
-
# context 'when the interface has a group' do
|
104
|
-
# it { skip }
|
105
|
-
#
|
106
|
-
# context 'when the group exists' do
|
107
|
-
# end
|
108
|
-
#
|
109
|
-
# context 'when the group does not exist' do
|
110
|
-
# end
|
111
|
-
# end
|
112
|
-
# end
|
113
86
|
end
|
114
87
|
|
115
88
|
end # Interface
|
@@ -29,7 +29,6 @@ module Vedeu
|
|
29
29
|
|
30
30
|
describe '#initialize' do
|
31
31
|
it { instance.must_be_instance_of(described) }
|
32
|
-
# it { instance.instance_variable_get('@attributes').must_equal(attributes) }
|
33
32
|
it { instance.instance_variable_get('@value').must_equal(value) }
|
34
33
|
it { instance.instance_variable_get('@parent').must_equal(parent) }
|
35
34
|
it { instance.instance_variable_get('@colour').must_equal(colour) }
|
File without changes
|
File without changes
|
@@ -39,19 +39,14 @@ module Vedeu
|
|
39
39
|
describe '.compose' do
|
40
40
|
subject { described.compose(_name) }
|
41
41
|
|
42
|
-
# it { skip }
|
43
|
-
|
44
42
|
context 'when there is no content' do
|
45
|
-
# it { skip }
|
46
43
|
end
|
47
44
|
|
48
45
|
context 'when there is content' do
|
49
46
|
context 'when the view has redefined the geometry' do
|
50
|
-
# it { skip }
|
51
47
|
end
|
52
48
|
|
53
49
|
context 'when the view has not redefined the geometry' do
|
54
|
-
# it { skip }
|
55
50
|
end
|
56
51
|
end
|
57
52
|
end
|
File without changes
|
@@ -11,6 +11,7 @@ module Vedeu
|
|
11
11
|
describe '#initialize' do
|
12
12
|
it { instance.must_be_instance_of(Vedeu::HTMLRenderer) }
|
13
13
|
it { instance.instance_variable_get('@output').must_equal(output) }
|
14
|
+
it { instance.instance_variable_get('@object').must_be_instance_of(Vedeu::HTMLRenderer) }
|
14
15
|
end
|
15
16
|
|
16
17
|
describe '#render' do
|
File without changes
|
File without changes
|
File without changes
|
@@ -18,27 +18,14 @@ module Vedeu
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
# end
|
30
|
-
|
31
|
-
# describe '#+' do
|
32
|
-
# it 'returns the collection of writers' do
|
33
|
-
# skip
|
34
|
-
# end
|
35
|
-
# end
|
36
|
-
|
37
|
-
# describe '.write' do
|
38
|
-
# it 'not sure if this should be here' do
|
39
|
-
# skip
|
40
|
-
# end
|
41
|
-
# end
|
21
|
+
describe '#==' do
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#+' do
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '.write' do
|
28
|
+
end
|
42
29
|
|
43
30
|
end # Writer
|
44
31
|
|
@@ -45,30 +45,6 @@ module Vedeu
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
# describe '#current' do
|
49
|
-
# # before { Focus.stubs(:current).returns('francium') }
|
50
|
-
|
51
|
-
# subject { instance.current }
|
52
|
-
|
53
|
-
# it { Vedeu.focus.must_be_instance_of(NilClass) }
|
54
|
-
|
55
|
-
# context 'when the model exists' do
|
56
|
-
# # before { Cursor.new({ name: 'francium', state: false, x: 12, y: 4 }).store }
|
57
|
-
|
58
|
-
# # it 'has the same attributes it was stored with' do
|
59
|
-
# # subject.x.must_equal(12)
|
60
|
-
# # subject.y.must_equal(4)
|
61
|
-
# # end
|
62
|
-
# end
|
63
|
-
|
64
|
-
# context 'when the model does not exist' do
|
65
|
-
# # it 'is created, stored, and has the default attributes' do
|
66
|
-
# # subject.x.must_equal(1)
|
67
|
-
# # subject.y.must_equal(1)
|
68
|
-
# # end
|
69
|
-
# end
|
70
|
-
# end
|
71
|
-
|
72
48
|
describe '#each' do
|
73
49
|
subject { instance.each }
|
74
50
|
|
@@ -16,10 +16,6 @@ module Vedeu
|
|
16
16
|
context 'when there are no registered interfaces' do
|
17
17
|
it { subject.must_equal([]) }
|
18
18
|
end
|
19
|
-
|
20
|
-
# context 'when there are registered interfaces' do
|
21
|
-
# it { subject, ['hydrogen'.must_equal('helium']) }
|
22
|
-
# end
|
23
19
|
end
|
24
20
|
|
25
21
|
describe '.by_focus' do
|
@@ -32,9 +28,6 @@ module Vedeu
|
|
32
28
|
end
|
33
29
|
|
34
30
|
context 'when there are registered interfaces' do
|
35
|
-
# before { Vedeu.focusable.add('lead') }
|
36
|
-
|
37
|
-
# it { subject.must_equal('lead') }
|
38
31
|
end
|
39
32
|
end
|
40
33
|
|
@@ -61,9 +54,6 @@ module Vedeu
|
|
61
54
|
end
|
62
55
|
|
63
56
|
context 'when the interface or buffer is found' do
|
64
|
-
# it { subject.must_be_instance_of(Array) }
|
65
|
-
|
66
|
-
# it { skip }
|
67
57
|
end
|
68
58
|
end
|
69
59
|
|
data/vedeu.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'vedeu'
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.4.0'
|
8
8
|
spec.authors = ['Gavin Laking']
|
9
9
|
spec.email = ['gavinlaking@gmail.com']
|
10
10
|
spec.summary = %q{A terminal case of wonderland.}
|
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.
|
4
|
+
version: 0.4.0
|
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-02-
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|
@@ -369,25 +369,25 @@ files:
|
|
369
369
|
- lib/vedeu/models/view/stream.rb
|
370
370
|
- lib/vedeu/models/view/streams.rb
|
371
371
|
- lib/vedeu/output/all.rb
|
372
|
+
- lib/vedeu/output/background.rb
|
372
373
|
- lib/vedeu/output/border.rb
|
374
|
+
- lib/vedeu/output/colour.rb
|
373
375
|
- lib/vedeu/output/compositor.rb
|
376
|
+
- lib/vedeu/output/foreground.rb
|
374
377
|
- lib/vedeu/output/html_char.rb
|
375
378
|
- lib/vedeu/output/html_renderer.rb
|
376
379
|
- lib/vedeu/output/output.rb
|
377
380
|
- lib/vedeu/output/position_index.rb
|
381
|
+
- lib/vedeu/output/presentation.rb
|
378
382
|
- lib/vedeu/output/renderer.rb
|
383
|
+
- lib/vedeu/output/style.rb
|
384
|
+
- lib/vedeu/output/templates/html_renderer.vedeu
|
385
|
+
- lib/vedeu/output/translator.rb
|
379
386
|
- lib/vedeu/output/viewport.rb
|
380
387
|
- lib/vedeu/output/virtual_buffer.rb
|
381
388
|
- lib/vedeu/output/virtual_terminal.rb
|
382
389
|
- lib/vedeu/output/wordwrap.rb
|
383
390
|
- lib/vedeu/output/writer.rb
|
384
|
-
- lib/vedeu/presentation/all.rb
|
385
|
-
- lib/vedeu/presentation/background.rb
|
386
|
-
- lib/vedeu/presentation/colour.rb
|
387
|
-
- lib/vedeu/presentation/foreground.rb
|
388
|
-
- lib/vedeu/presentation/presentation.rb
|
389
|
-
- lib/vedeu/presentation/style.rb
|
390
|
-
- lib/vedeu/presentation/translator.rb
|
391
391
|
- lib/vedeu/repositories/all.rb
|
392
392
|
- lib/vedeu/repositories/repository.rb
|
393
393
|
- lib/vedeu/support/all.rb
|
@@ -474,24 +474,24 @@ files:
|
|
474
474
|
- test/lib/vedeu/models/view/lines_test.rb
|
475
475
|
- test/lib/vedeu/models/view/stream_test.rb
|
476
476
|
- test/lib/vedeu/models/view/streams_test.rb
|
477
|
+
- test/lib/vedeu/output/background_test.rb
|
477
478
|
- test/lib/vedeu/output/border_test.rb
|
479
|
+
- test/lib/vedeu/output/colour_test.rb
|
478
480
|
- test/lib/vedeu/output/compositor_test.rb
|
481
|
+
- test/lib/vedeu/output/foreground_test.rb
|
479
482
|
- test/lib/vedeu/output/html_char_test.rb
|
480
483
|
- test/lib/vedeu/output/html_renderer_test.rb
|
481
484
|
- test/lib/vedeu/output/output_test.rb
|
482
485
|
- test/lib/vedeu/output/position_index_test.rb
|
486
|
+
- test/lib/vedeu/output/presentation_test.rb
|
483
487
|
- test/lib/vedeu/output/renderer_test.rb
|
488
|
+
- test/lib/vedeu/output/style_test.rb
|
489
|
+
- test/lib/vedeu/output/translator_test.rb
|
484
490
|
- test/lib/vedeu/output/viewport_test.rb
|
485
491
|
- test/lib/vedeu/output/virtual_buffer_test.rb
|
486
492
|
- test/lib/vedeu/output/virtual_terminal_test.rb
|
487
493
|
- test/lib/vedeu/output/wordwrap_test.rb
|
488
494
|
- test/lib/vedeu/output/writer_test.rb
|
489
|
-
- test/lib/vedeu/presentation/background_test.rb
|
490
|
-
- test/lib/vedeu/presentation/colour_test.rb
|
491
|
-
- test/lib/vedeu/presentation/foreground_test.rb
|
492
|
-
- test/lib/vedeu/presentation/presentation_test.rb
|
493
|
-
- test/lib/vedeu/presentation/style_test.rb
|
494
|
-
- test/lib/vedeu/presentation/translator_test.rb
|
495
495
|
- test/lib/vedeu/repositories/all_test.rb
|
496
496
|
- test/lib/vedeu/repositories/repository_test.rb
|
497
497
|
- test/lib/vedeu/support/bounding_area_test.rb
|
@@ -546,7 +546,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
546
546
|
version: '0'
|
547
547
|
requirements: []
|
548
548
|
rubyforge_project:
|
549
|
-
rubygems_version: 2.4.
|
549
|
+
rubygems_version: 2.4.3
|
550
550
|
signing_key:
|
551
551
|
specification_version: 4
|
552
552
|
summary: A terminal case of wonderland.
|
@@ -613,24 +613,24 @@ test_files:
|
|
613
613
|
- test/lib/vedeu/models/view/lines_test.rb
|
614
614
|
- test/lib/vedeu/models/view/stream_test.rb
|
615
615
|
- test/lib/vedeu/models/view/streams_test.rb
|
616
|
+
- test/lib/vedeu/output/background_test.rb
|
616
617
|
- test/lib/vedeu/output/border_test.rb
|
618
|
+
- test/lib/vedeu/output/colour_test.rb
|
617
619
|
- test/lib/vedeu/output/compositor_test.rb
|
620
|
+
- test/lib/vedeu/output/foreground_test.rb
|
618
621
|
- test/lib/vedeu/output/html_char_test.rb
|
619
622
|
- test/lib/vedeu/output/html_renderer_test.rb
|
620
623
|
- test/lib/vedeu/output/output_test.rb
|
621
624
|
- test/lib/vedeu/output/position_index_test.rb
|
625
|
+
- test/lib/vedeu/output/presentation_test.rb
|
622
626
|
- test/lib/vedeu/output/renderer_test.rb
|
627
|
+
- test/lib/vedeu/output/style_test.rb
|
628
|
+
- test/lib/vedeu/output/translator_test.rb
|
623
629
|
- test/lib/vedeu/output/viewport_test.rb
|
624
630
|
- test/lib/vedeu/output/virtual_buffer_test.rb
|
625
631
|
- test/lib/vedeu/output/virtual_terminal_test.rb
|
626
632
|
- test/lib/vedeu/output/wordwrap_test.rb
|
627
633
|
- test/lib/vedeu/output/writer_test.rb
|
628
|
-
- test/lib/vedeu/presentation/background_test.rb
|
629
|
-
- test/lib/vedeu/presentation/colour_test.rb
|
630
|
-
- test/lib/vedeu/presentation/foreground_test.rb
|
631
|
-
- test/lib/vedeu/presentation/presentation_test.rb
|
632
|
-
- test/lib/vedeu/presentation/style_test.rb
|
633
|
-
- test/lib/vedeu/presentation/translator_test.rb
|
634
634
|
- test/lib/vedeu/repositories/all_test.rb
|
635
635
|
- test/lib/vedeu/repositories/repository_test.rb
|
636
636
|
- test/lib/vedeu/support/bounding_area_test.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
require 'vedeu/presentation/translator'
|
2
|
-
require 'vedeu/presentation/background'
|
3
|
-
require 'vedeu/presentation/colour'
|
4
|
-
require 'vedeu/presentation/foreground'
|
5
|
-
require 'vedeu/presentation/style'
|
6
|
-
require 'vedeu/presentation/presentation'
|
7
|
-
|
8
|
-
module Vedeu
|
9
|
-
end # Vedeu
|