vedeu 0.4.40 → 0.4.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +23 -28
  3. data/Guardfile +0 -8
  4. data/Rakefile +0 -6
  5. data/docs/applications.md +0 -1
  6. data/docs/dsl.md +7 -12
  7. data/examples/borders_app.rb +5 -0
  8. data/examples/configuration_app.rb +5 -0
  9. data/examples/drb_app.rb +5 -0
  10. data/examples/geometry_app.rb +5 -0
  11. data/examples/material_colours_app.rb +5 -0
  12. data/examples/panel_app.rb +5 -0
  13. data/examples/typed_commands/typed_commands_app.rb +5 -0
  14. data/examples/view_templates_app/view_templates_app.rb +5 -0
  15. data/lib/vedeu/api.rb +8 -8
  16. data/lib/vedeu/application/all.rb +3 -0
  17. data/lib/vedeu/application/application_controller.rb +4 -0
  18. data/lib/vedeu/application/application_helper.rb +4 -0
  19. data/lib/vedeu/application/application_view.rb +6 -0
  20. data/lib/vedeu/application/controller.rb +23 -0
  21. data/lib/vedeu/application/helper.rb +23 -0
  22. data/lib/vedeu/application/view.rb +23 -0
  23. data/lib/vedeu/application.rb +1 -3
  24. data/lib/vedeu/bindings.rb +64 -65
  25. data/lib/vedeu/bootstrap.rb +2 -0
  26. data/lib/vedeu/buffers/buffer.rb +44 -0
  27. data/lib/vedeu/configuration/api.rb +44 -119
  28. data/lib/vedeu/configuration/cli.rb +2 -0
  29. data/lib/vedeu/configuration/configuration.rb +4 -20
  30. data/lib/vedeu/cursor/cursor.rb +7 -7
  31. data/lib/vedeu/cursor/reposition.rb +2 -0
  32. data/lib/vedeu/dsl/border.rb +58 -2
  33. data/lib/vedeu/dsl/composition.rb +5 -3
  34. data/lib/vedeu/dsl/geometry.rb +14 -5
  35. data/lib/vedeu/dsl/group.rb +2 -0
  36. data/lib/vedeu/dsl/interface.rb +23 -3
  37. data/lib/vedeu/dsl/keymap.rb +11 -6
  38. data/lib/vedeu/dsl/line.rb +8 -0
  39. data/lib/vedeu/dsl/menu.rb +3 -1
  40. data/lib/vedeu/dsl/presentation.rb +12 -3
  41. data/lib/vedeu/dsl/text.rb +2 -0
  42. data/lib/vedeu/dsl/view.rb +6 -1
  43. data/lib/vedeu/events/event.rb +3 -1
  44. data/lib/vedeu/generator/application.rb +2 -7
  45. data/lib/vedeu/generator/templates/application/app/models/keymaps/_global_.rb +5 -0
  46. data/lib/vedeu/generator/templates/application/app/views/interfaces/name.erb +10 -0
  47. data/lib/vedeu/generator/view.rb +2 -0
  48. data/lib/vedeu/geometry/geometry.rb +14 -0
  49. data/lib/vedeu/geometry/index_position.rb +1 -0
  50. data/lib/vedeu/geometry/position.rb +5 -0
  51. data/lib/vedeu/input/all.rb +0 -8
  52. data/lib/vedeu/input/input.rb +24 -8
  53. data/lib/vedeu/input/mapper.rb +5 -12
  54. data/lib/vedeu/models/composition.rb +3 -3
  55. data/lib/vedeu/models/escape_char.rb +2 -0
  56. data/lib/vedeu/models/focus.rb +8 -0
  57. data/lib/vedeu/models/interface.rb +1 -1
  58. data/lib/vedeu/models/line.rb +1 -5
  59. data/lib/vedeu/models/menu.rb +4 -2
  60. data/lib/vedeu/models/panel.rb +2 -0
  61. data/lib/vedeu/null/buffer.rb +2 -0
  62. data/lib/vedeu/null/interface.rb +2 -0
  63. data/lib/vedeu/output/background.rb +1 -1
  64. data/lib/vedeu/output/border.rb +5 -157
  65. data/lib/vedeu/output/compressor.rb +2 -0
  66. data/lib/vedeu/output/foreground.rb +1 -1
  67. data/lib/vedeu/output/refresh.rb +5 -9
  68. data/lib/vedeu/output/render_border.rb +230 -0
  69. data/lib/vedeu/output/renderers/escape_sequence.rb +2 -3
  70. data/lib/vedeu/output/renderers/file.rb +10 -9
  71. data/lib/vedeu/repositories/collections/all.rb +4 -4
  72. data/lib/vedeu/repositories/repositories/all.rb +4 -4
  73. data/lib/vedeu/repositories/repositories/{background_colours.rb → backgrounds.rb} +3 -3
  74. data/lib/vedeu/repositories/repositories/cursors.rb +3 -0
  75. data/lib/vedeu/repositories/repositories/{events_repository.rb → events.rb} +5 -5
  76. data/lib/vedeu/repositories/repositories/{foreground_colours.rb → foregrounds.rb} +3 -3
  77. data/lib/vedeu/repositories/repositories/{interfaces_repository.rb → interfaces.rb} +4 -4
  78. data/lib/vedeu/storage/associative_store.rb +2 -0
  79. data/lib/vedeu/storage/conveyor_store.rb +2 -0
  80. data/lib/vedeu/storage/fifo_store.rb +2 -0
  81. data/lib/vedeu/storage/store.rb +7 -7
  82. data/lib/vedeu/support/options.rb +2 -0
  83. data/lib/vedeu/support/terminal.rb +3 -3
  84. data/lib/vedeu/support/timer.rb +2 -0
  85. data/lib/vedeu/support/visibility.rb +2 -0
  86. data/lib/vedeu/templating/directive.rb +2 -0
  87. data/lib/vedeu/templating/preprocessor.rb +2 -0
  88. data/lib/vedeu/version.rb +1 -1
  89. data/lib/vedeu.rb +3 -1
  90. data/test/lib/vedeu/bindings_test.rb +15 -0
  91. data/test/lib/vedeu/buffers/buffer_test.rb +12 -0
  92. data/test/lib/vedeu/configuration/api_test.rb +0 -39
  93. data/test/lib/vedeu/configuration/configuration_test.rb +0 -9
  94. data/test/lib/vedeu/cursor/cursor_test.rb +6 -0
  95. data/test/lib/vedeu/dsl/border_test.rb +12 -0
  96. data/test/lib/vedeu/dsl/composition_test.rb +2 -2
  97. data/test/lib/vedeu/geometry/index_position_test.rb +2 -0
  98. data/test/lib/vedeu/geometry/position_test.rb +6 -0
  99. data/test/lib/vedeu/models/cell_test.rb +16 -8
  100. data/test/lib/vedeu/models/char_test.rb +8 -0
  101. data/test/lib/vedeu/models/composition_test.rb +2 -2
  102. data/test/lib/vedeu/models/interface_test.rb +10 -0
  103. data/test/lib/vedeu/models/line_test.rb +12 -0
  104. data/test/lib/vedeu/models/stream_test.rb +1 -13
  105. data/test/lib/vedeu/output/border_test.rb +1 -0
  106. data/test/lib/vedeu/output/presentation_test.rb +2 -0
  107. data/test/lib/vedeu/output/render_border_test.rb +16 -0
  108. data/test/lib/vedeu/output/renderers/file_test.rb +32 -16
  109. data/test/lib/vedeu/repositories/collection_test.rb +7 -0
  110. data/test/lib/vedeu/repositories/collections/all_test.rb +18 -6
  111. data/test/lib/vedeu/repositories/model_test.rb +33 -7
  112. data/test/lib/vedeu/repositories/repositories/{background_colours_test.rb → backgrounds_test.rb} +3 -3
  113. data/test/lib/vedeu/repositories/repositories/borders_test.rb +7 -17
  114. data/test/lib/vedeu/repositories/repositories/buffers_test.rb +7 -22
  115. data/test/lib/vedeu/repositories/repositories/cursors_test.rb +32 -0
  116. data/test/lib/vedeu/repositories/repositories/events_test.rb +22 -0
  117. data/test/lib/vedeu/repositories/repositories/{foreground_colours_test.rb → foregrounds_test.rb} +3 -3
  118. data/test/lib/vedeu/repositories/repositories/geometries_test.rb +7 -21
  119. data/test/lib/vedeu/repositories/repositories/groups_test.rb +11 -0
  120. data/test/lib/vedeu/repositories/repositories/{interfaces_repositories_test.rb → interfaces_test.rb} +14 -3
  121. data/test/lib/vedeu/repositories/repositories/keymaps_test.rb +10 -1
  122. data/test/lib/vedeu/repositories/repositories/menus_test.rb +10 -1
  123. data/test/lib/vedeu/repositories/repository_test.rb +15 -9
  124. data/test/lib/vedeu/storage/conveyor_store_test.rb +2 -4
  125. data/test/lib/vedeu/support/terminal_test.rb +2 -2
  126. data/test/lib/vedeu/templating/helpers_test.rb +4 -0
  127. data/vedeu.gemspec +0 -2
  128. metadata +20 -54
  129. data/config/cucumber.yml +0 -8
  130. data/features/cli_vedeu.feature +0 -5
  131. data/features/start_stop.feature +0 -27
  132. data/features/step_definitions/vedeu_steps.rb +0 -0
  133. data/features/support/env.rb +0 -15
  134. data/lib/vedeu/generator/templates/application/app/models/keymaps/_system_.rb +0 -7
  135. data/test/lib/vedeu/repositories/repositories/events_repository_test.rb +0 -13
  136. data/test/lib/vedeu/repositories/repositories/interfaces_repository_test.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f097662b914c6da5ad5928cf49ed800854dc0062
4
- data.tar.gz: ee5e7fc8f279cc4613ae8f1b7df48dd4fb8515bd
3
+ metadata.gz: d5bade3d3d45fdc2dd04f64bacfe2e42350b5b98
4
+ data.tar.gz: a4f39d6b2625bb378ce2b84d5b7f16c3f2cd5529
5
5
  SHA512:
6
- metadata.gz: c6faaf146d5888abee75910a14b5c3dd1846a738c7d77b19efe2b4d17b4cdf3747ac2f4db03cd48a0bd7b9131516efe5b135487d6be569f132bcdfba0f7107a6
7
- data.tar.gz: 522fd6ec674864207e9244bb8bbb48c9b35fb8c9db218391b195b7481476e7f4d0b32f14cbf0585a7c469db303249ab5b7f1581e9069889782ed5168093d2b66
6
+ metadata.gz: 43b4cf698da18c2ac3579730abcf18ad1bd9bb013048aa0a0c8542987b324196e52294e599771cd6da7bf62aa61b5d2c557dc95501576efc0f724f0a39c56ba9
7
+ data.tar.gz: 5ea2e7f70d2b77fb389d94f6eba5d2c2413bd12ff158a97f8d0f62ef7fd947cc1a3ba9adee689feef3c62e34aa86f8ff7b8a7a79e41ba3681cd521fe23fc7c11
data/Dockerfile CHANGED
@@ -3,32 +3,38 @@ MAINTAINER Gavin Laking <gavinlaking@gmail.com>
3
3
 
4
4
  # Build dependencies
5
5
  RUN apt-get update && apt-get install -y --force-yes \
6
- software-properties-common \
6
+ autoconf \
7
+ automake \
8
+ bison \
7
9
  build-essential \
8
- openssl \
9
10
  ca-certificates \
10
- git-core \
11
- autoconf \
11
+ curl \
12
12
  gawk \
13
- libreadline-dev \
14
- libyaml-dev \
13
+ git-core \
14
+ libffi-dev \
15
15
  libgdbm-dev \
16
16
  libncurses5-dev \
17
- automake \
17
+ libreadline-dev \
18
+ libssl-dev \
18
19
  libtool \
19
- bison \
20
+ libxml2-dev \
21
+ libxslt-dev \
22
+ libyaml-dev \
23
+ make \
24
+ openssl \
20
25
  pkg-config \
21
- curl \
22
- wget \
26
+ software-properties-common \
23
27
  vim \
24
- libxslt-dev \
25
- libxml2-dev \
26
- libffi-dev \
27
- libssl-dev \
28
- zlib1g-dev \
29
- make
28
+ wget \
29
+ zlib1g-dev
30
+
30
31
  RUN apt-get clean -y && apt-get autoremove -y
31
32
 
33
+ # Create a fake home directory
34
+ RUN usr/sbin/useradd --create-home --home-dir /home/vedeu --shell /bin/bash vedeu
35
+ RUN mkdir /home/vedeu/gem
36
+ RUN chown -R vedeu:vedeu /home/vedeu
37
+
32
38
  # Chruby
33
39
  RUN wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
34
40
  RUN tar -xzvf chruby-0.3.9.tar.gz && cd chruby-0.3.9/ && make install
@@ -39,6 +45,7 @@ RUN tar -xzvf ruby-install-0.5.0.tar.gz && cd ruby-install-0.5.0/ && make instal
39
45
 
40
46
  # Install Ruby 2.2.2
41
47
  RUN ruby-install ruby 2.2.2
48
+ RUN chown -R vedeu:vedeu /opt/rubies
42
49
 
43
50
  # Setup Chruby
44
51
  RUN echo '[ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ] || return' >> /etc/profile.d/chruby.sh
@@ -50,20 +57,8 @@ RUN echo "---\n:benchmark: false\n:bulk_threshold: 1000\n:backtrace: false\n:ver
50
57
  # Setup PATH
51
58
  ENV PATH /opt/rubies/ruby-2.2.2/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vedeu/gem/bin
52
59
 
53
- # Get ruby version
54
- RUN ruby -v
55
-
56
- # Create a fake home directory
57
- RUN usr/sbin/useradd --create-home --home-dir /home/vedeu --shell /bin/bash vedeu
58
-
59
- # Make files
60
- RUN mkdir /home/vedeu/gem
61
- RUN chown -R vedeu:vedeu /home/vedeu
62
- RUN chown -R vedeu:vedeu /opt/rubies
63
60
  RUN gem install bundler
64
61
 
65
- # VOLUME .:/home/vedeu/gem
66
-
67
62
  ADD . /home/vedeu/gem/
68
63
  WORKDIR /home/vedeu
69
64
  USER vedeu
data/Guardfile CHANGED
@@ -1,11 +1,3 @@
1
- # guard 'cucumber' do
2
- # watch(%r{^features/.+\.feature$})
3
- # watch(%r{^features/support/.+$}) { 'features' }
4
- # watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
5
- # Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
6
- # end
7
- # end
8
-
9
1
  guard :minitest, all_after_pass: true,
10
2
  focus_on_failed: true,
11
3
  env: { 'no_simplecov' => true } do
data/Rakefile CHANGED
@@ -1,15 +1,9 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
- # require 'cucumber'
4
- # require 'cucumber/rake/task'
5
3
  require 'inch/rake'
6
4
  require 'yard'
7
5
  require 'rubocop/rake_task'
8
6
 
9
- # Cucumber::Rake::Task.new(:cucumber) do |t|
10
- # t.cucumber_opts = 'features --format progress'
11
- # end
12
-
13
7
  Rake::TestTask.new(:test) do |t|
14
8
  t.libs.push 'lib'
15
9
  t.libs.push 'test'
data/docs/applications.md CHANGED
@@ -19,7 +19,6 @@ hopefully these generators will get you off the ground.
19
19
  | |- models/
20
20
  | | |- keymaps/
21
21
  | | |- _global_.rb
22
- | | |- _system_.rb
23
22
  | |
24
23
  | |- views/
25
24
  | |- interfaces/
data/docs/dsl.md CHANGED
@@ -6,7 +6,7 @@ Coupled with the API (for interacting with the running client application), the
6
6
 
7
7
  An Interface is a basic element in the GUI. It usually but does not necessarily
8
8
  correspond to a region of the terminal screen (for example, an Interface might
9
- not be displayed at certain points in an application life cycle).
9
+ not be displayed at certain points in an application life cycle).
10
10
 
11
11
  Much of the behavior of an Interface comes from child objects that are defined
12
12
  under the Interface. These objects are described in more detail in their
@@ -23,16 +23,16 @@ interface 'main' do
23
23
  background: '#000033' # and background colors
24
24
  group 'general' # set interface group
25
25
 
26
- geometry do
26
+ geometry do
27
27
  # size and position details
28
28
  end
29
- border do
29
+ border do
30
30
  # border properties
31
31
  end
32
- keymap do
32
+ keymap do
33
33
  # keymap that is in effect when this interface is focused
34
34
  end
35
- views do
35
+ views do
36
36
  # details about how to render the interface
37
37
  end
38
38
  end
@@ -46,9 +46,9 @@ an `interface` block or explicitly, by passing the interface name as a first
46
46
  argument to the declaration.
47
47
 
48
48
  That is, these are equivalent ways to declare a Geometry for an existing
49
- interface
49
+ interface
50
50
 
51
- ```ruby
51
+ ```ruby
52
52
  interface 'main' do
53
53
  geometry do
54
54
  # some geometry
@@ -130,11 +130,6 @@ Interfaces can be configured to be part of a named group. Once an interface is a
130
130
 
131
131
  ### Keymaps
132
132
 
133
- There are two built in keymaps with Vedeu, 'system' (keys needed by Vedeu to
134
- operate, e.g. 'q' for quit, to quit the client application), and 'global' which
135
- holds keys which perform actions no matter which interface is currently
136
- focussed.
137
-
138
133
  You can define keymaps by name which matches a defined interface. When that
139
134
  interface is in focus, keys pressed as part of this definition will affect
140
135
  that interface. This allows you to form context driven behaviour for your
@@ -168,6 +168,11 @@ class VedeuBordersApp
168
168
 
169
169
  keymap '_global_' do
170
170
  key('r') { Vedeu.trigger(:_refresh_) }
171
+
172
+ key('q') { Vedeu.trigger(:_exit_) }
173
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
174
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
175
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
171
176
  end
172
177
 
173
178
  # Borders can be defined as part of a view (see below), or standalone.
@@ -47,6 +47,11 @@ class VedeuConfigurationApp
47
47
 
48
48
  keymap('config') do
49
49
  key(' ') { Vedeu.trigger(:_refresh_, 'config') }
50
+
51
+ key('q') { Vedeu.trigger(:_exit_) }
52
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
53
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
54
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
50
55
  end
51
56
 
52
57
  def self.start(argv = ARGV)
data/examples/drb_app.rb CHANGED
@@ -81,6 +81,11 @@ class VedeuTestApplication
81
81
  key(:right, 'l') { Vedeu.trigger(:_cursor_right_) }
82
82
  key(:down, 'j') { Vedeu.trigger(:_cursor_down_) }
83
83
  key(:left, 'h') { Vedeu.trigger(:_cursor_left_) }
84
+
85
+ key('q') { Vedeu.trigger(:_exit_) }
86
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
87
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
88
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
84
89
  end
85
90
 
86
91
  Vedeu.menu 'test_interface' do
@@ -52,6 +52,11 @@ class VedeuGeometryApp
52
52
  key(:right, 'l') { Vedeu.trigger(:_cursor_right_) }
53
53
  key(:down, 'j') { Vedeu.trigger(:_cursor_down_) }
54
54
  key(:left, 'h') { Vedeu.trigger(:_cursor_left_) }
55
+
56
+ key('q') { Vedeu.trigger(:_exit_) }
57
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
58
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
59
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
55
60
  end
56
61
 
57
62
  renders do
@@ -64,6 +64,11 @@ class VedeuMaterialColoursApp
64
64
  key(:down) { Vedeu.trigger(:_cursor_down_) }
65
65
  key(:left) { Vedeu.trigger(:_cursor_left_) }
66
66
 
67
+ key('q') { Vedeu.trigger(:_exit_) }
68
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
69
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
70
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
71
+
67
72
  key('a') { Vedeu.trigger(:_view_left_, 'main_interface') }
68
73
  key('s') { Vedeu.trigger(:_view_down_, 'main_interface') }
69
74
  key('d') { Vedeu.trigger(:_view_up_, 'main_interface') }
@@ -44,6 +44,11 @@ class VedeuPanelApp
44
44
  key(:right) { Vedeu.trigger(:_cursor_right_) }
45
45
  key(:down) { Vedeu.trigger(:_cursor_down_) }
46
46
  key(:left) { Vedeu.trigger(:_cursor_left_) }
47
+
48
+ key('q') { Vedeu.trigger(:_exit_) }
49
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
50
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
51
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
47
52
  end
48
53
 
49
54
  renders do
@@ -38,6 +38,11 @@ class VedeuTypedCommands
38
38
  key(:right, 'l') { Vedeu.trigger(:_cursor_right_) }
39
39
  key(:down, 'j') { Vedeu.trigger(:_cursor_down_) }
40
40
  key(:left, 'h') { Vedeu.trigger(:_cursor_left_) }
41
+
42
+ key('q') { Vedeu.trigger(:_exit_) }
43
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
44
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
45
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
41
46
  end
42
47
 
43
48
  border('output') do
@@ -35,6 +35,11 @@ class VedeuViewTemplateApp
35
35
  key(:right, 'l') { Vedeu.trigger(:_cursor_right_) }
36
36
  key(:down, 'j') { Vedeu.trigger(:_cursor_down_) }
37
37
  key(:left, 'h') { Vedeu.trigger(:_cursor_left_) }
38
+
39
+ key('q') { Vedeu.trigger(:_exit_) }
40
+ key(:escape) { Vedeu.trigger(:_mode_switch_) }
41
+ key(:shift_tab) { Vedeu.trigger(:_focus_prev_) }
42
+ key(:tab) { Vedeu.trigger(:_focus_next_) }
38
43
  end
39
44
 
40
45
  Vedeu.border('default') do
data/lib/vedeu/api.rb CHANGED
@@ -34,8 +34,8 @@ module Vedeu
34
34
  module_function
35
35
 
36
36
  # @!method background_colours
37
- # @see Vedeu::BackgroundColours.background_colours
38
- def_delegators Vedeu::BackgroundColours, :background_colours
37
+ # @see Vedeu::Backgrounds.background_colours
38
+ def_delegators Vedeu::Backgrounds, :background_colours
39
39
 
40
40
  # @!method borders
41
41
  # @see Vedeu::Borders.borders
@@ -88,8 +88,8 @@ module Vedeu
88
88
  def_delegators Vedeu::Event, :bind, :unbind
89
89
 
90
90
  # @!method events
91
- # @see Vedeu::EventsRepository.events
92
- def_delegators Vedeu::EventsRepository, :events
91
+ # @see Vedeu::Events.events
92
+ def_delegators Vedeu::Events, :events
93
93
 
94
94
  # @!method focus
95
95
  # @see Vedeu::Focus#focus
@@ -105,8 +105,8 @@ module Vedeu
105
105
  :focus_next, :focus_previous
106
106
 
107
107
  # @!method foreground_colours
108
- # @see Vedeu::ForegroundColours.foreground_colours
109
- def_delegators Vedeu::ForegroundColours, :foreground_colours
108
+ # @see Vedeu::Foregrounds.foreground_colours
109
+ def_delegators Vedeu::Foregrounds, :foreground_colours
110
110
 
111
111
  # @!method geometries
112
112
  # @see Vedeu::Geometries.geometries
@@ -117,8 +117,8 @@ module Vedeu
117
117
  def_delegators Vedeu::Groups, :groups
118
118
 
119
119
  # @!method interfaces
120
- # @see Vedeu::InterfacesRepository.interfaces
121
- def_delegators Vedeu::InterfacesRepository, :interfaces
120
+ # @see Vedeu::Interfaces.interfaces
121
+ def_delegators Vedeu::Interfaces, :interfaces
122
122
 
123
123
  # @!method keymaps
124
124
  # @see Vedeu::Keymaps.keymaps
@@ -1,3 +1,6 @@
1
+ require_relative 'controller'
2
+ require_relative 'helper'
3
+ require_relative 'view'
1
4
  require_relative 'application_controller'
2
5
  require_relative 'application_helper'
3
6
  require_relative 'application_view'
@@ -1,3 +1,5 @@
1
+ require_relative 'controller'
2
+
1
3
  module Vedeu
2
4
 
3
5
  # Provides methods which should be available to all client application
@@ -6,6 +8,8 @@ module Vedeu
6
8
  # @api private
7
9
  class ApplicationController
8
10
 
11
+ include Vedeu::Controller
12
+
9
13
  end # ApplicationController
10
14
 
11
15
  end # Vedeu
@@ -1,3 +1,5 @@
1
+ require_relative 'helper'
2
+
1
3
  module Vedeu
2
4
 
3
5
  # Provides methods which should be available to all client application
@@ -6,6 +8,8 @@ module Vedeu
6
8
  # @api private
7
9
  module ApplicationHelper
8
10
 
11
+ include Vedeu::Helper
12
+
9
13
  end # ApplicationHelper
10
14
 
11
15
  end # Vedeu
@@ -1,3 +1,5 @@
1
+ require_relative 'view'
2
+
1
3
  module Vedeu
2
4
 
3
5
  # Provides the mechanism to render views for the client application.
@@ -5,6 +7,8 @@ module Vedeu
5
7
  # @api private
6
8
  class ApplicationView
7
9
 
10
+ include Vedeu::View
11
+
8
12
  # Renders the view.
9
13
  #
10
14
  # @param object [void]
@@ -13,6 +17,8 @@ module Vedeu
13
17
  new(object).render
14
18
  end
15
19
 
20
+ # Returns a new instance of Vedeu::ApplicationView.
21
+ #
16
22
  # @param object [void]
17
23
  # @return [Vedeu::ApplicationView]
18
24
  def initialize(object = nil)
@@ -0,0 +1,23 @@
1
+ module Vedeu
2
+
3
+ module Controller
4
+
5
+ module ClassMethods
6
+ end # ClassMethods
7
+
8
+ module InstanceMethods
9
+ end # InstanceMethods
10
+
11
+ # When this module is included in a class, provide ClassMethods as class
12
+ # methods for the class.
13
+ #
14
+ # @param klass [Class]
15
+ # @return [void]
16
+ def self.included(klass)
17
+ klass.send :extend, ClassMethods
18
+ klass.send :include, InstanceMethods
19
+ end
20
+
21
+ end # Controller
22
+
23
+ end # Vedeu
@@ -0,0 +1,23 @@
1
+ module Vedeu
2
+
3
+ module Helper
4
+
5
+ module ClassMethods
6
+ end # ClassMethods
7
+
8
+ module InstanceMethods
9
+ end # InstanceMethods
10
+
11
+ # When this module is included in a class, provide ClassMethods as class
12
+ # methods for the class.
13
+ #
14
+ # @param klass [Class]
15
+ # @return [void]
16
+ def self.included(klass)
17
+ klass.send :extend, ClassMethods
18
+ klass.send :include, InstanceMethods
19
+ end
20
+
21
+ end # Helper
22
+
23
+ end # Vedeu
@@ -0,0 +1,23 @@
1
+ module Vedeu
2
+
3
+ module View
4
+
5
+ module ClassMethods
6
+ end # ClassMethods
7
+
8
+ module InstanceMethods
9
+ end # InstanceMethods
10
+
11
+ # When this module is included in a class, provide ClassMethods as class
12
+ # methods for the class.
13
+ #
14
+ # @param klass [Class]
15
+ # @return [void]
16
+ def self.included(klass)
17
+ klass.send :extend, ClassMethods
18
+ klass.send :include, InstanceMethods
19
+ end
20
+
21
+ end # View
22
+
23
+ end # Vedeu
@@ -52,15 +52,13 @@ module Vedeu
52
52
  def start
53
53
  Vedeu.trigger(:_drb_start_)
54
54
 
55
- output = Vedeu::Terminal.open do
55
+ Vedeu::Terminal.open do
56
56
  Vedeu::Terminal.set_cursor_mode
57
57
 
58
58
  Vedeu.trigger(:_initialize_)
59
59
 
60
60
  runner { main_sequence }
61
61
  end
62
-
63
- output
64
62
  end
65
63
 
66
64
  protected