vedeu 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -0
- data/docs/configuration/drb.md +6 -0
- data/docs/configuration/drb_host.md +6 -0
- data/docs/configuration/drb_port.md +6 -0
- data/docs/configuration/interactive.md +21 -0
- data/docs/configuration/run_once.md +8 -0
- data/docs/configuration/standalone.md +20 -0
- data/docs/dsl.md +1 -1
- data/lib/vedeu.rb +15 -5
- data/lib/vedeu/application/controller.rb +5 -6
- data/lib/vedeu/borders/border.rb +1 -5
- data/lib/vedeu/borders/title.rb +6 -1
- data/lib/vedeu/buffers/buffer.rb +1 -3
- data/lib/vedeu/buffers/empty.rb +1 -3
- data/lib/vedeu/buffers/refresh.rb +1 -1
- data/lib/vedeu/buffers/view.rb +1 -1
- data/lib/vedeu/cells/border.rb +1 -1
- data/lib/vedeu/cells/borders/edges/bottom_horizontal.rb +1 -1
- data/lib/vedeu/cells/borders/edges/left_vertical.rb +1 -1
- data/lib/vedeu/cells/borders/edges/right_vertical.rb +1 -1
- data/lib/vedeu/cells/borders/edges/top_horizontal.rb +1 -1
- data/lib/vedeu/cells/borders/horizontal.rb +1 -1
- data/lib/vedeu/cells/borders/vertical.rb +1 -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/cursor.rb +1 -1
- data/lib/vedeu/cells/empty.rb +1 -1
- data/lib/vedeu/coercers/coercer.rb +8 -0
- data/lib/vedeu/coercers/colour.rb +6 -4
- data/lib/vedeu/coercers/editor_line.rb +4 -1
- data/lib/vedeu/coercers/editor_lines.rb +18 -3
- data/lib/vedeu/coercers/lines.rb +2 -1
- data/lib/vedeu/coercers/page.rb +2 -6
- data/lib/vedeu/coercers/position.rb +1 -3
- data/lib/vedeu/coercers/row.rb +0 -1
- data/lib/vedeu/colours/colour.rb +1 -2
- data/lib/vedeu/configuration/api.rb +6 -69
- data/lib/vedeu/configuration/configuration.rb +1 -4
- data/lib/vedeu/cursors/coordinate.rb +1 -3
- data/lib/vedeu/cursors/cursor.rb +4 -7
- data/lib/vedeu/cursors/reposition.rb +1 -1
- data/lib/vedeu/distributed/test_application.rb +1 -3
- data/lib/vedeu/dsl/border.rb +3 -4
- data/lib/vedeu/dsl/geometry.rb +6 -7
- data/lib/vedeu/dsl/helpers/align.rb +1 -1
- data/lib/vedeu/dsl/helpers/attributes.rb +2 -2
- data/lib/vedeu/dsl/helpers/truncate.rb +1 -2
- data/lib/vedeu/dsl/helpers/wordwrap.rb +1 -3
- data/lib/vedeu/dsl/presentation.rb +18 -0
- data/lib/vedeu/editor/cursor.rb +1 -3
- data/lib/vedeu/editor/document.rb +1 -3
- data/lib/vedeu/editor/line.rb +4 -12
- data/lib/vedeu/editor/lines.rb +3 -29
- data/lib/vedeu/events/event.rb +1 -3
- data/lib/vedeu/geometries/area/dimension.rb +1 -3
- data/lib/vedeu/geometries/area/x_dimension.rb +1 -1
- data/lib/vedeu/geometries/area/y_dimension.rb +1 -1
- data/lib/vedeu/geometries/geometry.rb +1 -4
- data/lib/vedeu/geometries/move.rb +1 -1
- data/lib/vedeu/groups/group.rb +4 -7
- data/lib/vedeu/input/keymap.rb +1 -3
- data/lib/vedeu/input/keys.rb +2 -0
- data/lib/vedeu/input/mapper.rb +2 -0
- data/lib/vedeu/input/mouse.rb +2 -0
- data/lib/vedeu/input/read.rb +1 -7
- data/lib/vedeu/interfaces/clear.rb +1 -1
- data/lib/vedeu/interfaces/interface.rb +11 -6
- data/lib/vedeu/logging/lockless_log_device.rb +18 -2
- data/lib/vedeu/logging/timer.rb +17 -9
- data/lib/vedeu/menus/menu.rb +1 -3
- data/lib/vedeu/models/toggleable.rb +5 -6
- data/lib/vedeu/output/all.rb +3 -0
- data/lib/vedeu/output/compressor.rb +1 -1
- data/lib/vedeu/output/output.rb +2 -3
- data/lib/vedeu/output/refresh.rb +1 -1
- data/lib/vedeu/output/write.rb +3 -2
- data/lib/vedeu/renderers/options.rb +1 -3
- data/lib/vedeu/repositories/defaults.rb +1 -1
- data/lib/vedeu/repositories/model.rb +5 -6
- data/lib/vedeu/repositories/registerable.rb +6 -8
- data/lib/vedeu/runtime/flags.rb +2 -2
- data/lib/vedeu/support/y_coordinate.rb +1 -1
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/composition.rb +1 -3
- data/lib/vedeu/views/default_attributes.rb +2 -4
- data/lib/vedeu/views/value.rb +6 -8
- data/lib/vedeu/views/view.rb +9 -3
- data/test/lib/vedeu/application/application_helper_test.rb +3 -2
- data/test/lib/vedeu/application/controller_test.rb +10 -11
- data/test/lib/vedeu/application/helper_test.rb +3 -2
- data/test/lib/vedeu/application/view_test.rb +4 -3
- data/test/lib/vedeu/coercers/editor_line_test.rb +21 -0
- data/test/lib/vedeu/coercers/editor_lines_test.rb +41 -0
- data/test/lib/vedeu/coercers/page_test.rb +1 -1
- data/test/lib/vedeu/cursors/dsl_test.rb +11 -10
- data/test/lib/vedeu/dsl/dsl_test.rb +3 -2
- data/test/lib/vedeu/dsl/elements_test.rb +19 -21
- data/test/lib/vedeu/dsl/presentation_test.rb +42 -0
- data/test/lib/vedeu/editor/collection_test.rb +5 -4
- data/test/lib/vedeu/editor/line_test.rb +4 -27
- data/test/lib/vedeu/editor/lines_test.rb +4 -54
- data/test/lib/vedeu/logging/timer_test.rb +11 -1
- data/test/lib/vedeu/models/toggleable_test.rb +27 -25
- data/test/lib/vedeu/output/compressor_cache_test.rb +0 -3
- data/test/lib/vedeu/presentation/colour_test.rb +13 -12
- data/test/lib/vedeu/presentation/presentation_test.rb +4 -2
- data/test/lib/vedeu/presentation/styles_test.rb +5 -3
- data/test/lib/vedeu/renderers/options_test.rb +10 -12
- data/test/lib/vedeu/repositories/assemblage_test.rb +11 -10
- data/test/lib/vedeu/repositories/collection_test.rb +1 -1
- data/test/lib/vedeu/repositories/defaults_test.rb +9 -7
- data/test/lib/vedeu/repositories/model_test.rb +10 -9
- data/test/lib/vedeu/repositories/registerable_test.rb +19 -18
- data/test/lib/vedeu/repositories/repository_test.rb +7 -7
- data/test/lib/vedeu/repositories/store_test.rb +14 -13
- data/test/lib/vedeu/templating/helpers_test.rb +9 -8
- data/test/lib/vedeu/views/default_attributes_test.rb +17 -17
- data/test/lib/vedeu/views/value_test.rb +0 -1
- data/test/support/helpers/model_test_class.rb +1 -2
- metadata +8 -2
@@ -124,7 +124,7 @@ module Vedeu
|
|
124
124
|
context 'when there something in focus' do
|
125
125
|
before { Vedeu.stubs(:focus).returns('zinc') }
|
126
126
|
|
127
|
-
it { subject.must_be_instance_of(
|
127
|
+
it { subject.must_be_instance_of(model) }
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
@@ -169,7 +169,7 @@ module Vedeu
|
|
169
169
|
end
|
170
170
|
|
171
171
|
describe '#find_or_create' do
|
172
|
-
let(:model_instance) {
|
172
|
+
let(:model_instance) { model.new('niobium') }
|
173
173
|
|
174
174
|
before { Vedeu.stubs(:log) }
|
175
175
|
|
@@ -187,7 +187,7 @@ module Vedeu
|
|
187
187
|
let(:model_name) { 'zinc'}
|
188
188
|
|
189
189
|
it 'creates and stores a new instance of the model' do
|
190
|
-
subject.must_be_instance_of(
|
190
|
+
subject.must_be_instance_of(model)
|
191
191
|
end
|
192
192
|
end
|
193
193
|
end
|
@@ -232,7 +232,7 @@ module Vedeu
|
|
232
232
|
context 'when the model is not registered' do
|
233
233
|
before {
|
234
234
|
instance.reset
|
235
|
-
instance.store(
|
235
|
+
instance.store(model.new('zinc'))
|
236
236
|
}
|
237
237
|
|
238
238
|
it { subject.must_be_instance_of(FalseClass) }
|
@@ -241,8 +241,8 @@ module Vedeu
|
|
241
241
|
context 'when the model is registered' do
|
242
242
|
before {
|
243
243
|
instance.reset
|
244
|
-
instance.store(
|
245
|
-
instance.store(
|
244
|
+
instance.store(model.new('gadolinium'))
|
245
|
+
instance.store(model.new('francium'))
|
246
246
|
}
|
247
247
|
|
248
248
|
it 'returns the storage with the model removed' do
|
@@ -269,7 +269,7 @@ module Vedeu
|
|
269
269
|
context 'when a name attributes is provided' do
|
270
270
|
let(:model_name) { 'hydrogen' }
|
271
271
|
|
272
|
-
it { subject.must_be_instance_of(
|
272
|
+
it { subject.must_be_instance_of(model) }
|
273
273
|
end
|
274
274
|
end
|
275
275
|
|
@@ -25,27 +25,28 @@ module Vedeu
|
|
25
25
|
|
26
26
|
describe Store do
|
27
27
|
|
28
|
-
let(:described)
|
29
|
-
let(:
|
30
|
-
let(:model)
|
31
|
-
let(:
|
28
|
+
let(:described) { Vedeu::Repositories::Store }
|
29
|
+
let(:included_described) { Vedeu::Repositories::StoreTestClass }
|
30
|
+
let(:included_instance) { included_described.new(model, storage) }
|
31
|
+
let(:model) {}
|
32
|
+
let(:storage) {}
|
32
33
|
|
33
34
|
describe '#all' do
|
34
|
-
it {
|
35
|
+
it { included_instance.must_respond_to(:all) }
|
35
36
|
end
|
36
37
|
|
37
38
|
describe '#clear' do
|
38
|
-
it {
|
39
|
+
it { included_instance.must_respond_to(:clear) }
|
39
40
|
end
|
40
41
|
|
41
42
|
describe '#each' do
|
42
|
-
subject {
|
43
|
+
subject { included_instance.each }
|
43
44
|
|
44
45
|
it { subject.must_be_instance_of(Enumerator) }
|
45
46
|
end
|
46
47
|
|
47
48
|
describe '#empty?' do
|
48
|
-
subject {
|
49
|
+
subject { included_instance.empty? }
|
49
50
|
|
50
51
|
context 'when empty' do
|
51
52
|
it { subject.must_equal(true) }
|
@@ -61,7 +62,7 @@ module Vedeu
|
|
61
62
|
describe '#exists?' do
|
62
63
|
let(:_name) {}
|
63
64
|
|
64
|
-
subject {
|
65
|
+
subject { included_instance.exists?(_name) }
|
65
66
|
|
66
67
|
context 'when the store is empty' do
|
67
68
|
let(:_name) { :vedeu_repositories_store }
|
@@ -95,11 +96,11 @@ module Vedeu
|
|
95
96
|
end
|
96
97
|
|
97
98
|
describe '#registered?' do
|
98
|
-
it {
|
99
|
+
it { included_instance.must_respond_to(:registered?) }
|
99
100
|
end
|
100
101
|
|
101
102
|
describe '#registered' do
|
102
|
-
subject {
|
103
|
+
subject { included_instance.registered }
|
103
104
|
|
104
105
|
it { subject.must_be_instance_of(Array) }
|
105
106
|
|
@@ -139,7 +140,7 @@ module Vedeu
|
|
139
140
|
end
|
140
141
|
|
141
142
|
describe '#size' do
|
142
|
-
subject {
|
143
|
+
subject { included_instance.size }
|
143
144
|
|
144
145
|
context 'when empty' do
|
145
146
|
it { subject.must_equal(0) }
|
@@ -153,7 +154,7 @@ module Vedeu
|
|
153
154
|
end
|
154
155
|
|
155
156
|
describe '#all' do
|
156
|
-
it {
|
157
|
+
it { included_instance.must_respond_to(:all) }
|
157
158
|
end
|
158
159
|
|
159
160
|
end # Store
|
@@ -14,8 +14,9 @@ module Vedeu
|
|
14
14
|
|
15
15
|
describe Helpers do
|
16
16
|
|
17
|
-
let(:described)
|
18
|
-
let(:
|
17
|
+
let(:described) { Vedeu::Templating::Helpers }
|
18
|
+
let(:included_described) { Vedeu::Templating::HelpersTestClass }
|
19
|
+
let(:included_instance) { included_described.new }
|
19
20
|
|
20
21
|
describe '#background' do
|
21
22
|
# let(:expected) {
|
@@ -26,19 +27,19 @@ module Vedeu
|
|
26
27
|
# "w4tjb4NO3gG3z2TbI=}}"
|
27
28
|
# }
|
28
29
|
|
29
|
-
subject {
|
30
|
+
subject { included_instance.background('#000000') { 'background text' } }
|
30
31
|
|
31
32
|
# it { subject.must_equal(expected) }
|
32
33
|
end
|
33
34
|
|
34
35
|
describe '#bg' do
|
35
|
-
it {
|
36
|
+
it { included_instance.must_respond_to(:bg) }
|
36
37
|
end
|
37
38
|
|
38
39
|
describe '#colour' do
|
39
40
|
let(:attributes) { {} }
|
40
41
|
|
41
|
-
subject {
|
42
|
+
subject { included_instance.colour(attributes) { 'colour text' } }
|
42
43
|
|
43
44
|
context 'with no attributes' do
|
44
45
|
it { subject.must_be_instance_of(String) }
|
@@ -115,13 +116,13 @@ module Vedeu
|
|
115
116
|
# "Bh/MMXxlpNtQ==}}"
|
116
117
|
# }
|
117
118
|
|
118
|
-
subject {
|
119
|
+
subject { included_instance.foreground('#000000') { 'foreground text' } }
|
119
120
|
|
120
121
|
# it { subject.must_equal(expected) }
|
121
122
|
end
|
122
123
|
|
123
124
|
describe '#fg' do
|
124
|
-
it {
|
125
|
+
it { included_instance.must_respond_to(:fg) }
|
125
126
|
end
|
126
127
|
|
127
128
|
# describe '#style' do
|
@@ -133,7 +134,7 @@ module Vedeu
|
|
133
134
|
# "/CoCWuDT6NxbwBBzVXlA==}}"
|
134
135
|
# }
|
135
136
|
|
136
|
-
# subject {
|
137
|
+
# subject { included_instance.style(:bold) { 'style text' } }
|
137
138
|
|
138
139
|
# it { subject.must_equal(expected) }
|
139
140
|
# end
|
@@ -26,56 +26,56 @@ module Vedeu
|
|
26
26
|
let(:described) { Vedeu::Views::DefaultAttributes }
|
27
27
|
let(:instance) {}
|
28
28
|
|
29
|
-
let(:
|
30
|
-
let(:
|
31
|
-
let(:model)
|
29
|
+
let(:included_described) { Vedeu::Views::DefaultAttributesTest }
|
30
|
+
let(:included_instance) { included_described.new }
|
31
|
+
let(:model) {}
|
32
32
|
|
33
33
|
describe '#align' do
|
34
|
-
it {
|
34
|
+
it { included_instance.must_respond_to(:align) }
|
35
35
|
end
|
36
36
|
|
37
37
|
describe '#client' do
|
38
|
-
it {
|
38
|
+
it { included_instance.must_respond_to(:client) }
|
39
39
|
end
|
40
40
|
|
41
41
|
describe '#colour' do
|
42
|
-
it {
|
42
|
+
it { included_instance.must_respond_to(:colour) }
|
43
43
|
end
|
44
44
|
|
45
45
|
describe '#name' do
|
46
|
-
it {
|
46
|
+
it { included_instance.must_respond_to(:name) }
|
47
47
|
end
|
48
48
|
|
49
49
|
describe '#pad' do
|
50
|
-
it {
|
50
|
+
it { included_instance.must_respond_to(:pad) }
|
51
51
|
end
|
52
52
|
|
53
53
|
describe '#parent' do
|
54
|
-
it {
|
54
|
+
it { included_instance.must_respond_to(:parent) }
|
55
55
|
end
|
56
56
|
|
57
57
|
describe '#style' do
|
58
|
-
it {
|
58
|
+
it { included_instance.must_respond_to(:style) }
|
59
59
|
end
|
60
60
|
|
61
61
|
describe '#truncate' do
|
62
|
-
it {
|
62
|
+
it { included_instance.must_respond_to(:truncate) }
|
63
63
|
end
|
64
64
|
|
65
65
|
describe '#truncate?' do
|
66
|
-
it {
|
66
|
+
it { included_instance.must_respond_to(:truncate?) }
|
67
67
|
end
|
68
68
|
|
69
69
|
describe '#width' do
|
70
|
-
it {
|
70
|
+
it { included_instance.must_respond_to(:width) }
|
71
71
|
end
|
72
72
|
|
73
73
|
describe '#wordwrap' do
|
74
|
-
it {
|
74
|
+
it { included_instance.must_respond_to(:wordwrap) }
|
75
75
|
end
|
76
76
|
|
77
77
|
describe '#wordwrap?' do
|
78
|
-
it {
|
78
|
+
it { included_instance.must_respond_to(:wordwrap?) }
|
79
79
|
end
|
80
80
|
|
81
81
|
describe '#attributes' do
|
@@ -90,11 +90,11 @@ module Vedeu
|
|
90
90
|
style: nil,
|
91
91
|
truncate: false,
|
92
92
|
width: nil,
|
93
|
-
wordwrap:
|
93
|
+
wordwrap: true,
|
94
94
|
}
|
95
95
|
}
|
96
96
|
|
97
|
-
subject {
|
97
|
+
subject { included_instance.attributes }
|
98
98
|
|
99
99
|
it { subject.must_be_instance_of(Hash) }
|
100
100
|
it { subject.must_equal(expected) }
|
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.10
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -243,6 +243,12 @@ files:
|
|
243
243
|
- docs/chars.md
|
244
244
|
- docs/colours_styles.md
|
245
245
|
- docs/configuration.md
|
246
|
+
- docs/configuration/drb.md
|
247
|
+
- docs/configuration/drb_host.md
|
248
|
+
- docs/configuration/drb_port.md
|
249
|
+
- docs/configuration/interactive.md
|
250
|
+
- docs/configuration/run_once.md
|
251
|
+
- docs/configuration/standalone.md
|
246
252
|
- docs/cursors.md
|
247
253
|
- docs/dsl.md
|
248
254
|
- docs/dsl/borders.md
|