vedeu 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/dsl/by_method/focus_by_name.md +6 -1
- data/docs/dsl/by_method/focus_next.md +7 -0
- data/docs/dsl/by_method/focus_previous.md +7 -0
- data/docs/events/by_name/mouse_event.md +8 -0
- data/lib/vedeu.rb +12 -0
- data/lib/vedeu/all.rb +2 -0
- data/lib/vedeu/application/controller.rb +2 -6
- data/lib/vedeu/buffers/empty.rb +2 -1
- data/lib/vedeu/cells/borders/vertices/bottom_left.rb +1 -1
- data/lib/vedeu/cells/borders/vertices/bottom_right.rb +1 -1
- data/lib/vedeu/cells/borders/vertices/top_left.rb +1 -1
- data/lib/vedeu/cells/borders/vertices/top_right.rb +1 -1
- data/lib/vedeu/cells/char.rb +2 -6
- data/lib/vedeu/cells/cursor.rb +1 -1
- data/lib/vedeu/cells/support/html.rb +6 -18
- data/lib/vedeu/coercers/all.rb +18 -1
- data/lib/vedeu/coercers/chars.rb +29 -0
- data/lib/vedeu/coercers/coercer.rb +59 -0
- data/lib/vedeu/coercers/colour.rb +15 -33
- data/lib/vedeu/coercers/colour_attributes.rb +8 -3
- data/lib/vedeu/coercers/editor_line.rb +36 -0
- data/lib/vedeu/coercers/editor_lines.rb +36 -0
- data/lib/vedeu/coercers/lines.rb +36 -0
- data/lib/vedeu/coercers/page.rb +52 -0
- data/lib/vedeu/coercers/position.rb +69 -0
- data/lib/vedeu/coercers/row.rb +43 -0
- data/lib/vedeu/coercers/streams.rb +29 -0
- data/lib/vedeu/coercers/style.rb +54 -0
- data/lib/vedeu/configuration/api.rb +10 -0
- data/lib/vedeu/configuration/configuration.rb +11 -0
- data/lib/vedeu/cursors/coordinate.rb +41 -66
- data/lib/vedeu/cursors/cursor.rb +4 -4
- data/lib/vedeu/cursors/reposition.rb +3 -3
- data/lib/vedeu/dsl/border.rb +2 -39
- data/lib/vedeu/dsl/elements.rb +5 -6
- data/lib/vedeu/dsl/geometry.rb +3 -12
- data/lib/vedeu/editor/cropper.rb +2 -1
- data/lib/vedeu/error.rb +4 -0
- data/lib/vedeu/geometries/position.rb +14 -27
- data/lib/vedeu/input/mouse.rb +14 -5
- data/lib/vedeu/input/read.rb +1 -11
- data/lib/vedeu/interfaces/clear.rb +2 -1
- data/lib/vedeu/logging/log.rb +1 -1
- data/lib/vedeu/models/page.rb +5 -23
- data/lib/vedeu/models/row.rb +5 -14
- data/lib/vedeu/models/toggleable.rb +2 -7
- data/lib/vedeu/plugins/plugin.rb +1 -0
- data/lib/vedeu/presentation/style.rb +4 -20
- data/lib/vedeu/renderers/all.rb +24 -10
- data/lib/vedeu/repositories/model.rb +2 -8
- data/lib/vedeu/repositories/registerable.rb +4 -9
- data/lib/vedeu/runtime/application.rb +2 -0
- data/lib/vedeu/runtime/flags.rb +2 -0
- data/lib/vedeu/runtime/router.rb +2 -0
- data/lib/vedeu/support/point.rb +9 -7
- data/lib/vedeu/support/x_coordinate.rb +57 -0
- data/lib/vedeu/support/y_coordinate.rb +57 -0
- data/lib/vedeu/terminal/terminal.rb +2 -0
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/value.rb +3 -12
- data/test/lib/vedeu/coercers/chars_test.rb +33 -0
- data/test/lib/vedeu/coercers/coercer_test.rb +34 -0
- data/test/lib/vedeu/coercers/colour_test.rb +9 -7
- data/test/lib/vedeu/coercers/editor_line_test.rb +40 -0
- data/test/lib/vedeu/coercers/editor_lines_test.rb +40 -0
- data/test/lib/vedeu/coercers/lines_test.rb +40 -0
- data/test/lib/vedeu/coercers/page_test.rb +150 -0
- data/test/lib/vedeu/coercers/position_test.rb +76 -0
- data/test/lib/vedeu/coercers/row_test.rb +64 -0
- data/test/lib/vedeu/coercers/streams_test.rb +33 -0
- data/test/lib/vedeu/coercers/style_test.rb +62 -0
- data/test/lib/vedeu/cursors/coordinate_test.rb +11 -12
- data/test/lib/vedeu/geometries/position_test.rb +10 -54
- data/test/lib/vedeu/input/capture_test.rb +1 -1
- data/test/lib/vedeu/models/page_test.rb +4 -116
- data/test/lib/vedeu/models/row_test.rb +1 -31
- data/test/lib/vedeu/presentation/style_test.rb +4 -38
- data/test/lib/vedeu/renderers/all_test.rb +6 -0
- data/test/lib/vedeu/support/point_test.rb +13 -1
- data/test/lib/vedeu/support/x_coordinate_test.rb +64 -0
- data/test/lib/vedeu/support/y_coordinate_test.rb +64 -0
- data/test/support/examples/material_colours_app.rb +1 -0
- data/vedeu.gemspec +1 -1
- metadata +41 -4
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
module Vedeu
|
6
|
+
|
7
|
+
describe XCoordinate do
|
8
|
+
|
9
|
+
let(:described) { Vedeu::XCoordinate }
|
10
|
+
let(:instance) { described.new(geometry) }
|
11
|
+
let(:geometry) {}
|
12
|
+
|
13
|
+
describe '#initialize' do
|
14
|
+
it { instance.must_be_instance_of(described) }
|
15
|
+
it { instance.instance_variable_get("@geometry").must_equal(geometry) }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#d' do
|
19
|
+
subject { instance.d }
|
20
|
+
|
21
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
22
|
+
# it { subject.must_equal() }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#x' do
|
26
|
+
it { instance.must_respond_to(:x) }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#bd' do
|
30
|
+
subject { instance.bd }
|
31
|
+
|
32
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
33
|
+
# it { subject.must_equal() }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '#bx' do
|
37
|
+
it { instance.must_respond_to(:bx) }
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#bdn' do
|
41
|
+
subject { instance.bdn }
|
42
|
+
|
43
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
44
|
+
# it { subject.must_equal() }
|
45
|
+
end
|
46
|
+
|
47
|
+
describe '#bxn' do
|
48
|
+
it { instance.must_respond_to(:bxn) }
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '#d_dn' do
|
52
|
+
subject { instance.d_dn }
|
53
|
+
|
54
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
55
|
+
# it { subject.must_equal() }
|
56
|
+
end
|
57
|
+
|
58
|
+
describe '#bordered_width' do
|
59
|
+
it { instance.must_respond_to(:bordered_width) }
|
60
|
+
end
|
61
|
+
|
62
|
+
end # XCoordinate
|
63
|
+
|
64
|
+
end # Vedeu
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
module Vedeu
|
6
|
+
|
7
|
+
describe YCoordinate do
|
8
|
+
|
9
|
+
let(:described) { Vedeu::YCoordinate }
|
10
|
+
let(:instance) { described.new(geometry) }
|
11
|
+
let(:geometry) {}
|
12
|
+
|
13
|
+
describe '#initialize' do
|
14
|
+
it { instance.must_be_instance_of(described) }
|
15
|
+
it { instance.instance_variable_get("@geometry").must_equal(geometry) }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#d' do
|
19
|
+
subject { instance.d }
|
20
|
+
|
21
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
22
|
+
# it { subject.must_equal() }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#y' do
|
26
|
+
it { instance.must_respond_to(:y) }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#bd' do
|
30
|
+
subject { instance.bd }
|
31
|
+
|
32
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
33
|
+
# it { subject.must_equal() }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '#by' do
|
37
|
+
it { instance.must_respond_to(:by) }
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#bdn' do
|
41
|
+
subject { instance.bdn }
|
42
|
+
|
43
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
44
|
+
# it { subject.must_equal() }
|
45
|
+
end
|
46
|
+
|
47
|
+
describe '#byn' do
|
48
|
+
it { instance.must_respond_to(:byn) }
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '#d_dn' do
|
52
|
+
subject { instance.d_dn }
|
53
|
+
|
54
|
+
# it { subject.must_be_instance_of(Fixnum) }
|
55
|
+
# it { subject.must_equal() }
|
56
|
+
end
|
57
|
+
|
58
|
+
describe '#bordered_height' do
|
59
|
+
it { instance.must_respond_to(:bordered_height) }
|
60
|
+
end
|
61
|
+
|
62
|
+
end # YCoordinate
|
63
|
+
|
64
|
+
end # Vedeu
|
data/vedeu.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency 'guard', '2.13.0'
|
24
24
|
spec.add_development_dependency 'guard-minitest', '2.4.4'
|
25
25
|
spec.add_development_dependency 'guard-rubocop', '1.2.0'
|
26
|
-
spec.add_development_dependency 'minitest', '5.8.
|
26
|
+
spec.add_development_dependency 'minitest', '5.8.4'
|
27
27
|
spec.add_development_dependency 'minitest-reporters', '1.1.7'
|
28
28
|
spec.add_development_dependency 'mocha', '1.1.0'
|
29
29
|
spec.add_development_dependency 'rubocop', '0.36.0'
|
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.8.
|
4
|
+
version: 0.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Laking
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 5.8.
|
61
|
+
version: 5.8.4
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 5.8.
|
68
|
+
version: 5.8.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest-reporters
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -435,6 +435,7 @@ files:
|
|
435
435
|
- docs/events/by_name/menu_top.md
|
436
436
|
- docs/events/by_name/menu_view.md
|
437
437
|
- docs/events/by_name/mode_switch.md
|
438
|
+
- docs/events/by_name/mouse_event.md
|
438
439
|
- docs/events/by_name/movement_refresh.md
|
439
440
|
- docs/events/by_name/refresh.md
|
440
441
|
- docs/events/by_name/refresh_border.md
|
@@ -604,9 +605,19 @@ files:
|
|
604
605
|
- lib/vedeu/cells/support/html.rb
|
605
606
|
- lib/vedeu/coercers/alignment.rb
|
606
607
|
- lib/vedeu/coercers/all.rb
|
608
|
+
- lib/vedeu/coercers/chars.rb
|
609
|
+
- lib/vedeu/coercers/coercer.rb
|
607
610
|
- lib/vedeu/coercers/colour.rb
|
608
611
|
- lib/vedeu/coercers/colour_attributes.rb
|
612
|
+
- lib/vedeu/coercers/editor_line.rb
|
613
|
+
- lib/vedeu/coercers/editor_lines.rb
|
609
614
|
- lib/vedeu/coercers/horizontal_alignment.rb
|
615
|
+
- lib/vedeu/coercers/lines.rb
|
616
|
+
- lib/vedeu/coercers/page.rb
|
617
|
+
- lib/vedeu/coercers/position.rb
|
618
|
+
- lib/vedeu/coercers/row.rb
|
619
|
+
- lib/vedeu/coercers/streams.rb
|
620
|
+
- lib/vedeu/coercers/style.rb
|
610
621
|
- lib/vedeu/coercers/vertical_alignment.rb
|
611
622
|
- lib/vedeu/colours/all.rb
|
612
623
|
- lib/vedeu/colours/background.rb
|
@@ -788,6 +799,8 @@ files:
|
|
788
799
|
- lib/vedeu/runtime/traps.rb
|
789
800
|
- lib/vedeu/sentence.rb
|
790
801
|
- lib/vedeu/support/point.rb
|
802
|
+
- lib/vedeu/support/x_coordinate.rb
|
803
|
+
- lib/vedeu/support/y_coordinate.rb
|
791
804
|
- lib/vedeu/templating/all.rb
|
792
805
|
- lib/vedeu/templating/decoder.rb
|
793
806
|
- lib/vedeu/templating/encoder.rb
|
@@ -848,9 +861,19 @@ files:
|
|
848
861
|
- test/lib/vedeu/cells/escape_test.rb
|
849
862
|
- test/lib/vedeu/cells/support/html_test.rb
|
850
863
|
- test/lib/vedeu/coercers/alignment_test.rb
|
864
|
+
- test/lib/vedeu/coercers/chars_test.rb
|
865
|
+
- test/lib/vedeu/coercers/coercer_test.rb
|
851
866
|
- test/lib/vedeu/coercers/colour_attributes_test.rb
|
852
867
|
- test/lib/vedeu/coercers/colour_test.rb
|
868
|
+
- test/lib/vedeu/coercers/editor_line_test.rb
|
869
|
+
- test/lib/vedeu/coercers/editor_lines_test.rb
|
853
870
|
- test/lib/vedeu/coercers/horizontal_alignment_test.rb
|
871
|
+
- test/lib/vedeu/coercers/lines_test.rb
|
872
|
+
- test/lib/vedeu/coercers/page_test.rb
|
873
|
+
- test/lib/vedeu/coercers/position_test.rb
|
874
|
+
- test/lib/vedeu/coercers/row_test.rb
|
875
|
+
- test/lib/vedeu/coercers/streams_test.rb
|
876
|
+
- test/lib/vedeu/coercers/style_test.rb
|
854
877
|
- test/lib/vedeu/coercers/vertical_alignment_test.rb
|
855
878
|
- test/lib/vedeu/colours/background_test.rb
|
856
879
|
- test/lib/vedeu/colours/backgrounds_test.rb
|
@@ -997,6 +1020,8 @@ files:
|
|
997
1020
|
- test/lib/vedeu/runtime/traps_test.rb
|
998
1021
|
- test/lib/vedeu/sentence_test.rb
|
999
1022
|
- test/lib/vedeu/support/point_test.rb
|
1023
|
+
- test/lib/vedeu/support/x_coordinate_test.rb
|
1024
|
+
- test/lib/vedeu/support/y_coordinate_test.rb
|
1000
1025
|
- test/lib/vedeu/templating/decoder_test.rb
|
1001
1026
|
- test/lib/vedeu/templating/encoder_test.rb
|
1002
1027
|
- test/lib/vedeu/templating/helpers_test.rb
|
@@ -1098,9 +1123,19 @@ test_files:
|
|
1098
1123
|
- test/lib/vedeu/cells/escape_test.rb
|
1099
1124
|
- test/lib/vedeu/cells/support/html_test.rb
|
1100
1125
|
- test/lib/vedeu/coercers/alignment_test.rb
|
1126
|
+
- test/lib/vedeu/coercers/chars_test.rb
|
1127
|
+
- test/lib/vedeu/coercers/coercer_test.rb
|
1101
1128
|
- test/lib/vedeu/coercers/colour_attributes_test.rb
|
1102
1129
|
- test/lib/vedeu/coercers/colour_test.rb
|
1130
|
+
- test/lib/vedeu/coercers/editor_line_test.rb
|
1131
|
+
- test/lib/vedeu/coercers/editor_lines_test.rb
|
1103
1132
|
- test/lib/vedeu/coercers/horizontal_alignment_test.rb
|
1133
|
+
- test/lib/vedeu/coercers/lines_test.rb
|
1134
|
+
- test/lib/vedeu/coercers/page_test.rb
|
1135
|
+
- test/lib/vedeu/coercers/position_test.rb
|
1136
|
+
- test/lib/vedeu/coercers/row_test.rb
|
1137
|
+
- test/lib/vedeu/coercers/streams_test.rb
|
1138
|
+
- test/lib/vedeu/coercers/style_test.rb
|
1104
1139
|
- test/lib/vedeu/coercers/vertical_alignment_test.rb
|
1105
1140
|
- test/lib/vedeu/colours/background_test.rb
|
1106
1141
|
- test/lib/vedeu/colours/backgrounds_test.rb
|
@@ -1247,6 +1282,8 @@ test_files:
|
|
1247
1282
|
- test/lib/vedeu/runtime/traps_test.rb
|
1248
1283
|
- test/lib/vedeu/sentence_test.rb
|
1249
1284
|
- test/lib/vedeu/support/point_test.rb
|
1285
|
+
- test/lib/vedeu/support/x_coordinate_test.rb
|
1286
|
+
- test/lib/vedeu/support/y_coordinate_test.rb
|
1250
1287
|
- test/lib/vedeu/templating/decoder_test.rb
|
1251
1288
|
- test/lib/vedeu/templating/encoder_test.rb
|
1252
1289
|
- test/lib/vedeu/templating/helpers_test.rb
|