vedeu 0.4.54 → 0.4.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vedeu.rb +1 -1
- data/lib/vedeu/all.rb +5 -1
- data/lib/vedeu/api.rb +7 -3
- data/lib/vedeu/application/all.rb +6 -6
- data/lib/vedeu/application/application_controller.rb +1 -1
- data/lib/vedeu/application/application_helper.rb +1 -1
- data/lib/vedeu/application/application_view.rb +1 -1
- data/lib/vedeu/application/view.rb +10 -0
- data/lib/vedeu/bindings/all.rb +13 -5
- data/lib/vedeu/bootstrap.rb +0 -2
- data/lib/vedeu/buffers/all.rb +3 -2
- data/lib/vedeu/{repositories/repositories → buffers}/buffers.rb +1 -1
- data/lib/vedeu/cli/all.rb +1 -1
- data/lib/vedeu/cli/generator/helpers.rb +2 -2
- data/lib/vedeu/colours/all.rb +7 -0
- data/lib/vedeu/{output → colours}/background.rb +0 -0
- data/lib/vedeu/{repositories/repositories → colours}/backgrounds.rb +0 -0
- data/lib/vedeu/{output → colours}/colour.rb +0 -0
- data/lib/vedeu/{output → colours}/colour_translator.rb +0 -0
- data/lib/vedeu/{repositories/repositories → colours}/colours.rb +0 -0
- data/lib/vedeu/{output → colours}/foreground.rb +0 -0
- data/lib/vedeu/{repositories/repositories → colours}/foregrounds.rb +0 -0
- data/lib/vedeu/{support/common.rb → common.rb} +0 -0
- data/lib/vedeu/configuration/all.rb +3 -3
- data/lib/vedeu/cursor/all.rb +5 -4
- data/lib/vedeu/cursor/cursor.rb +1 -1
- data/lib/vedeu/{repositories/repositories → cursor}/cursors.rb +2 -19
- data/lib/vedeu/distributed/all.rb +5 -5
- data/lib/vedeu/distributed/test_application.rb +1 -1
- data/lib/vedeu/dsl/all.rb +1 -1
- data/lib/vedeu/dsl/composition.rb +1 -1
- data/lib/vedeu/dsl/use.rb +1 -1
- data/lib/vedeu/events/all.rb +4 -3
- data/lib/vedeu/{repositories/repositories → events}/events.rb +0 -0
- data/lib/vedeu/geometry/all.rb +14 -9
- data/lib/vedeu/{repositories/repositories → geometry}/geometries.rb +0 -0
- data/lib/vedeu/input/all.rb +5 -4
- data/lib/vedeu/{repositories/repositories → input}/keymaps.rb +0 -0
- data/lib/vedeu/{support/log.rb → log.rb} +0 -0
- data/lib/vedeu/models/all.rb +14 -10
- data/lib/vedeu/models/group.rb +3 -3
- data/lib/vedeu/{repositories/repositories → models}/groups.rb +2 -16
- data/lib/vedeu/models/interface.rb +1 -1
- data/lib/vedeu/{repositories/repositories → models}/interfaces.rb +1 -1
- data/lib/vedeu/{repositories/repositories → models}/menus.rb +0 -0
- data/lib/vedeu/{support → models}/toggleable.rb +4 -4
- data/lib/vedeu/null/all.rb +5 -5
- data/lib/vedeu/null/border.rb +5 -3
- data/lib/vedeu/null/buffer.rb +5 -3
- data/lib/vedeu/null/generic.rb +6 -1
- data/lib/vedeu/null/geometry.rb +6 -4
- data/lib/vedeu/null/interface.rb +9 -10
- data/lib/vedeu/output/all.rb +21 -21
- data/lib/vedeu/{repositories/repositories → output}/borders.rb +0 -0
- data/lib/vedeu/output/clear/all.rb +2 -2
- data/lib/vedeu/output/html_char.rb +1 -1
- data/lib/vedeu/output/presentation.rb +25 -0
- data/lib/vedeu/output/refresh.rb +1 -1
- data/lib/vedeu/output/refresh_group.rb +5 -3
- data/lib/vedeu/output/renderers/all.rb +8 -8
- data/lib/vedeu/output/renderers/html.rb +2 -2
- data/lib/vedeu/repositories/all.rb +5 -7
- data/lib/vedeu/repositories/collection.rb +42 -0
- data/lib/vedeu/repositories/model.rb +2 -2
- data/lib/vedeu/repositories/repository.rb +11 -2
- data/lib/vedeu/templating/all.rb +4 -3
- data/lib/vedeu/templating/template.rb +75 -0
- data/lib/vedeu/{support/terminal.rb → terminal.rb} +0 -0
- data/lib/vedeu/{support/timer.rb → timer.rb} +0 -0
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/application/view_test.rb +11 -1
- data/test/lib/vedeu/bootstrap_test.rb +5 -5
- data/test/lib/vedeu/{repositories/repositories → buffers}/buffers_test.rb +0 -0
- data/test/lib/vedeu/cli/generator/helpers_test.rb +1 -1
- data/test/lib/vedeu/{output → colours}/background_test.rb +0 -0
- data/test/lib/vedeu/{repositories/repositories → colours}/backgrounds_test.rb +0 -0
- data/test/lib/vedeu/{output → colours}/colour_test.rb +0 -0
- data/test/lib/vedeu/{output → colours}/colour_translator_test.rb +0 -0
- data/test/lib/vedeu/{repositories/repositories → colours}/colours_test.rb +0 -0
- data/test/lib/vedeu/{output → colours}/foreground_test.rb +0 -0
- data/test/lib/vedeu/{repositories/repositories → colours}/foregrounds_test.rb +0 -0
- data/test/lib/vedeu/{support/common_test.rb → common_test.rb} +0 -0
- data/test/lib/vedeu/{repositories/repositories → cursor}/cursors_test.rb +0 -21
- data/test/lib/vedeu/dsl/composition_test.rb +1 -1
- data/test/lib/vedeu/dsl/use_test.rb +9 -0
- data/test/lib/vedeu/{repositories/repositories → events}/events_test.rb +0 -0
- data/test/lib/vedeu/{repositories/repositories → geometry}/geometries_test.rb +0 -0
- data/test/lib/vedeu/{repositories/repositories → input}/keymaps_test.rb +0 -0
- data/test/lib/vedeu/{support/log_test.rb → log_test.rb} +0 -0
- data/test/lib/vedeu/models/groups_test.rb +21 -0
- data/test/lib/vedeu/{repositories/repositories → models}/interfaces_test.rb +0 -0
- data/test/lib/vedeu/{repositories/repositories → models}/menus_test.rb +0 -0
- data/test/lib/vedeu/{support → models}/toggleable_test.rb +0 -0
- data/test/lib/vedeu/null/border_test.rb +9 -1
- data/test/lib/vedeu/null/buffer_test.rb +9 -1
- data/test/lib/vedeu/null/generic_test.rb +10 -1
- data/test/lib/vedeu/null/geometry_test.rb +9 -1
- data/test/lib/vedeu/null/interface_test.rb +11 -8
- data/test/lib/vedeu/{repositories/repositories → output}/borders_test.rb +0 -0
- data/test/lib/vedeu/output/compressor_test.rb +47 -2
- data/test/lib/vedeu/output/refresh_group_test.rb +5 -5
- data/test/lib/vedeu/output/refresh_test.rb +1 -1
- data/test/lib/vedeu/repositories/collection_test.rb +78 -0
- data/test/lib/vedeu/repositories/repository_test.rb +8 -3
- data/test/lib/vedeu/templating/template_test.rb +46 -0
- data/test/lib/vedeu/{support/terminal_test.rb → terminal_test.rb} +0 -0
- data/test/lib/vedeu/{support/timer_test.rb → timer_test.rb} +0 -0
- data/test/support/all_seeds.sh +9 -0
- data/test/support/templates/inline.erb +1 -0
- data/test/test_helper.rb +7 -1
- metadata +74 -78
- data/lib/vedeu/output/view_helpers/all.rb +0 -5
- data/lib/vedeu/output/view_helpers/view_helpers.rb +0 -21
- data/lib/vedeu/repositories/collections/all.rb +0 -47
- data/lib/vedeu/repositories/repositories/all.rb +0 -14
- data/lib/vedeu/support/all.rb +0 -5
- data/lib/vedeu/support/template.rb +0 -73
- data/test/lib/vedeu/output/view_helpers/view_helpers_test.rb +0 -30
- data/test/lib/vedeu/repositories/collections/all_test.rb +0 -83
- data/test/lib/vedeu/repositories/repositories/groups_test.rb +0 -35
- data/test/lib/vedeu/support/template_test.rb +0 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e84104ce6f4159eb294124d8a6074932fa995a85
|
4
|
+
data.tar.gz: b7b8f4ebd1a8955378a9caec05edeee224910750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d354c6aa5c3e636dcffd8896eba97817ec24f53c125cb119018b8fea96659ec9000caec97e6687694193efff159fa33c05c45038ac2e6bfcd758a50d5251bd82
|
7
|
+
data.tar.gz: 6698d400d2c4ff865b8005d356feb294d266632431d964184ec9e9fd298a94c7fc17ebefefa3c925e2dacbf40c712da6c457f94887f4aa9755fee731f1f8915d
|
data/lib/vedeu.rb
CHANGED
data/lib/vedeu/all.rb
CHANGED
@@ -27,7 +27,11 @@ require 'vedeu/dsl/all'
|
|
27
27
|
require 'vedeu/events/all'
|
28
28
|
require 'vedeu/input/all'
|
29
29
|
require 'vedeu/output/all'
|
30
|
-
require 'vedeu/
|
30
|
+
require 'vedeu/common'
|
31
|
+
require 'vedeu/log'
|
32
|
+
require 'vedeu/common'
|
33
|
+
require 'vedeu/terminal'
|
34
|
+
require 'vedeu/timer'
|
31
35
|
require 'vedeu/templating/all'
|
32
36
|
|
33
37
|
require 'vedeu/main_loop'
|
data/lib/vedeu/api.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
require 'vedeu/
|
2
|
-
require 'vedeu/
|
3
|
-
require 'vedeu/
|
1
|
+
require 'vedeu/colours/all'
|
2
|
+
require 'vedeu/buffers/buffers'
|
3
|
+
require 'vedeu/output/borders'
|
4
|
+
require 'vedeu/cursor/cursors'
|
5
|
+
require 'vedeu/common'
|
6
|
+
require 'vedeu/terminal'
|
7
|
+
require 'vedeu/timer'
|
4
8
|
require 'vedeu/output/renderers/all'
|
5
9
|
require 'vedeu/events/all'
|
6
10
|
require 'vedeu/models/all'
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
require 'vedeu/application/controller'
|
2
|
+
require 'vedeu/application/helper'
|
3
|
+
require 'vedeu/application/view'
|
4
|
+
require 'vedeu/application/application_controller'
|
5
|
+
require 'vedeu/application/application_helper'
|
6
|
+
require 'vedeu/application/application_view'
|
@@ -5,6 +5,16 @@ module Vedeu
|
|
5
5
|
# @api private
|
6
6
|
module View
|
7
7
|
|
8
|
+
# Returns the current local time.
|
9
|
+
#
|
10
|
+
# @example
|
11
|
+
# time_now # => Mon 29 Jun 19:26
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
def time_now
|
15
|
+
Time.now.strftime('%a %e %b %k:%M')
|
16
|
+
end
|
17
|
+
|
8
18
|
end # View
|
9
19
|
|
10
20
|
end # Vedeu
|
data/lib/vedeu/bindings/all.rb
CHANGED
@@ -1,11 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
require 'vedeu/bindings/visibility'
|
2
|
+
require 'vedeu/bindings/movement'
|
3
|
+
require 'vedeu/bindings/menus'
|
4
|
+
require 'vedeu/bindings/drb'
|
5
|
+
require 'vedeu/bindings/system'
|
6
6
|
|
7
7
|
module Vedeu
|
8
8
|
|
9
|
+
# Binds various events for running and manipulating Vedeu.
|
10
|
+
#
|
11
|
+
# @note
|
12
|
+
# The methods these modules use are private, and should not be called
|
13
|
+
# directly, however the produced events are all public and are highly
|
14
|
+
# recommended to be used.
|
15
|
+
#
|
16
|
+
# @api private
|
9
17
|
module Bindings
|
10
18
|
|
11
19
|
# Setup events for running Vedeu. This method is called by Vedeu.
|
data/lib/vedeu/bootstrap.rb
CHANGED
@@ -6,14 +6,12 @@ module Vedeu
|
|
6
6
|
# Vedeu with this data, then starts the client application.
|
7
7
|
class Bootstrap
|
8
8
|
|
9
|
-
# :nocov:
|
10
9
|
# @param argv [Array<String>]
|
11
10
|
# @param entry_point [void]
|
12
11
|
# @return [void]
|
13
12
|
def self.start(argv = ARGV, entry_point = nil)
|
14
13
|
new(argv, entry_point).start
|
15
14
|
end
|
16
|
-
# :nocov:
|
17
15
|
|
18
16
|
# Returns a new instance of Vedeu::Bootstrap.
|
19
17
|
#
|
data/lib/vedeu/buffers/all.rb
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'vedeu/buffers/buffers'
|
2
|
+
require 'vedeu/buffers/buffer'
|
3
|
+
require 'vedeu/buffers/display_buffer'
|
data/lib/vedeu/cli/all.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
require 'vedeu/cli/main'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'vedeu/
|
1
|
+
require 'vedeu/common'
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
@@ -72,7 +72,7 @@ module Vedeu
|
|
72
72
|
# @param source [String]
|
73
73
|
# @return [String]
|
74
74
|
def parse(source)
|
75
|
-
Vedeu::Template.parse(self, source)
|
75
|
+
Vedeu::Templating::Template.parse(self, source)
|
76
76
|
end
|
77
77
|
|
78
78
|
# @return [String]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require 'vedeu/configuration/cli'
|
2
|
+
require 'vedeu/configuration/api'
|
3
|
+
require 'vedeu/configuration/configuration'
|
data/lib/vedeu/cursor/all.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'vedeu/repositories/all'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
require 'vedeu/cursor/cursor'
|
4
|
+
require 'vedeu/cursor/cursors'
|
5
|
+
require 'vedeu/cursor/move'
|
6
|
+
require 'vedeu/cursor/refresh_cursor'
|
7
|
+
require 'vedeu/cursor/reposition'
|
data/lib/vedeu/cursor/cursor.rb
CHANGED
@@ -19,32 +19,15 @@ module Vedeu
|
|
19
19
|
|
20
20
|
end # Eigenclass
|
21
21
|
|
22
|
+
null Vedeu::Cursor
|
22
23
|
real Vedeu::Cursor
|
23
24
|
|
24
|
-
# @example
|
25
|
-
# Vedeu.cursors.by_name('some_name')
|
26
|
-
#
|
27
|
-
# @param name [String] The name of the stored cursor.
|
28
|
-
# @return [Vedeu::Cursor]
|
29
|
-
def by_name(name)
|
30
|
-
if registered?(name)
|
31
|
-
find(name)
|
32
|
-
|
33
|
-
elsif name
|
34
|
-
Vedeu::Cursor.new(name: name).store
|
35
|
-
|
36
|
-
else
|
37
|
-
Vedeu::Cursor.new(name: Vedeu.focus).store
|
38
|
-
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
25
|
end # Cursors
|
43
26
|
|
44
27
|
class Cursor
|
45
28
|
|
46
29
|
repo Vedeu::Cursors.repository
|
47
30
|
|
48
|
-
end
|
31
|
+
end # Cursor
|
49
32
|
|
50
33
|
end # Vedeu
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
require 'vedeu/distributed/uri'
|
2
|
+
require 'vedeu/distributed/server'
|
3
|
+
require 'vedeu/distributed/client'
|
4
|
+
require 'vedeu/distributed/subprocess'
|
5
|
+
require 'vedeu/distributed/test_application'
|
6
6
|
|
7
7
|
module Vedeu
|
8
8
|
|
data/lib/vedeu/dsl/all.rb
CHANGED
@@ -105,7 +105,7 @@ module Vedeu
|
|
105
105
|
fail MissingRequired, "Cannot render template for '#{name}', without " \
|
106
106
|
'a filename.' unless filename
|
107
107
|
|
108
|
-
content = Vedeu::Template.parse(object, filename)
|
108
|
+
content = Vedeu::Templating::Template.parse(object, filename)
|
109
109
|
lines = Vedeu::Wordwrap.for(content, options)
|
110
110
|
|
111
111
|
new_model = model.member.build(template_attributes(name, lines))
|
data/lib/vedeu/dsl/use.rb
CHANGED
@@ -32,7 +32,7 @@ module Vedeu
|
|
32
32
|
# @param name [String] The name of the model to duplicate.
|
33
33
|
# @return [void] The new model based on the original.
|
34
34
|
def duplicate(name)
|
35
|
-
original =
|
35
|
+
original = use(name)
|
36
36
|
|
37
37
|
unless original.respond_to?(:null?)
|
38
38
|
duplicated = original.dup
|
data/lib/vedeu/events/all.rb
CHANGED
File without changes
|
data/lib/vedeu/geometry/all.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
require 'vedeu/geometry/area'
|
2
|
+
require 'vedeu/geometry/coordinate'
|
3
|
+
require 'vedeu/geometry/dimension'
|
4
|
+
|
5
|
+
require 'vedeu/geometry/geometry'
|
6
|
+
require 'vedeu/repositories/store'
|
7
|
+
require 'vedeu/repositories/registerable'
|
8
|
+
require 'vedeu/repositories/repository'
|
9
|
+
require 'vedeu/geometry/geometries'
|
10
|
+
require 'vedeu/geometry/grid'
|
11
|
+
require 'vedeu/geometry/index_position'
|
12
|
+
require 'vedeu/geometry/position_index'
|
13
|
+
require 'vedeu/geometry/position'
|
14
|
+
require 'vedeu/geometry/position_validator'
|
File without changes
|
data/lib/vedeu/input/all.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
require 'vedeu/input/mapper'
|
2
|
+
require 'vedeu/input/key'
|
3
|
+
require 'vedeu/input/input'
|
4
|
+
require 'vedeu/input/keymaps'
|
5
|
+
require 'vedeu/input/keymap'
|
5
6
|
|
6
7
|
module Vedeu
|
7
8
|
|
File without changes
|
File without changes
|
data/lib/vedeu/models/all.rb
CHANGED
@@ -1,13 +1,17 @@
|
|
1
1
|
require 'vedeu/repositories/all'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
require 'vedeu/models/toggleable'
|
4
|
+
require 'vedeu/models/cell'
|
5
|
+
require 'vedeu/models/char'
|
6
|
+
require 'vedeu/models/escape_char'
|
7
|
+
require 'vedeu/models/stream'
|
8
|
+
require 'vedeu/models/line'
|
9
|
+
require 'vedeu/models/interfaces'
|
10
|
+
require 'vedeu/models/interface'
|
11
|
+
require 'vedeu/models/composition'
|
12
|
+
require 'vedeu/models/focus'
|
13
|
+
require 'vedeu/models/groups'
|
14
|
+
require 'vedeu/models/group'
|
15
|
+
require 'vedeu/models/menus'
|
16
|
+
require 'vedeu/models/menu'
|
10
17
|
|
11
|
-
require_relative 'focus'
|
12
|
-
require_relative 'group'
|
13
|
-
require_relative 'menu'
|
data/lib/vedeu/models/group.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'vedeu/
|
1
|
+
require 'vedeu/models/toggleable'
|
2
2
|
|
3
3
|
module Vedeu
|
4
4
|
|
@@ -40,7 +40,7 @@ module Vedeu
|
|
40
40
|
def add(member)
|
41
41
|
@members = members.add(member)
|
42
42
|
|
43
|
-
Vedeu::Group.new(name: name, members: @members).store
|
43
|
+
Vedeu::Group.new(name: name, members: @members, visible: visible).store
|
44
44
|
end
|
45
45
|
|
46
46
|
# Hide the named group of interfaces, or without a name, the group of the
|
@@ -72,7 +72,7 @@ module Vedeu
|
|
72
72
|
def remove(member)
|
73
73
|
@members = members.delete(member)
|
74
74
|
|
75
|
-
Vedeu::Group.new(name: name, members: @members).store
|
75
|
+
Vedeu::Group.new(name: name, members: @members, visible: visible).store
|
76
76
|
end
|
77
77
|
|
78
78
|
# Remove all members from the group.
|
@@ -13,29 +13,15 @@ module Vedeu
|
|
13
13
|
|
14
14
|
end # Eigenclass
|
15
15
|
|
16
|
+
null Vedeu::Group
|
16
17
|
real Vedeu::Group
|
17
18
|
|
18
|
-
# @example
|
19
|
-
# Vedeu.groups.by_name('name')
|
20
|
-
#
|
21
|
-
# @param name [String] The name of the stored group.
|
22
|
-
# @return [Vedeu::Group]
|
23
|
-
def by_name(name)
|
24
|
-
if registered?(name)
|
25
|
-
find(name)
|
26
|
-
|
27
|
-
else
|
28
|
-
Vedeu::Group.new(name: name).store
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
19
|
end # Groups
|
34
20
|
|
35
21
|
class Group
|
36
22
|
|
37
23
|
repo Vedeu::Groups.repository
|
38
24
|
|
39
|
-
end
|
25
|
+
end # Group
|
40
26
|
|
41
27
|
end # Vedeu
|