vedeu 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.travis.yml +1 -1
- data/README.md +2 -6
- data/config/rubocop_enabled.yml +0 -6
- data/docs/dsl/by_method/clock_time.md +4 -1
- data/lib/vedeu/application/application_controller.rb +2 -2
- data/lib/vedeu/application/controller.rb +3 -3
- data/lib/vedeu/borders/border.rb +6 -6
- data/lib/vedeu/borders/dsl.rb +26 -26
- data/lib/vedeu/borders/refresh.rb +2 -2
- data/lib/vedeu/borders/title.rb +4 -4
- data/lib/vedeu/buffers/refresh.rb +8 -7
- data/lib/vedeu/buffers/terminal.rb +1 -1
- data/lib/vedeu/buffers/view.rb +2 -2
- data/lib/vedeu/cells/clear.rb +1 -1
- data/lib/vedeu/cells/cursor.rb +6 -6
- data/lib/vedeu/cells/empty.rb +2 -2
- data/lib/vedeu/cells/escape.rb +6 -6
- data/lib/vedeu/coercers/alignment.rb +1 -1
- data/lib/vedeu/coercers/colour_attributes.rb +8 -16
- data/lib/vedeu/colours/background.rb +4 -8
- data/lib/vedeu/colours/colour.rb +4 -4
- data/lib/vedeu/colours/foreground.rb +4 -8
- data/lib/vedeu/colours/repository.rb +1 -1
- data/lib/vedeu/colours/translator.rb +6 -6
- data/lib/vedeu/common.rb +1 -1
- data/lib/vedeu/configuration/api.rb +15 -15
- data/lib/vedeu/configuration/configuration.rb +8 -8
- data/lib/vedeu/cursors/coordinate.rb +4 -4
- data/lib/vedeu/cursors/cursor.rb +2 -2
- data/lib/vedeu/distributed/client.rb +2 -2
- data/lib/vedeu/distributed/server.rb +8 -10
- data/lib/vedeu/distributed/subprocess.rb +1 -1
- data/lib/vedeu/distributed/uri.rb +1 -1
- data/lib/vedeu/dsl/cursors.rb +2 -2
- data/lib/vedeu/dsl/elements.rb +5 -5
- data/lib/vedeu/dsl/helpers/align.rb +1 -1
- data/lib/vedeu/dsl/helpers/attributes.rb +1 -1
- data/lib/vedeu/dsl/presentation.rb +15 -15
- data/lib/vedeu/dsl/view.rb +1 -1
- data/lib/vedeu/dsl/views.rb +1 -1
- data/lib/vedeu/editor/cursor.rb +1 -1
- data/lib/vedeu/editor/line.rb +2 -2
- data/lib/vedeu/editor/lines.rb +2 -2
- data/lib/vedeu/esc/borders.rb +19 -19
- data/lib/vedeu/esc/colours.rb +1 -1
- data/lib/vedeu/events/aliases.rb +3 -15
- data/lib/vedeu/events/event.rb +14 -14
- data/lib/vedeu/events/repository.rb +1 -1
- data/lib/vedeu/geometries/area/area.rb +5 -5
- data/lib/vedeu/geometries/area/dimension.rb +1 -1
- data/lib/vedeu/geometries/dsl/dsl.rb +7 -7
- data/lib/vedeu/geometries/geometry.rb +2 -2
- data/lib/vedeu/geometries/position.rb +6 -6
- data/lib/vedeu/groups/clear.rb +2 -2
- data/lib/vedeu/groups/group.rb +2 -2
- data/lib/vedeu/input/dsl.rb +1 -1
- data/lib/vedeu/input/key.rb +3 -3
- data/lib/vedeu/input/mapper.rb +2 -2
- data/lib/vedeu/input/read.rb +2 -4
- data/lib/vedeu/input/store.rb +1 -17
- data/lib/vedeu/input/translator.rb +49 -45
- data/lib/vedeu/interfaces/clear.rb +3 -3
- data/lib/vedeu/interfaces/dsl.rb +4 -4
- data/lib/vedeu/interfaces/interface.rb +2 -2
- data/lib/vedeu/logging/clock_time.rb +3 -3
- data/lib/vedeu/logging/debug.rb +14 -6
- data/lib/vedeu/logging/log.rb +1 -1
- data/lib/vedeu/menus/dsl.rb +2 -2
- data/lib/vedeu/menus/menu.rb +9 -9
- data/lib/vedeu/models/focus.rb +11 -11
- data/lib/vedeu/models/page.rb +1 -1
- data/lib/vedeu/models/row.rb +1 -1
- data/lib/vedeu/models/toggleable.rb +7 -7
- data/lib/vedeu/null/generic.rb +29 -29
- data/lib/vedeu/output/compressor_cache.rb +1 -11
- data/lib/vedeu/output/viewport.rb +4 -12
- data/lib/vedeu/output/write.rb +3 -3
- data/lib/vedeu/plugins/plugin.rb +1 -1
- data/lib/vedeu/presentation/colour.rb +1 -1
- data/lib/vedeu/presentation/presentation.rb +1 -1
- data/lib/vedeu/presentation/style.rb +4 -4
- data/lib/vedeu/renderers/all.rb +1 -14
- data/lib/vedeu/renderers/options.rb +1 -1
- data/lib/vedeu/repositories/all.rb +1 -0
- data/lib/vedeu/repositories/assemblage.rb +1 -1
- data/lib/vedeu/repositories/collection.rb +4 -4
- data/lib/vedeu/repositories/registerable.rb +2 -2
- data/lib/vedeu/repositories/repositories.rb +1 -1
- data/lib/vedeu/repositories/repository.rb +3 -3
- data/lib/vedeu/repositories/storage.rb +38 -0
- data/lib/vedeu/repositories/store.rb +5 -22
- data/lib/vedeu/runtime/application.rb +1 -1
- data/lib/vedeu/runtime/flags.rb +3 -3
- data/lib/vedeu/runtime/router.rb +3 -18
- data/lib/vedeu/templating/helpers.rb +5 -3
- data/lib/vedeu/templating/view_template.rb +26 -18
- data/lib/vedeu/terminal/terminal.rb +5 -5
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/chars.rb +1 -1
- data/lib/vedeu/views/composition.rb +4 -4
- data/lib/vedeu/views/default_attributes.rb +2 -2
- data/lib/vedeu/views/line.rb +6 -6
- data/lib/vedeu/views/lines.rb +1 -1
- data/lib/vedeu/views/stream.rb +6 -6
- data/lib/vedeu/views/streams.rb +1 -1
- data/lib/vedeu/views/view.rb +4 -4
- data/test/lib/vedeu/borders/border_test.rb +1 -1
- data/test/lib/vedeu/borders/caption_test.rb +1 -1
- data/test/lib/vedeu/borders/dsl_test.rb +2 -3
- data/test/lib/vedeu/borders/refresh_test.rb +1 -1
- data/test/lib/vedeu/borders/title_test.rb +1 -1
- data/test/lib/vedeu/buffers/buffer_test.rb +7 -7
- data/test/lib/vedeu/buffers/refresh_test.rb +1 -1
- data/test/lib/vedeu/colours/background_test.rb +27 -0
- data/test/lib/vedeu/colours/foreground_test.rb +27 -0
- data/test/lib/vedeu/cursors/cursor_test.rb +3 -3
- data/test/lib/vedeu/cursors/move_test.rb +1 -1
- data/test/lib/vedeu/cursors/refresh_test.rb +1 -1
- data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
- data/test/lib/vedeu/dsl/view_test.rb +6 -8
- data/test/lib/vedeu/editor/cropper_test.rb +1 -1
- data/test/lib/vedeu/editor/cursor_test.rb +1 -1
- data/test/lib/vedeu/editor/document_test.rb +1 -1
- data/test/lib/vedeu/editor/editor_test.rb +1 -1
- data/test/lib/vedeu/events/aliases_test.rb +0 -14
- data/test/lib/vedeu/geometries/area/area_test.rb +1 -1
- data/test/lib/vedeu/geometries/geometry_test.rb +1 -1
- data/test/lib/vedeu/geometries/move_test.rb +1 -1
- data/test/lib/vedeu/groups/clear_test.rb +1 -1
- data/test/lib/vedeu/groups/dsl_test.rb +1 -1
- data/test/lib/vedeu/groups/group_test.rb +1 -1
- data/test/lib/vedeu/groups/refresh_test.rb +1 -1
- data/test/lib/vedeu/input/capture_test.rb +2 -2
- data/test/lib/vedeu/input/store_test.rb +0 -34
- data/test/lib/vedeu/interfaces/clear_test.rb +1 -1
- data/test/lib/vedeu/interfaces/dsl_test.rb +4 -4
- data/test/lib/vedeu/interfaces/interface_test.rb +1 -1
- data/test/lib/vedeu/menus/dsl_test.rb +1 -1
- data/test/lib/vedeu/null/generic_test.rb +1 -1
- data/test/lib/vedeu/output/compressor_cache_test.rb +0 -33
- data/test/lib/vedeu/renderers/all_test.rb +0 -8
- data/test/lib/vedeu/repositories/repository_test.rb +2 -2
- data/test/lib/vedeu/repositories/storage_test.rb +74 -0
- data/test/lib/vedeu/repositories/store_test.rb +10 -28
- data/test/lib/vedeu/runtime/router_test.rb +0 -8
- data/test/lib/vedeu/views/default_attributes_test.rb +5 -5
- data/test/lib/vedeu/views/view_test.rb +5 -2
- data/test/test_helper.rb +1 -1
- data/vedeu.gemspec +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e661f87496fae0bee6cfad0f28107ef83de0afd7
|
4
|
+
data.tar.gz: e9c940bfeba84b518e8c9aae271b78e64ece3e7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f690ac0877398edcf8cae81bf4d82d0da2bc997e938fec1680cd527d544b036363295bc9cfaf0a79c8cbef1fef4d7bde28b7f7580a46da72d02cab7a4407c42
|
7
|
+
data.tar.gz: f383c6aa69b348950df538a5cf5df7b942adc99d3ce927d62cd88c54d51450511c337b0d642b32e66217ceee5528cb2159caab913ef42e09b7a2a256e22b3a1f
|
data/.rubocop.yml
CHANGED
@@ -24,10 +24,10 @@ AllCops:
|
|
24
24
|
- 'integrations/**/*'
|
25
25
|
- 'test/**/*'
|
26
26
|
- 'vendor/**/*'
|
27
|
-
RunRailsCops: false
|
28
27
|
DisplayCopNames: true
|
29
28
|
DisplayStyleGuide: true
|
30
29
|
StyleGuideCopsOnly: false
|
30
|
+
TargetRubyVersion: 2.3
|
31
31
|
|
32
32
|
Lint/UnusedMethodArgument:
|
33
33
|
Enabled: false
|
@@ -93,7 +93,7 @@ Style/SpaceAroundOperators:
|
|
93
93
|
Style/TrailingBlankLines:
|
94
94
|
EnforcedStyle: final_newline
|
95
95
|
|
96
|
-
Style/
|
96
|
+
Style/TrailingCommaInLiteral:
|
97
97
|
EnforcedStyleForMultiline: comma
|
98
98
|
|
99
99
|
Metrics/AbcSize:
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -9,12 +9,8 @@ Vedeu (vee-dee-you; aka VDU) is my attempt at creating a terminal based
|
|
9
9
|
|
10
10
|
## Requirements
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
file will indicate the currently used Ruby version.
|
15
|
-
|
16
|
-
When Vedeu started I was a MacOSX user, I've since moved to Linux. You shouldn't
|
17
|
-
have any problems with either of these operating systems.
|
12
|
+
- Ruby (see [.ruby-version](https://github.com/gavinlaking/vedeu/blob/master/.ruby-version) for current version)
|
13
|
+
- Linux/MacOSX
|
18
14
|
|
19
15
|
**Note**: You may have trouble running Vedeu with Windows installations. (Pull
|
20
16
|
requests welcome!)
|
data/config/rubocop_enabled.yml
CHANGED
@@ -14,9 +14,3 @@ Style/AsciiComments:
|
|
14
14
|
Style/Documentation:
|
15
15
|
Description: 'Document classes and non-namespace modules.'
|
16
16
|
Enabled: false
|
17
|
-
|
18
|
-
Style/SingleSpaceBeforeFirstArg:
|
19
|
-
Description: >-
|
20
|
-
Checks that exactly one space is used between a method name
|
21
|
-
and the first argument for method calls without parentheses.
|
22
|
-
Enabled: false
|
@@ -29,8 +29,8 @@ module Vedeu
|
|
29
29
|
def redirect_to(controller, action, **params)
|
30
30
|
Vedeu.trigger(:_goto_, controller, action, params)
|
31
31
|
end
|
32
|
-
|
33
|
-
|
32
|
+
alias redirect redirect_to
|
33
|
+
alias goto redirect_to
|
34
34
|
|
35
35
|
protected
|
36
36
|
|
@@ -36,7 +36,7 @@ module Vedeu
|
|
36
36
|
Vedeu::Runtime::Router.add_controller(controller_name,
|
37
37
|
ancestors[0].to_s)
|
38
38
|
end
|
39
|
-
|
39
|
+
alias controller_name controller
|
40
40
|
|
41
41
|
# Specifying the action names in your controller provides Vedeu
|
42
42
|
# with the means to route requests to different parts of your
|
@@ -70,8 +70,8 @@ module Vedeu
|
|
70
70
|
Vedeu::Runtime::Router.add_action(@controller_name, action_name)
|
71
71
|
end
|
72
72
|
end
|
73
|
-
|
74
|
-
|
73
|
+
alias action_name action
|
74
|
+
alias actions action
|
75
75
|
|
76
76
|
end # ClassMethods
|
77
77
|
|
data/lib/vedeu/borders/border.rb
CHANGED
@@ -51,25 +51,25 @@ module Vedeu
|
|
51
51
|
# @return [Boolean] Determines whether the bottom border should
|
52
52
|
# be shown.
|
53
53
|
attr_accessor :show_bottom
|
54
|
-
|
54
|
+
alias bottom? show_bottom
|
55
55
|
|
56
56
|
# @!attribute [rw] show_left
|
57
57
|
# @return [Boolean] Determines whether the left border should
|
58
58
|
# be shown.
|
59
59
|
attr_accessor :show_left
|
60
|
-
|
60
|
+
alias left? show_left
|
61
61
|
|
62
62
|
# @!attribute [rw] show_right
|
63
63
|
# @return [Boolean] Determines whether the right border should
|
64
64
|
# be shown.
|
65
65
|
attr_accessor :show_right
|
66
|
-
|
66
|
+
alias right? show_right
|
67
67
|
|
68
68
|
# @!attribute [rw] show_top
|
69
69
|
# @return [Boolean] Determines whether the top border should
|
70
70
|
# be shown.
|
71
71
|
attr_accessor :show_top
|
72
|
-
|
72
|
+
alias top? show_top
|
73
73
|
|
74
74
|
# @!attribute [r] title
|
75
75
|
# @return [String] An optional title for when the top border is
|
@@ -120,7 +120,7 @@ module Vedeu
|
|
120
120
|
# @return [Boolean] Determines whether this border should be
|
121
121
|
# rendered.
|
122
122
|
attr_accessor :enabled
|
123
|
-
|
123
|
+
alias enabled? enabled
|
124
124
|
|
125
125
|
# Returns a new instance of Vedeu::Borders::Border.
|
126
126
|
#
|
@@ -266,7 +266,7 @@ module Vedeu
|
|
266
266
|
# @return [Vedeu::Cells::BottomHorizontal]
|
267
267
|
def bottom_horizontal
|
268
268
|
@bottom_horizontal ||= Vedeu::Cells::BottomHorizontal
|
269
|
-
|
269
|
+
.new(cell_attributes)
|
270
270
|
end
|
271
271
|
|
272
272
|
# Return the client application configured bottom left cell
|
data/lib/vedeu/borders/dsl.rb
CHANGED
@@ -38,7 +38,7 @@ module Vedeu
|
|
38
38
|
def bottom_left(char, options = {})
|
39
39
|
model.bottom_left = Vedeu::Cells::BottomLeft.new(attrs(char, options))
|
40
40
|
end
|
41
|
-
|
41
|
+
alias bottom_left= bottom_left
|
42
42
|
|
43
43
|
# {include:file:docs/dsl/by_method/bottom_right.md}
|
44
44
|
# @param char [String] Character to be used as the bottom right
|
@@ -51,7 +51,7 @@ module Vedeu
|
|
51
51
|
def bottom_right(char, options = {})
|
52
52
|
model.bottom_right = Vedeu::Cells::BottomRight.new(attrs(char, options))
|
53
53
|
end
|
54
|
-
|
54
|
+
alias bottom_right= bottom_right
|
55
55
|
|
56
56
|
# {include:file:docs/dsl/by_method/disable.md}
|
57
57
|
# @return [Boolean]
|
@@ -65,7 +65,7 @@ module Vedeu
|
|
65
65
|
|
66
66
|
model.enabled
|
67
67
|
end
|
68
|
-
|
68
|
+
alias disabled! disable!
|
69
69
|
|
70
70
|
# {include:file:docs/dsl/by_method/enable.md}
|
71
71
|
# @return [Boolean]
|
@@ -79,7 +79,7 @@ module Vedeu
|
|
79
79
|
|
80
80
|
model.enabled
|
81
81
|
end
|
82
|
-
|
82
|
+
alias enabled! enable!
|
83
83
|
|
84
84
|
# {include:file:docs/dsl/by_method/top_horizontal.md}
|
85
85
|
# @param char [String] Character to be used as the top
|
@@ -91,9 +91,9 @@ module Vedeu
|
|
91
91
|
# @return [String]
|
92
92
|
def top_horizontal(char, options = {})
|
93
93
|
model.top_horizontal = Vedeu::Cells::TopHorizontal
|
94
|
-
|
94
|
+
.new(attrs(char, options))
|
95
95
|
end
|
96
|
-
|
96
|
+
alias top_horizontal= top_horizontal
|
97
97
|
|
98
98
|
# {include:file:docs/dsl/by_method/bottom_horizontal.md}
|
99
99
|
# @param char [String] Character to be used as the bottom
|
@@ -105,9 +105,9 @@ module Vedeu
|
|
105
105
|
# @return [String]
|
106
106
|
def bottom_horizontal(char, options = {})
|
107
107
|
model.bottom_horizontal = Vedeu::Cells::BottomHorizontal
|
108
|
-
|
108
|
+
.new(attrs(char, options))
|
109
109
|
end
|
110
|
-
|
110
|
+
alias bottom_horizontal= bottom_horizontal
|
111
111
|
|
112
112
|
# {include:file:docs/dsl/by_method/horizontal.md}
|
113
113
|
# @param char [String] Character to be used as the horizontal
|
@@ -120,7 +120,7 @@ module Vedeu
|
|
120
120
|
def horizontal(char, options = {})
|
121
121
|
model.horizontal = Vedeu::Cells::Horizontal.new(attrs(char, options))
|
122
122
|
end
|
123
|
-
|
123
|
+
alias horizontal= horizontal
|
124
124
|
|
125
125
|
# {include:file:docs/dsl/by_method/bottom.md}
|
126
126
|
# @param value [Boolean] All values evaluate as true except nil
|
@@ -131,8 +131,8 @@ module Vedeu
|
|
131
131
|
|
132
132
|
model.show_bottom = boolean
|
133
133
|
end
|
134
|
-
|
135
|
-
|
134
|
+
alias show_bottom bottom
|
135
|
+
alias bottom= bottom
|
136
136
|
|
137
137
|
# Disable the bottom border.
|
138
138
|
#
|
@@ -157,8 +157,8 @@ module Vedeu
|
|
157
157
|
|
158
158
|
model.show_left = boolean
|
159
159
|
end
|
160
|
-
|
161
|
-
|
160
|
+
alias show_left left
|
161
|
+
alias left= left
|
162
162
|
|
163
163
|
# Disable the left border.
|
164
164
|
#
|
@@ -183,8 +183,8 @@ module Vedeu
|
|
183
183
|
|
184
184
|
model.show_right = boolean
|
185
185
|
end
|
186
|
-
|
187
|
-
|
186
|
+
alias show_right right
|
187
|
+
alias right= right
|
188
188
|
|
189
189
|
# Disable the right border.
|
190
190
|
#
|
@@ -207,7 +207,7 @@ module Vedeu
|
|
207
207
|
model.title = value
|
208
208
|
model.title
|
209
209
|
end
|
210
|
-
|
210
|
+
alias title= title
|
211
211
|
|
212
212
|
# {include:file:docs/dsl/by_method/caption.md}
|
213
213
|
# @param value [String] The caption.
|
@@ -216,7 +216,7 @@ module Vedeu
|
|
216
216
|
model.caption = value
|
217
217
|
model.caption
|
218
218
|
end
|
219
|
-
|
219
|
+
alias caption= caption
|
220
220
|
|
221
221
|
# {include:file:docs/dsl/by_method/top.md}
|
222
222
|
# @param value [Boolean] All values evaluate as true except nil
|
@@ -227,8 +227,8 @@ module Vedeu
|
|
227
227
|
|
228
228
|
model.show_top = boolean
|
229
229
|
end
|
230
|
-
|
231
|
-
|
230
|
+
alias show_top top
|
231
|
+
alias top= top
|
232
232
|
|
233
233
|
# Disable the top border.
|
234
234
|
#
|
@@ -255,7 +255,7 @@ module Vedeu
|
|
255
255
|
def top_left(char, options = {})
|
256
256
|
model.top_left = Vedeu::Cells::TopLeft.new(attrs(char, options))
|
257
257
|
end
|
258
|
-
|
258
|
+
alias top_left= top_left
|
259
259
|
|
260
260
|
# {include:file:docs/dsl/by_method/top_right.md}
|
261
261
|
# @param char [String] Character to be used as the top right
|
@@ -268,7 +268,7 @@ module Vedeu
|
|
268
268
|
def top_right(char, options = {})
|
269
269
|
model.top_right = Vedeu::Cells::TopRight.new(attrs(char, options))
|
270
270
|
end
|
271
|
-
|
271
|
+
alias top_right= top_right
|
272
272
|
|
273
273
|
# {include:file:docs/dsl/by_method/left_vertical.md}
|
274
274
|
# @param char [String] Character to be used as the left vertical
|
@@ -280,9 +280,9 @@ module Vedeu
|
|
280
280
|
# @return [String]
|
281
281
|
def left_vertical(char, options = {})
|
282
282
|
model.left_vertical = Vedeu::Cells::LeftVertical
|
283
|
-
|
283
|
+
.new(attrs(char, options))
|
284
284
|
end
|
285
|
-
|
285
|
+
alias left_vertical= left_vertical
|
286
286
|
|
287
287
|
# {include:file:docs/dsl/by_method/right_vertical.md}
|
288
288
|
# @param char [String] Character to be used as the right
|
@@ -294,9 +294,9 @@ module Vedeu
|
|
294
294
|
# @return [String]
|
295
295
|
def right_vertical(char, options = {})
|
296
296
|
model.right_vertical = Vedeu::Cells::RightVertical
|
297
|
-
|
297
|
+
.new(attrs(char, options))
|
298
298
|
end
|
299
|
-
|
299
|
+
alias right_vertical= right_vertical
|
300
300
|
|
301
301
|
# {include:file:docs/dsl/by_method/vertical.md}
|
302
302
|
# @param char [String] Character to be used as the vertical
|
@@ -309,7 +309,7 @@ module Vedeu
|
|
309
309
|
def vertical(char, options = {})
|
310
310
|
model.vertical = Vedeu::Cells::Vertical.new(attrs(char, options))
|
311
311
|
end
|
312
|
-
|
312
|
+
alias vertical= vertical
|
313
313
|
|
314
314
|
private
|
315
315
|
|
@@ -73,7 +73,7 @@ module Vedeu
|
|
73
73
|
def by_name
|
74
74
|
Vedeu.render_output(output) if enabled? && visible?
|
75
75
|
end
|
76
|
-
|
76
|
+
alias render by_name
|
77
77
|
|
78
78
|
protected
|
79
79
|
|
@@ -139,7 +139,7 @@ module Vedeu
|
|
139
139
|
def interface
|
140
140
|
@interface ||= Vedeu.interfaces.by_name(name)
|
141
141
|
end
|
142
|
-
|
142
|
+
alias parent interface
|
143
143
|
|
144
144
|
# Renders the left border for the interface.
|
145
145
|
#
|
data/lib/vedeu/borders/title.rb
CHANGED
@@ -42,7 +42,7 @@ module Vedeu
|
|
42
42
|
def eql?(other)
|
43
43
|
self.class == other.class && value == other.value
|
44
44
|
end
|
45
|
-
|
45
|
+
alias == eql?
|
46
46
|
|
47
47
|
# Overwrite the border from
|
48
48
|
# {Vedeu::Borders::Border#build_horizontal} on the top border to
|
@@ -63,7 +63,7 @@ module Vedeu
|
|
63
63
|
def to_s
|
64
64
|
value.to_s
|
65
65
|
end
|
66
|
-
|
66
|
+
alias to_str to_s
|
67
67
|
|
68
68
|
# Return the value (a title or a caption) or an empty string.
|
69
69
|
#
|
@@ -71,8 +71,8 @@ module Vedeu
|
|
71
71
|
def value
|
72
72
|
@value || ''
|
73
73
|
end
|
74
|
-
|
75
|
-
|
74
|
+
alias title value
|
75
|
+
alias caption value
|
76
76
|
|
77
77
|
protected
|
78
78
|
|
@@ -36,7 +36,7 @@ module Vedeu
|
|
36
36
|
# @option options content_only [Boolean]
|
37
37
|
# @return [Vedeu::Buffers::Refresh]
|
38
38
|
def initialize(name, options = {})
|
39
|
-
@name =
|
39
|
+
@name = name
|
40
40
|
@options = options
|
41
41
|
end
|
42
42
|
|
@@ -49,11 +49,7 @@ module Vedeu
|
|
49
49
|
Vedeu.trigger(:_refresh_border_, name) unless content_only?
|
50
50
|
end
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
# @!attribute [r] name
|
55
|
-
# @return [String|Symbol]
|
56
|
-
attr_reader :name
|
52
|
+
private
|
57
53
|
|
58
54
|
# @return [Vedeu::Buffers::Buffer]
|
59
55
|
def buffer
|
@@ -65,6 +61,11 @@ module Vedeu
|
|
65
61
|
truthy?(options[:content_only])
|
66
62
|
end
|
67
63
|
|
64
|
+
# @return [String|Symbol]
|
65
|
+
def name
|
66
|
+
present?(@name) ? @name : Vedeu.focus
|
67
|
+
end
|
68
|
+
|
68
69
|
# @return [Hash<Symbol => Boolean>]
|
69
70
|
def options
|
70
71
|
defaults.merge!(@options)
|
@@ -73,7 +74,7 @@ module Vedeu
|
|
73
74
|
# @return [Hash<Symbol => Boolean>]
|
74
75
|
def defaults
|
75
76
|
{
|
76
|
-
content_only: false
|
77
|
+
content_only: false,
|
77
78
|
}
|
78
79
|
end
|
79
80
|
|
data/lib/vedeu/buffers/view.rb
CHANGED
@@ -25,7 +25,7 @@ module Vedeu
|
|
25
25
|
# @return [Hash<Symbol => String|Symbol>]
|
26
26
|
def attributes
|
27
27
|
{
|
28
|
-
name: name
|
28
|
+
name: name,
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
@@ -73,7 +73,7 @@ module Vedeu
|
|
73
73
|
# @return [Hash<Symbol => NilClass|String|Symbol]
|
74
74
|
def defaults
|
75
75
|
{
|
76
|
-
name: nil
|
76
|
+
name: nil,
|
77
77
|
}
|
78
78
|
end
|
79
79
|
|