vedeu 0.4.62 → 0.4.63
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 +6 -5
- data/lib/vedeu/api.rb +5 -128
- data/lib/vedeu/application/application_controller.rb +0 -2
- data/lib/vedeu/application/application_helper.rb +0 -2
- data/lib/vedeu/application/application_view.rb +0 -2
- data/lib/vedeu/application/controller.rb +1 -1
- data/lib/vedeu/bindings/application.rb +12 -4
- data/lib/vedeu/bindings/system.rb +4 -4
- data/lib/vedeu/bindings/visibility.rb +6 -2
- data/lib/vedeu/buffers/buffer.rb +1 -1
- data/lib/vedeu/buffers/display_buffer.rb +2 -2
- data/lib/vedeu/cli/generator/templates/application/Gemfile +1 -1
- data/lib/vedeu/cli/generator/templates/application/application.erb +1 -1
- data/lib/vedeu/cli/generator/templates/application/config/configuration.erb +2 -2
- data/lib/vedeu/cli/generator/view.rb +2 -2
- data/lib/vedeu/colours/colour.rb +1 -1
- data/lib/vedeu/colours/colour_translator.rb +2 -2
- data/lib/vedeu/configuration/api.rb +1 -1
- data/lib/vedeu/configuration/configuration.rb +1 -1
- data/lib/vedeu/cursor/refresh_cursor.rb +1 -1
- data/lib/vedeu/distributed/server.rb +1 -1
- data/lib/vedeu/dsl/border.rb +1 -1
- data/lib/vedeu/dsl/geometry.rb +7 -6
- data/lib/vedeu/dsl/view.rb +3 -3
- data/lib/vedeu/events/event.rb +1 -1
- data/lib/vedeu/events/trigger.rb +1 -1
- data/lib/vedeu/exceptions.rb +14 -0
- data/lib/vedeu/geometry/dimension.rb +1 -1
- data/lib/vedeu/geometry/geometry.rb +2 -2
- data/lib/vedeu/geometry/position_validator.rb +1 -1
- data/lib/vedeu/input/input.rb +6 -5
- data/lib/vedeu/input/keymap.rb +3 -3
- data/lib/vedeu/input/mapper.rb +3 -3
- data/lib/vedeu/internal_api.rb +147 -0
- data/lib/vedeu/models/char.rb +2 -2
- data/lib/vedeu/models/focus.rb +1 -1
- data/lib/vedeu/models/line.rb +1 -1
- data/lib/vedeu/models/stream.rb +1 -1
- data/lib/vedeu/output/esc.rb +1 -1
- data/lib/vedeu/output/presentation.rb +9 -9
- data/lib/vedeu/output/refresh.rb +1 -1
- data/lib/vedeu/output/renderers.rb +1 -1
- data/lib/vedeu/output/text.rb +1 -1
- data/lib/vedeu/output/viewport.rb +1 -1
- data/lib/vedeu/repositories.rb +1 -1
- data/lib/vedeu/repositories/repository.rb +4 -4
- data/lib/vedeu/{application.rb → runtime/application.rb} +0 -0
- data/lib/vedeu/{bootstrap.rb → runtime/bootstrap.rb} +0 -0
- data/lib/vedeu/{launcher.rb → runtime/launcher.rb} +1 -1
- data/lib/vedeu/{main_loop.rb → runtime/main_loop.rb} +1 -1
- data/lib/vedeu/{router.rb → runtime/router.rb} +57 -4
- data/lib/vedeu/terminal.rb +1 -1
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/api_test.rb +1 -15
- data/test/lib/vedeu/bindings/application_test.rb +3 -3
- data/test/lib/vedeu/internal_api_test.rb +25 -0
- data/test/lib/vedeu/output/clear/named_group_test.rb +8 -7
- data/test/lib/vedeu/output/presentation_test.rb +45 -0
- data/test/lib/vedeu/output/renderers_test.rb +14 -4
- data/test/lib/vedeu/{application_test.rb → runtime/application_test.rb} +0 -0
- data/test/lib/vedeu/{bootstrap_test.rb → runtime/bootstrap_test.rb} +11 -0
- data/test/lib/vedeu/{launcher_test.rb → runtime/launcher_test.rb} +0 -0
- data/test/lib/vedeu/{main_loop_test.rb → runtime/main_loop_test.rb} +0 -0
- data/test/lib/vedeu/{router_test.rb → runtime/router_test.rb} +13 -1
- metadata +20 -17
File without changes
|
@@ -25,12 +25,23 @@ module Vedeu
|
|
25
25
|
end
|
26
26
|
|
27
27
|
describe '.start' do
|
28
|
+
before { Vedeu::Launcher.stubs(:execute!) }
|
29
|
+
|
28
30
|
subject { described.start(argv, entry_point) }
|
29
31
|
|
30
32
|
it {
|
31
33
|
Vedeu::Launcher.expects(:execute!)
|
32
34
|
subject
|
33
35
|
}
|
36
|
+
|
37
|
+
context 'when the entry point is not set' do
|
38
|
+
let(:entry_point) {}
|
39
|
+
|
40
|
+
it 'tries to use the Configuration.root setting' do
|
41
|
+
Vedeu::Configuration.expects(:root)
|
42
|
+
subject
|
43
|
+
end
|
44
|
+
end
|
34
45
|
end
|
35
46
|
|
36
47
|
describe '#start' do
|
File without changes
|
File without changes
|
@@ -125,6 +125,8 @@ module Vedeu
|
|
125
125
|
|
126
126
|
subject { described.goto(controller_name, action_name, **args) }
|
127
127
|
|
128
|
+
it { described.must_respond_to(:action) }
|
129
|
+
|
128
130
|
context 'when the controller is registered' do
|
129
131
|
context 'when the controller klass is defined' do
|
130
132
|
before do
|
@@ -146,6 +148,16 @@ module Vedeu
|
|
146
148
|
}
|
147
149
|
end
|
148
150
|
|
151
|
+
context 'when the action is not defined for this controller' do
|
152
|
+
let(:action_name) { :undefined_action }
|
153
|
+
|
154
|
+
before do
|
155
|
+
described.add_controller(controller_name, 'Vedeu::SomeController')
|
156
|
+
end
|
157
|
+
|
158
|
+
it { proc { subject }.must_raise(Vedeu::ActionNotFound) }
|
159
|
+
end
|
160
|
+
|
149
161
|
context 'when the controller klass is not defined' do
|
150
162
|
before do
|
151
163
|
described.add_controller(controller_name, '')
|
@@ -158,7 +170,7 @@ module Vedeu
|
|
158
170
|
end
|
159
171
|
|
160
172
|
context 'when the controller is not registered' do
|
161
|
-
it { proc { subject }.must_raise(Vedeu::
|
173
|
+
it { proc { subject }.must_raise(Vedeu::ControllerNotFound) }
|
162
174
|
end
|
163
175
|
end
|
164
176
|
|
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.
|
4
|
+
version: 0.4.63
|
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-07-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -261,7 +261,6 @@ files:
|
|
261
261
|
- lib/vedeu.rb
|
262
262
|
- lib/vedeu/all.rb
|
263
263
|
- lib/vedeu/api.rb
|
264
|
-
- lib/vedeu/application.rb
|
265
264
|
- lib/vedeu/application/application_controller.rb
|
266
265
|
- lib/vedeu/application/application_helper.rb
|
267
266
|
- lib/vedeu/application/application_view.rb
|
@@ -275,7 +274,6 @@ files:
|
|
275
274
|
- lib/vedeu/bindings/movement.rb
|
276
275
|
- lib/vedeu/bindings/system.rb
|
277
276
|
- lib/vedeu/bindings/visibility.rb
|
278
|
-
- lib/vedeu/bootstrap.rb
|
279
277
|
- lib/vedeu/borders/border.rb
|
280
278
|
- lib/vedeu/borders/borders.rb
|
281
279
|
- lib/vedeu/borders/render_border.rb
|
@@ -374,9 +372,8 @@ files:
|
|
374
372
|
- lib/vedeu/input/keymaps.rb
|
375
373
|
- lib/vedeu/input/keys.rb
|
376
374
|
- lib/vedeu/input/mapper.rb
|
377
|
-
- lib/vedeu/
|
375
|
+
- lib/vedeu/internal_api.rb
|
378
376
|
- lib/vedeu/log.rb
|
379
|
-
- lib/vedeu/main_loop.rb
|
380
377
|
- lib/vedeu/models/cell.rb
|
381
378
|
- lib/vedeu/models/char.rb
|
382
379
|
- lib/vedeu/models/chars.rb
|
@@ -435,7 +432,11 @@ files:
|
|
435
432
|
- lib/vedeu/repositories/registerable.rb
|
436
433
|
- lib/vedeu/repositories/repository.rb
|
437
434
|
- lib/vedeu/repositories/store.rb
|
438
|
-
- lib/vedeu/
|
435
|
+
- lib/vedeu/runtime/application.rb
|
436
|
+
- lib/vedeu/runtime/bootstrap.rb
|
437
|
+
- lib/vedeu/runtime/launcher.rb
|
438
|
+
- lib/vedeu/runtime/main_loop.rb
|
439
|
+
- lib/vedeu/runtime/router.rb
|
439
440
|
- lib/vedeu/templating/all.rb
|
440
441
|
- lib/vedeu/templating/decoder.rb
|
441
442
|
- lib/vedeu/templating/directive.rb
|
@@ -455,7 +456,6 @@ files:
|
|
455
456
|
- test/lib/vedeu/application/controller_test.rb
|
456
457
|
- test/lib/vedeu/application/helper_test.rb
|
457
458
|
- test/lib/vedeu/application/view_test.rb
|
458
|
-
- test/lib/vedeu/application_test.rb
|
459
459
|
- test/lib/vedeu/bindings/application_test.rb
|
460
460
|
- test/lib/vedeu/bindings/drb_test.rb
|
461
461
|
- test/lib/vedeu/bindings/menus_test.rb
|
@@ -463,7 +463,6 @@ files:
|
|
463
463
|
- test/lib/vedeu/bindings/system_test.rb
|
464
464
|
- test/lib/vedeu/bindings/visibility_test.rb
|
465
465
|
- test/lib/vedeu/bindings_test.rb
|
466
|
-
- test/lib/vedeu/bootstrap_test.rb
|
467
466
|
- test/lib/vedeu/borders/border_test.rb
|
468
467
|
- test/lib/vedeu/borders/borders_test.rb
|
469
468
|
- test/lib/vedeu/borders/render_border_test.rb
|
@@ -530,9 +529,8 @@ files:
|
|
530
529
|
- test/lib/vedeu/input/keymaps_test.rb
|
531
530
|
- test/lib/vedeu/input/keys_test.rb
|
532
531
|
- test/lib/vedeu/input/mapper_test.rb
|
533
|
-
- test/lib/vedeu/
|
532
|
+
- test/lib/vedeu/internal_api_test.rb
|
534
533
|
- test/lib/vedeu/log_test.rb
|
535
|
-
- test/lib/vedeu/main_loop_test.rb
|
536
534
|
- test/lib/vedeu/models/cell_test.rb
|
537
535
|
- test/lib/vedeu/models/char_test.rb
|
538
536
|
- test/lib/vedeu/models/chars_test.rb
|
@@ -589,7 +587,11 @@ files:
|
|
589
587
|
- test/lib/vedeu/repositories/repository_test.rb
|
590
588
|
- test/lib/vedeu/repositories/store_test.rb
|
591
589
|
- test/lib/vedeu/repositories_test.rb
|
592
|
-
- test/lib/vedeu/
|
590
|
+
- test/lib/vedeu/runtime/application_test.rb
|
591
|
+
- test/lib/vedeu/runtime/bootstrap_test.rb
|
592
|
+
- test/lib/vedeu/runtime/launcher_test.rb
|
593
|
+
- test/lib/vedeu/runtime/main_loop_test.rb
|
594
|
+
- test/lib/vedeu/runtime/router_test.rb
|
593
595
|
- test/lib/vedeu/templating/decoder_test.rb
|
594
596
|
- test/lib/vedeu/templating/directive_test.rb
|
595
597
|
- test/lib/vedeu/templating/encoder_test.rb
|
@@ -641,7 +643,6 @@ test_files:
|
|
641
643
|
- test/lib/vedeu/application/controller_test.rb
|
642
644
|
- test/lib/vedeu/application/helper_test.rb
|
643
645
|
- test/lib/vedeu/application/view_test.rb
|
644
|
-
- test/lib/vedeu/application_test.rb
|
645
646
|
- test/lib/vedeu/bindings/application_test.rb
|
646
647
|
- test/lib/vedeu/bindings/drb_test.rb
|
647
648
|
- test/lib/vedeu/bindings/menus_test.rb
|
@@ -649,7 +650,6 @@ test_files:
|
|
649
650
|
- test/lib/vedeu/bindings/system_test.rb
|
650
651
|
- test/lib/vedeu/bindings/visibility_test.rb
|
651
652
|
- test/lib/vedeu/bindings_test.rb
|
652
|
-
- test/lib/vedeu/bootstrap_test.rb
|
653
653
|
- test/lib/vedeu/borders/border_test.rb
|
654
654
|
- test/lib/vedeu/borders/borders_test.rb
|
655
655
|
- test/lib/vedeu/borders/render_border_test.rb
|
@@ -716,9 +716,8 @@ test_files:
|
|
716
716
|
- test/lib/vedeu/input/keymaps_test.rb
|
717
717
|
- test/lib/vedeu/input/keys_test.rb
|
718
718
|
- test/lib/vedeu/input/mapper_test.rb
|
719
|
-
- test/lib/vedeu/
|
719
|
+
- test/lib/vedeu/internal_api_test.rb
|
720
720
|
- test/lib/vedeu/log_test.rb
|
721
|
-
- test/lib/vedeu/main_loop_test.rb
|
722
721
|
- test/lib/vedeu/models/cell_test.rb
|
723
722
|
- test/lib/vedeu/models/char_test.rb
|
724
723
|
- test/lib/vedeu/models/chars_test.rb
|
@@ -775,7 +774,11 @@ test_files:
|
|
775
774
|
- test/lib/vedeu/repositories/repository_test.rb
|
776
775
|
- test/lib/vedeu/repositories/store_test.rb
|
777
776
|
- test/lib/vedeu/repositories_test.rb
|
778
|
-
- test/lib/vedeu/
|
777
|
+
- test/lib/vedeu/runtime/application_test.rb
|
778
|
+
- test/lib/vedeu/runtime/bootstrap_test.rb
|
779
|
+
- test/lib/vedeu/runtime/launcher_test.rb
|
780
|
+
- test/lib/vedeu/runtime/main_loop_test.rb
|
781
|
+
- test/lib/vedeu/runtime/router_test.rb
|
779
782
|
- test/lib/vedeu/templating/decoder_test.rb
|
780
783
|
- test/lib/vedeu/templating/directive_test.rb
|
781
784
|
- test/lib/vedeu/templating/encoder_test.rb
|