vedeu 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/README.md +1 -0
- data/docs/configuration.md +94 -0
- data/lib/vedeu/application/application_view.rb +4 -0
- data/lib/vedeu/bindings/system.rb +1 -0
- data/lib/vedeu/configuration/api.rb +17 -32
- data/lib/vedeu/configuration/cli.rb +61 -1
- data/lib/vedeu/configuration/configuration.rb +1 -1
- data/lib/vedeu/dsl/view.rb +2 -2
- data/lib/vedeu/events/event.rb +4 -1
- data/lib/vedeu/log/log.rb +5 -1
- data/lib/vedeu/runtime/bootstrap.rb +19 -17
- data/lib/vedeu/runtime/router.rb +2 -2
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/application/application_view_test.rb +24 -0
- data/test/lib/vedeu/bindings/application_test.rb +2 -2
- data/test/lib/vedeu/bindings_test.rb +2 -2
- data/test/lib/vedeu/configuration/api_test.rb +17 -17
- data/test/lib/vedeu/cursor/move_test.rb +30 -11
- data/test/lib/vedeu/dsl/interface_test.rb +8 -2
- data/test/lib/vedeu/esc/actions_test.rb +2 -2
- data/test/lib/vedeu/esc/borders_test.rb +2 -2
- data/test/lib/vedeu/events/event_aliases_test.rb +2 -2
- data/test/lib/vedeu/events/event_collection_test.rb +1 -1
- data/test/lib/vedeu/internal_api_test.rb +2 -2
- data/test/lib/vedeu/models/views/collections/chars_test.rb +1 -1
- data/test/lib/vedeu/models/views/collections/view_collection_test.rb +2 -2
- data/test/lib/vedeu/models/views/view_test.rb +2 -2
- data/test/lib/vedeu/null/menu_test.rb +2 -2
- data/test/lib/vedeu/null/view_test.rb +2 -2
- data/test/lib/vedeu/plugins/plugin_test.rb +2 -2
- data/test/lib/vedeu/plugins_test.rb +2 -2
- data/test/lib/vedeu/repositories_test.rb +2 -2
- data/test/lib/vedeu/runtime/bootstrap_test.rb +7 -16
- data/test/lib/vedeu/runtime/flags_test.rb +2 -2
- data/test/lib/vedeu/runtime/main_loop_test.rb +4 -1
- data/test/lib/vedeu/runtime/router_test.rb +2 -2
- data/test/lib/vedeu/runtime/traps_test.rb +2 -2
- data/test/lib/vedeu/templating/decoder_test.rb +2 -2
- data/test/lib/vedeu/templating/encoder_test.rb +2 -2
- data/test/lib/vedeu/templating/view_template_test.rb +2 -2
- data/test/lib/vedeu/terminal_mode_test.rb +2 -2
- data/vedeu.gemspec +1 -1
- metadata +5 -4
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
describe InternalAPI do
|
6
6
|
|
7
7
|
it { Vedeu.must_respond_to(:background_colours) }
|
8
8
|
it { Vedeu.must_respond_to(:borders) }
|
@@ -23,6 +23,6 @@ module Vedeu
|
|
23
23
|
it { Vedeu.must_respond_to(:resize) }
|
24
24
|
it { Vedeu.must_respond_to(:timer) }
|
25
25
|
|
26
|
-
|
26
|
+
end # InternalAPI
|
27
27
|
|
28
28
|
end # Vedeu
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Views
|
6
6
|
|
7
|
-
|
7
|
+
describe ViewCollection do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Views::ViewCollection }
|
10
10
|
let(:instance) { described.new }
|
@@ -15,7 +15,7 @@ module Vedeu
|
|
15
15
|
it { instance.must_be_instance_of(described) }
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
end # ViewCollection
|
19
19
|
|
20
20
|
end # Views
|
21
21
|
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Views
|
6
6
|
|
7
|
-
|
7
|
+
describe View do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Views::View }
|
10
10
|
let(:instance) { described.new(attributes) }
|
@@ -87,7 +87,7 @@ module Vedeu
|
|
87
87
|
# it { skip }
|
88
88
|
end
|
89
89
|
|
90
|
-
|
90
|
+
end # View
|
91
91
|
|
92
92
|
end # Views
|
93
93
|
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Null
|
6
6
|
|
7
|
-
|
7
|
+
describe Menu do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Null::Menu }
|
10
10
|
let(:instance) { described.new(attributes) }
|
@@ -40,7 +40,7 @@ module Vedeu
|
|
40
40
|
it { instance.item.must_equal(nil) }
|
41
41
|
end
|
42
42
|
|
43
|
-
|
43
|
+
end # Menu
|
44
44
|
|
45
45
|
end # Null
|
46
46
|
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Null
|
6
6
|
|
7
|
-
|
7
|
+
describe View do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Null::View }
|
10
10
|
let(:instance) { described.new(attributes) }
|
@@ -49,7 +49,7 @@ module Vedeu
|
|
49
49
|
it { instance.visible?.must_equal(false) }
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
end # View
|
53
53
|
|
54
54
|
end # Null
|
55
55
|
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
describe Plugin do
|
6
6
|
|
7
7
|
let(:described) { Vedeu::Plugin }
|
8
8
|
let(:instance) { described.new(_name, _gem) }
|
@@ -45,6 +45,6 @@ module Vedeu
|
|
45
45
|
# it { skip }
|
46
46
|
end
|
47
47
|
|
48
|
-
|
48
|
+
end # Plugin
|
49
49
|
|
50
50
|
end # Vedeu
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
describe Plugins do
|
6
6
|
|
7
7
|
let(:described) { Vedeu::Plugins }
|
8
8
|
let(:instance) { described.new }
|
@@ -55,6 +55,6 @@ module Vedeu
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
|
58
|
+
end # Plugins
|
59
59
|
|
60
60
|
end # Vedeu
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
describe Repositories do
|
6
6
|
|
7
7
|
let(:described) { Vedeu::Repositories }
|
8
8
|
|
@@ -37,6 +37,6 @@ module Vedeu
|
|
37
37
|
it { subject.must_equal(true) }
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
end # Repositories
|
41
41
|
|
42
42
|
end # Vedeu
|
@@ -12,36 +12,27 @@ module Vedeu
|
|
12
12
|
describe Bootstrap do
|
13
13
|
|
14
14
|
let(:described) { Vedeu::Bootstrap }
|
15
|
-
let(:instance) { described.new(argv
|
15
|
+
let(:instance) { described.new(argv) }
|
16
16
|
let(:argv) { [] }
|
17
|
-
let(:entry_point) { YourApp::SomeController.new }
|
18
17
|
|
19
18
|
describe '#initialize' do
|
20
19
|
it { instance.must_be_instance_of(described) }
|
21
20
|
it { instance.instance_variable_get('@argv').must_equal(argv) }
|
22
|
-
it do
|
23
|
-
instance.instance_variable_get('@entry_point').must_equal(entry_point)
|
24
|
-
end
|
25
21
|
end
|
26
22
|
|
27
23
|
describe '.start' do
|
28
|
-
before
|
24
|
+
before do
|
25
|
+
Vedeu::Configuration.stubs(:root).returns([:controller, :action, :args])
|
26
|
+
Vedeu.stubs(:trigger)
|
27
|
+
Vedeu::Launcher.stubs(:execute!)
|
28
|
+
end
|
29
29
|
|
30
|
-
subject { described.start(argv
|
30
|
+
subject { described.start(argv) }
|
31
31
|
|
32
32
|
it {
|
33
33
|
Vedeu::Launcher.expects(:execute!)
|
34
34
|
subject
|
35
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
|
45
36
|
end
|
46
37
|
|
47
38
|
describe '#start' do
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
describe Flags do
|
6
6
|
|
7
7
|
let(:described) { Vedeu::Flags }
|
8
8
|
|
@@ -42,6 +42,6 @@ module Vedeu
|
|
42
42
|
it { described.instance.must_respond_to(:reset!) }
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
end # Flags
|
46
46
|
|
47
47
|
end # Vedeu
|
@@ -13,7 +13,10 @@ module Vedeu
|
|
13
13
|
describe '.stop!' do
|
14
14
|
subject { described.stop! }
|
15
15
|
|
16
|
-
it {
|
16
|
+
it {
|
17
|
+
subject
|
18
|
+
described.instance_variable_get('@loop').must_equal(false)
|
19
|
+
}
|
17
20
|
end
|
18
21
|
|
19
22
|
describe '.safe_exit_point!' do
|
@@ -13,7 +13,7 @@ module Vedeu
|
|
13
13
|
|
14
14
|
end # SomeController
|
15
15
|
|
16
|
-
|
16
|
+
describe Router do
|
17
17
|
|
18
18
|
let(:described) { Vedeu::Router }
|
19
19
|
|
@@ -199,6 +199,6 @@ module Vedeu
|
|
199
199
|
it { described.must_respond_to(:reset) }
|
200
200
|
end
|
201
201
|
|
202
|
-
|
202
|
+
end # Router
|
203
203
|
|
204
204
|
end # Vedeu
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Templating
|
6
6
|
|
7
|
-
|
7
|
+
describe Decoder do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Templating::Decoder }
|
10
10
|
let(:instance) { described.new(data) }
|
@@ -31,7 +31,7 @@ module Vedeu
|
|
31
31
|
it { instance.must_respond_to(:process) }
|
32
32
|
end
|
33
33
|
|
34
|
-
|
34
|
+
end # Decoder
|
35
35
|
|
36
36
|
end # Templating
|
37
37
|
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Templating
|
6
6
|
|
7
|
-
|
7
|
+
describe Encoder do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Templating::Encoder }
|
10
10
|
let(:instance) { described.new(data) }
|
@@ -31,7 +31,7 @@ module Vedeu
|
|
31
31
|
it { instance.must_respond_to(:process) }
|
32
32
|
end
|
33
33
|
|
34
|
-
|
34
|
+
end # Encoder
|
35
35
|
|
36
36
|
end # Templating
|
37
37
|
|
@@ -4,7 +4,7 @@ module Vedeu
|
|
4
4
|
|
5
5
|
module Templating
|
6
6
|
|
7
|
-
|
7
|
+
describe ViewTemplate do
|
8
8
|
|
9
9
|
let(:described) { Vedeu::Templating::ViewTemplate }
|
10
10
|
let(:instance) { described.new(object, path, options) }
|
@@ -209,7 +209,7 @@ module Vedeu
|
|
209
209
|
it { instance.must_respond_to(:parse) }
|
210
210
|
end
|
211
211
|
|
212
|
-
|
212
|
+
end # ViewTemplate
|
213
213
|
|
214
214
|
end # Templating
|
215
215
|
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
5
|
-
|
5
|
+
describe TerminalMode do
|
6
6
|
|
7
7
|
let(:described) { Vedeu::TerminalMode }
|
8
8
|
|
@@ -67,6 +67,6 @@ module Vedeu
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
|
70
|
+
end # TerminalMode
|
71
71
|
|
72
72
|
end # Vedeu
|
data/vedeu.gemspec
CHANGED
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.5.
|
4
|
+
version: 0.5.12
|
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-08-
|
11
|
+
date: 2015-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - '='
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0.0.
|
201
|
+
version: 0.0.5
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - '='
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 0.0.
|
208
|
+
version: 0.0.5
|
209
209
|
description: A framework for building GUI/TUI terminal/console applications.
|
210
210
|
email:
|
211
211
|
- gavinlaking@gmail.com
|
@@ -235,6 +235,7 @@ files:
|
|
235
235
|
- config/rubocop_disabled.yml
|
236
236
|
- config/rubocop_enabled.yml
|
237
237
|
- docs/api.md
|
238
|
+
- docs/configuration.md
|
238
239
|
- docs/dsl.md
|
239
240
|
- docs/events.md
|
240
241
|
- docs/getting_started.md
|