vedeu 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/docs/api.md +0 -357
  3. data/docs/configuration.md +1 -1
  4. data/docs/dsl/by_method/add_command.md +5 -0
  5. data/docs/dsl/by_method/add_keypress.md +4 -0
  6. data/docs/dsl/by_method/all_commands.md +3 -0
  7. data/docs/dsl/by_method/all_keypresses.md +3 -0
  8. data/docs/dsl/by_method/background_colours.md +4 -0
  9. data/docs/dsl/by_method/bind.md +43 -0
  10. data/docs/dsl/by_method/bind_alias.md +4 -0
  11. data/docs/dsl/by_method/borders.md +6 -0
  12. data/docs/dsl/by_method/bound.md +3 -0
  13. data/docs/dsl/by_method/buffer_update.md +1 -0
  14. data/docs/dsl/by_method/buffer_write.md +1 -0
  15. data/docs/dsl/by_method/buffers.md +5 -0
  16. data/docs/dsl/by_method/clear_by_group.md +1 -0
  17. data/docs/dsl/by_method/clear_by_name.md +1 -0
  18. data/docs/dsl/by_method/clear_content_by_name.md +1 -0
  19. data/docs/dsl/by_method/clock_time.md +1 -0
  20. data/docs/dsl/by_method/cursor.md +1 -0
  21. data/docs/dsl/by_method/cursors.md +1 -0
  22. data/docs/dsl/by_method/direct_write.md +1 -0
  23. data/docs/dsl/by_method/documents.md +1 -0
  24. data/docs/dsl/by_method/drb_restart.md +1 -0
  25. data/docs/dsl/by_method/drb_start.md +1 -0
  26. data/docs/dsl/by_method/drb_status.md +1 -0
  27. data/docs/dsl/by_method/drb_stop.md +1 -0
  28. data/docs/dsl/by_method/events.md +1 -0
  29. data/docs/dsl/by_method/exit.md +1 -0
  30. data/docs/dsl/by_method/focus.md +1 -0
  31. data/docs/dsl/by_method/focus_by_name.md +1 -0
  32. data/docs/dsl/by_method/focus_next.md +1 -0
  33. data/docs/dsl/by_method/focus_previous.md +1 -0
  34. data/docs/dsl/by_method/focussed.md +1 -0
  35. data/docs/dsl/by_method/geometries.md +1 -0
  36. data/docs/dsl/by_method/geometry.md +1 -0
  37. data/docs/dsl/by_method/goto.md +5 -6
  38. data/docs/dsl/by_method/group.md +1 -0
  39. data/docs/dsl/by_method/groups.md +1 -0
  40. data/docs/dsl/by_method/hide_cursor.md +1 -0
  41. data/docs/dsl/by_method/hide_group.md +1 -0
  42. data/docs/dsl/by_method/hide_interface.md +1 -0
  43. data/docs/dsl/by_method/interface.md +1 -0
  44. data/docs/dsl/by_method/interfaces.md +1 -0
  45. data/docs/dsl/by_method/keymap.md +1 -0
  46. data/docs/dsl/by_method/keymap/interface.md +1 -0
  47. data/docs/dsl/by_method/keymap/key.md +1 -0
  48. data/docs/dsl/by_method/keymap/name.md +1 -0
  49. data/docs/dsl/by_method/keymaps.md +1 -0
  50. data/docs/dsl/by_method/last_command.md +4 -0
  51. data/docs/dsl/by_method/last_keypress.md +4 -0
  52. data/docs/dsl/by_method/log.md +1 -0
  53. data/docs/dsl/by_method/log_stderr.md +1 -0
  54. data/docs/dsl/by_method/log_stdout.md +1 -0
  55. data/docs/dsl/by_method/log_timestamp.md +1 -0
  56. data/docs/dsl/by_method/menu.md +1 -0
  57. data/docs/dsl/by_method/menus.md +1 -0
  58. data/docs/dsl/by_method/read.md +33 -0
  59. data/docs/dsl/by_method/ready.md +1 -0
  60. data/docs/dsl/by_method/render.md +1 -0
  61. data/docs/dsl/by_method/render_output.md +1 -0
  62. data/docs/dsl/by_method/renderer.md +1 -0
  63. data/docs/dsl/by_method/renderers.md +1 -0
  64. data/docs/dsl/by_method/renders.md +1 -0
  65. data/docs/dsl/by_method/show_cursor.md +1 -0
  66. data/docs/dsl/by_method/show_group.md +1 -0
  67. data/docs/dsl/by_method/show_interface.md +1 -0
  68. data/docs/dsl/by_method/toggle_cursor.md +1 -0
  69. data/docs/dsl/by_method/toggle_group.md +1 -0
  70. data/docs/dsl/by_method/toggle_interface.md +1 -0
  71. data/docs/dsl/by_method/trigger.md +1 -0
  72. data/docs/dsl/by_method/unbind.md +5 -0
  73. data/docs/dsl/by_method/unbind_alias.md +4 -0
  74. data/docs/dsl/by_method/views.md +1 -0
  75. data/docs/dsl/by_method/write.md +5 -0
  76. data/examples/views/lines_streams.rb +45 -0
  77. data/lib/vedeu/application/application_view.rb +1 -1
  78. data/lib/vedeu/borders/border.rb +2 -2
  79. data/lib/vedeu/cells/border.rb +1 -1
  80. data/lib/vedeu/cells/borders/bottom_horizontal.rb +1 -1
  81. data/lib/vedeu/cells/borders/bottom_left.rb +1 -1
  82. data/lib/vedeu/cells/borders/bottom_right.rb +1 -1
  83. data/lib/vedeu/cells/borders/horizontal.rb +1 -1
  84. data/lib/vedeu/cells/borders/left_vertical.rb +1 -1
  85. data/lib/vedeu/cells/borders/right_vertical.rb +1 -1
  86. data/lib/vedeu/cells/borders/top_horizontal.rb +1 -1
  87. data/lib/vedeu/cells/borders/top_left.rb +1 -1
  88. data/lib/vedeu/cells/borders/top_right.rb +1 -1
  89. data/lib/vedeu/cells/borders/vertical.rb +1 -1
  90. data/lib/vedeu/colours/background.rb +1 -1
  91. data/lib/vedeu/colours/foreground.rb +1 -1
  92. data/lib/vedeu/colours/translator.rb +4 -7
  93. data/lib/vedeu/colours/validator.rb +1 -1
  94. data/lib/vedeu/configuration/api.rb +1 -1
  95. data/lib/vedeu/configuration/configuration.rb +20 -11
  96. data/lib/vedeu/cursors/cursor.rb +2 -2
  97. data/lib/vedeu/distributed/server.rb +7 -7
  98. data/lib/vedeu/dsl/views.rb +1 -1
  99. data/lib/vedeu/esc/background.rb +1 -1
  100. data/lib/vedeu/esc/colours.rb +3 -0
  101. data/lib/vedeu/esc/esc.rb +11 -25
  102. data/lib/vedeu/esc/mouse.rb +14 -0
  103. data/lib/vedeu/events/aliases.rb +2 -13
  104. data/lib/vedeu/events/event.rb +2 -13
  105. data/lib/vedeu/input/read.rb +3 -3
  106. data/lib/vedeu/input/store.rb +6 -37
  107. data/lib/vedeu/interfaces/interface.rb +1 -1
  108. data/lib/vedeu/logging/debug.rb +1 -1
  109. data/lib/vedeu/logging/log.rb +6 -17
  110. data/lib/vedeu/logging/timer.rb +1 -1
  111. data/lib/vedeu/models/row.rb +1 -1
  112. data/lib/vedeu/output/write.rb +1 -3
  113. data/lib/vedeu/presentation/style.rb +1 -3
  114. data/lib/vedeu/renderers/all.rb +2 -2
  115. data/lib/vedeu/renderers/file.rb +1 -1
  116. data/lib/vedeu/renderers/options.rb +1 -1
  117. data/lib/vedeu/runtime/application.rb +10 -19
  118. data/lib/vedeu/runtime/bootstrap.rb +4 -4
  119. data/lib/vedeu/runtime/launcher.rb +3 -5
  120. data/lib/vedeu/terminal/mode.rb +1 -1
  121. data/lib/vedeu/terminal/terminal.rb +9 -10
  122. data/lib/vedeu/version.rb +1 -1
  123. data/lib/vedeu/views/char.rb +1 -1
  124. data/lib/vedeu/views/view.rb +1 -1
  125. data/test/lib/vedeu/colours/background_test.rb +1 -1
  126. data/test/lib/vedeu/configuration/api_test.rb +1 -1
  127. data/test/lib/vedeu/cursors/cursor_test.rb +2 -5
  128. data/test/lib/vedeu/distributed/server_test.rb +2 -2
  129. data/test/lib/vedeu/esc/mouse_test.rb +29 -1
  130. data/test/lib/vedeu/logging/timer_test.rb +2 -2
  131. data/test/lib/vedeu/renderers/html_test.rb +1 -1
  132. data/test/lib/vedeu/renderers/json_test.rb +1 -1
  133. data/test/lib/vedeu/renderers/options_test.rb +4 -4
  134. data/test/lib/vedeu/runtime/application_test.rb +4 -9
  135. data/test/lib/vedeu/runtime/bootstrap_test.rb +1 -1
  136. data/test/lib/vedeu/runtime/launcher_test.rb +1 -1
  137. data/test/lib/vedeu/terminal/mode_test.rb +5 -5
  138. data/test/lib/vedeu/terminal/terminal_test.rb +2 -2
  139. data/test/support/examples/material_colours_app.rb +2 -5
  140. data/test/test_helper.rb +1 -1
  141. metadata +5 -3
  142. data/examples/views/lines_streams_stream.rb +0 -48
@@ -80,12 +80,12 @@ module Vedeu
80
80
 
81
81
  # @return [String]
82
82
  def mouse_off
83
- Vedeu::EscapeSequences::Esc.mouse_x10_off
83
+ Vedeu.esc.mouse_x10_off
84
84
  end
85
85
 
86
86
  # @return [String]
87
87
  def show_cursor
88
- Vedeu::EscapeSequences::Esc.show_cursor
88
+ Vedeu.esc.show_cursor
89
89
  end
90
90
 
91
91
  # @return [String]
@@ -103,7 +103,7 @@ module Vedeu
103
103
 
104
104
  elsif fake?
105
105
  console.cooked do
106
- Vedeu::Terminal.output(mouse_off + show_cursor)
106
+ Vedeu::Terminal.debugging!
107
107
 
108
108
  console.gets.chomp
109
109
  end
@@ -10,70 +10,39 @@ module Vedeu
10
10
 
11
11
  extend self
12
12
 
13
- # Add a command (a collection of characters/keypresses from an
14
- # Editor::Document) to the store. Used by Vedeu internally to
15
- # store commands entered.
16
- #
17
- # @example
18
- # Vedeu.add_command(:some_command)
19
- #
13
+ # {include:file:docs/dsl/by_method/add_command.md}
20
14
  # @param command [Symbol|String]
21
15
  # @return [Hash<Symbol => Array<Symbol|String>>]
22
16
  def add_command(command)
23
17
  all_commands << command
24
18
  end
25
19
 
26
- # Add a keypress to the store. Used by Vedeu internally to
27
- # store a keypress entered.
28
- #
29
- # @example
30
- # Vedeu.add_keypress(:escape)
31
- #
20
+ # {include:file:docs/dsl/by_method/add_keypress.md}
32
21
  # @param keypress [Symbol|String]
33
22
  # @return [Hash<Symbol => Array<Symbol|String>>]
34
23
  def add_keypress(keypress)
35
24
  all_keypresses << keypress
36
25
  end
37
26
 
38
- # Access all commands stored.
39
- #
40
- # @example
41
- # Vedeu.all_commands
42
- #
27
+ # {include:file:docs/dsl/by_method/all_commands.md}
43
28
  # @return [Array<Symbol|String>]
44
29
  def all_commands
45
30
  storage[:commands]
46
31
  end
47
32
 
48
- # Access all keypresses stored.
49
- #
50
- # @example
51
- # Vedeu.all_keypresses
52
- #
33
+ # {include:file:docs/dsl/by_method/all_keypresses.md}
53
34
  # @return [Array<Symbol|String>]
54
35
  def all_keypresses
55
36
  storage[:keypresses]
56
37
  end
57
38
 
58
- # Access the last command stored. If no commands have been
59
- # entered since the client application started, then this will
60
- # return nil.
61
- #
62
- # @example
63
- # Vedeu.last_command
64
- #
39
+ # {include:file:docs/dsl/by_method/last_command.md}
65
40
  # @return [NilClass|Symbol|String]
66
41
  def last_command
67
42
  all_commands[-1]
68
43
  end
69
44
 
70
- # Access the last keypress stored. If no keys have been pressed
71
- # since the client application started, then this will return
72
- # nil.
73
- #
74
- # @example
75
- # Vedeu.last_keypress
76
- #
45
+ # {include:file:docs/dsl/by_method/last_keypress.md}
77
46
  # @return [NilClass|Symbol|String]
78
47
  def last_keypress
79
48
  all_keypresses[-1]
@@ -146,7 +146,7 @@ module Vedeu
146
146
  def defaults
147
147
  {
148
148
  client: nil,
149
- colour: Vedeu::Configuration.colour,
149
+ colour: Vedeu.config.colour,
150
150
  cursor_visible: true,
151
151
  delay: 0.0,
152
152
  editable: false,
@@ -18,7 +18,7 @@ module Vedeu
18
18
  Vedeu.requires_gem!('pry')
19
19
 
20
20
  if obj
21
- message = ::Pry::ColorPrinter.pp(obj, '')
21
+ message = ::Pry::ColorPrinter.pp(obj, ''.dup)
22
22
 
23
23
  Vedeu.log(type: :debug, message: message)
24
24
 
@@ -28,7 +28,8 @@ module Vedeu
28
28
  def log(message:, force: false, type: :info)
29
29
  output = log_entry(type, message)
30
30
 
31
- if (enabled? || force) && Vedeu::Configuration.loggable?(type)
31
+ if (Vedeu.config.log? || force) &&
32
+ Vedeu.config.loggable?(type)
32
33
  logger.debug(output)
33
34
  end
34
35
 
@@ -77,7 +78,7 @@ module Vedeu
77
78
 
78
79
  # @return [Boolean]
79
80
  def logger
80
- MonoLogger.new(log_file).tap do |log|
81
+ MonoLogger.new(Vedeu.config.log).tap do |log|
81
82
  log.formatter = proc do |_, _, _, message|
82
83
  formatted_message(message)
83
84
  end
@@ -107,23 +108,11 @@ module Vedeu
107
108
  colours = message_types.fetch(type, [:default, :default])
108
109
 
109
110
  [
110
- Vedeu::EscapeSequences::Esc.colour(colours[0]) do
111
- "[#{type}]".ljust(11)
112
- end,
113
- Vedeu::EscapeSequences::Esc.colour(colours[1]) do
114
- message
115
- end,
116
- ].join('')
111
+ Vedeu.esc.colour(colours[0]) { "[#{type}]".ljust(11) },
112
+ Vedeu.esc.colour(colours[1]) { message },
113
+ ].join
117
114
  end
118
115
 
119
- # Fetches the filename from the configuration.
120
- #
121
- # @return [String]
122
- def log_file
123
- Vedeu::Configuration.log
124
- end
125
- alias_method :enabled?, :log_file
126
-
127
116
  # The defined message types for Vedeu with their respective
128
117
  # colours. When used, produces a log entry of the format:
129
118
  #
@@ -41,7 +41,7 @@ module Vedeu
41
41
  def measure(&block)
42
42
  fail Vedeu::Error::RequiresBlock unless block_given?
43
43
 
44
- if Vedeu::Configuration.debug?
44
+ if Vedeu.config.debug?
45
45
  work = yield
46
46
 
47
47
  Vedeu.log(type: :timer,
@@ -81,7 +81,7 @@ module Vedeu
81
81
  #
82
82
  # @return [Vedeu::Views::Char]
83
83
  def reset_character
84
- Vedeu::Views::Char.new(value: Vedeu::EscapeSequences::Esc.reset)
84
+ Vedeu::Views::Char.new(value: Vedeu.esc.reset)
85
85
  end
86
86
 
87
87
  # @return [Fixnum]
@@ -100,9 +100,7 @@ module Vedeu
100
100
 
101
101
  # @return [String]
102
102
  def to_s
103
- @_to_s ||= super +
104
- Vedeu::EscapeSequences::Esc.reset +
105
- position(position_end)
103
+ @_to_s ||= super + Vedeu.esc.reset + position(position_end)
106
104
  end
107
105
  alias_method :to_str, :to_s
108
106
 
@@ -82,9 +82,7 @@ module Vedeu
82
82
  def to_s
83
83
  return '' unless present?(value)
84
84
 
85
- @sequences ||= Array(value).flat_map do |v|
86
- Vedeu::EscapeSequences::Esc.string(v)
87
- end.join
85
+ @sequences ||= Array(value).flat_map { |v| Vedeu.esc.string(v) }.join
88
86
  end
89
87
  alias_method :escape_sequences, :to_s
90
88
  alias_method :to_str, :to_s
@@ -69,8 +69,8 @@ module Vedeu
69
69
 
70
70
  # @return [Set]
71
71
  def in_memory
72
- if Vedeu::Configuration.renderers.any?
73
- Set.new(Vedeu::Configuration.renderers)
72
+ if Vedeu.config.renderers.any?
73
+ Set.new(Vedeu.config.renderers)
74
74
 
75
75
  else
76
76
  Set.new([Vedeu::Renderers::Terminal.new])
@@ -89,7 +89,7 @@ module Vedeu
89
89
  # @return [Hash]
90
90
  def defaults
91
91
  {
92
- compression: Vedeu::Configuration.compression?,
92
+ compression: Vedeu.config.compression?,
93
93
  filename: 'out',
94
94
  timestamp: false,
95
95
  write_file: true,
@@ -19,7 +19,7 @@ module Vedeu
19
19
  #
20
20
  # @return [Boolean]
21
21
  def compress?
22
- options[:compression] || Vedeu::Configuration.compression? || false
22
+ options[:compression] || Vedeu.config.compression? || false
23
23
  end
24
24
 
25
25
  private
@@ -10,14 +10,14 @@ module Vedeu
10
10
 
11
11
  class << self
12
12
 
13
- # @param (see #initialize)
14
- def start(configuration)
15
- new(configuration).start
13
+ # @return [void]
14
+ def start
15
+ new.start
16
16
  end
17
17
 
18
- # @param (see #initialize)
19
- def restart(configuration)
20
- new(configuration).start
18
+ # @return [void]
19
+ def restart
20
+ new.start
21
21
  end
22
22
 
23
23
  # Stops the application! - The `:_cleanup_` event is
@@ -44,11 +44,8 @@ module Vedeu
44
44
 
45
45
  # Returns a new instance of Vedeu::Runtime::Application.
46
46
  #
47
- # @param configuration [Vedeu::Configuration]
48
47
  # @return [Vedeu::Runtime::Application]
49
- def initialize(configuration = Vedeu::Configuration)
50
- @configuration = configuration
51
- end
48
+ def initialize; end
52
49
 
53
50
  # Starts the application!
54
51
  #
@@ -75,12 +72,6 @@ module Vedeu
75
72
  end
76
73
  end
77
74
 
78
- protected
79
-
80
- # @!attribute [r] configuration
81
- # @return [Vedeu::Configuration]
82
- attr_reader :configuration
83
-
84
75
  private
85
76
 
86
77
  # Runs the application loop either once, or forever (exceptions
@@ -89,7 +80,7 @@ module Vedeu
89
80
  # @param block [Proc]
90
81
  # @return [void]
91
82
  def runner(&block)
92
- return yield if configuration.once?
83
+ return yield if Vedeu.config.once?
93
84
 
94
85
  run_many { yield }
95
86
  end
@@ -104,7 +95,7 @@ module Vedeu
104
95
  #
105
96
  # @return [void]
106
97
  def main_sequence
107
- if configuration.interactive?
98
+ if Vedeu.config.interactive?
108
99
  Vedeu::Input::Capture.read
109
100
 
110
101
  else
@@ -124,7 +115,7 @@ module Vedeu
124
115
  Vedeu::Runtime::MainLoop.start! { yield }
125
116
 
126
117
  rescue Vedeu::Error::ModeSwitch
127
- Vedeu::Runtime::Application.restart(Vedeu::Configuration)
118
+ Vedeu::Runtime::Application.restart
128
119
  end
129
120
 
130
121
  # :nocov:
@@ -49,7 +49,7 @@ module Vedeu
49
49
 
50
50
  # @return [String]
51
51
  def base_path
52
- Vedeu::Configuration.base_path
52
+ Vedeu.config.base_path
53
53
  end
54
54
 
55
55
  # @note
@@ -78,8 +78,8 @@ module Vedeu
78
78
 
79
79
  # @return [void]
80
80
  def client_initialize!
81
- if Vedeu::Configuration.root
82
- Vedeu.trigger(:_goto_, *Vedeu::Configuration.root)
81
+ if Vedeu.config.root
82
+ Vedeu.trigger(:_goto_, *Vedeu.config.root)
83
83
 
84
84
  else
85
85
  Vedeu.log_stderr(type: :debug, message: client_initialize_error)
@@ -113,7 +113,7 @@ module Vedeu
113
113
  def configure_log!
114
114
  Vedeu.configure do
115
115
  log('/tmp/vedeu_bootstrap.log')
116
- end unless Vedeu::Configuration.log?
116
+ end unless Vedeu.config.log?
117
117
  end
118
118
 
119
119
  # @return [String]
@@ -62,16 +62,14 @@ module Vedeu
62
62
  $stdout = @stdout
63
63
  $stderr = @stderr
64
64
 
65
- optionally_profile do
66
- Vedeu::Runtime::Application.start(Vedeu::Configuration)
67
- end
65
+ optionally_profile { Vedeu::Runtime::Application.start }
68
66
 
69
67
  @exit_code = 0
70
68
 
71
69
  terminate!
72
70
 
73
71
  rescue StandardError => uncaught_exception
74
- output = if Vedeu::Configuration.debug?
72
+ output = if Vedeu.config.debug?
75
73
  uncaught_exception.message + "\n" +
76
74
  uncaught_exception.backtrace.join("\n")
77
75
  else
@@ -93,7 +91,7 @@ module Vedeu
93
91
  # @param block [Proc]
94
92
  # @return [void]
95
93
  def optionally_profile(&block)
96
- if Vedeu::Configuration.profile?
94
+ if Vedeu.config.profile?
97
95
  Vedeu.profile { yield }
98
96
 
99
97
  else
@@ -81,7 +81,7 @@ module Vedeu
81
81
  #
82
82
  # @return [Symbol]
83
83
  def mode
84
- @mode = Vedeu::Configuration.terminal_mode
84
+ @mode = Vedeu.config.terminal_mode
85
85
  end
86
86
 
87
87
  private
@@ -61,7 +61,7 @@ module Vedeu
61
61
  def initialize_screen(mode, &block)
62
62
  Vedeu.log(message: "Terminal entering '#{mode}' mode")
63
63
 
64
- output(Vedeu::EscapeSequences::Esc.screen_init)
64
+ output(Vedeu.esc.screen_init)
65
65
 
66
66
  yield if block_given?
67
67
  end
@@ -70,8 +70,7 @@ module Vedeu
70
70
  #
71
71
  # @return [String]
72
72
  def debugging!
73
- output(Vedeu::EscapeSequences::Esc.mouse_x10_off +
74
- Vedeu::EscapeSequences::Esc.show_cursor)
73
+ output(Vedeu.esc.mouse_x10_off + Vedeu.esc.show_cursor)
75
74
  end
76
75
 
77
76
  # Clears the entire terminal space.
@@ -81,7 +80,7 @@ module Vedeu
81
80
  #
82
81
  # @return [String]
83
82
  def clear
84
- output(Vedeu::EscapeSequences::Esc.clear)
83
+ output(Vedeu.esc.clear)
85
84
  end
86
85
 
87
86
  # Attempts to tidy up the screen just before the application
@@ -91,7 +90,7 @@ module Vedeu
91
90
  #
92
91
  # @return [String]
93
92
  def restore_screen
94
- output(Vedeu::EscapeSequences::Esc.screen_exit)
93
+ output(Vedeu.esc.screen_exit)
95
94
  end
96
95
 
97
96
  # Sets the cursor to be visible unless in raw mode, whereby it
@@ -99,7 +98,7 @@ module Vedeu
99
98
  #
100
99
  # @return [String]
101
100
  def set_cursor_mode
102
- output(Vedeu::EscapeSequences::Esc.show_cursor) unless raw_mode?
101
+ output(Vedeu.esc.show_cursor) unless raw_mode?
103
102
  end
104
103
 
105
104
  # Returns a coordinate tuple of the format [y, x], where `y` is
@@ -141,8 +140,8 @@ module Vedeu
141
140
  # {include:file:docs/dsl/by_method/width.md}
142
141
  # @return [Fixnum]
143
142
  def width
144
- return Vedeu::Configuration.drb_width if Vedeu::Configuration.drb?
145
- return Vedeu::Configuration.width if Vedeu::Configuration.width
143
+ return Vedeu.config.drb_width if Vedeu.config.drb?
144
+ return Vedeu.config.width if Vedeu.config.width
146
145
 
147
146
  size[-1]
148
147
  end
@@ -152,8 +151,8 @@ module Vedeu
152
151
  # {include:file:docs/dsl/by_method/height.md}
153
152
  # @return [Fixnum]
154
153
  def height
155
- return Vedeu::Configuration.drb_height if Vedeu::Configuration.drb?
156
- return Vedeu::Configuration.height if Vedeu::Configuration.height
154
+ return Vedeu.config.drb_height if Vedeu.config.drb?
155
+ return Vedeu.config.height if Vedeu.config.height
157
156
 
158
157
  size[0]
159
158
  end
@@ -3,6 +3,6 @@
3
3
  module Vedeu
4
4
 
5
5
  # The current version of Vedeu.
6
- VERSION = '0.8.1'
6
+ VERSION = '0.8.2'
7
7
 
8
8
  end