vedeu 0.8.25 → 0.8.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/applications/existing_application.md +4 -0
- data/docs/applications/first_application.md +53 -0
- data/docs/applications/gem_application.md +31 -0
- data/docs/applications/simple_application.md +4 -0
- data/docs/cli/commands.md +1 -0
- data/docs/getting_started.md +4 -4
- data/integrations/dsl_app_geometry_001.rb +67 -0
- data/integrations/dsl_app_geometry_002.rb +67 -0
- data/integrations/dsl_app_geometry_003.rb +67 -0
- data/integrations/dsl_app_geometry_004.rb +67 -0
- data/integrations/expected/dsl_app_geometry_001.out +1 -0
- data/integrations/expected/dsl_app_geometry_002.out +1 -0
- data/integrations/expected/dsl_app_geometry_003.out +1 -0
- data/integrations/expected/dsl_app_geometry_004.out +1 -0
- data/integrations/test_runner.sh +6 -0
- data/lib/vedeu/buffers/all.rb +2 -1
- data/lib/vedeu/buffers/refresh.rb +10 -40
- data/lib/vedeu/buffers/refresh_content.rb +52 -0
- data/lib/vedeu/editor/document.rb +2 -2
- data/lib/vedeu/esc/actions.rb +2 -0
- data/lib/vedeu/esc/borders.rb +2 -0
- data/lib/vedeu/esc/colours.rb +2 -0
- data/lib/vedeu/esc/esc.rb +2 -0
- data/lib/vedeu/esc/mouse.rb +2 -0
- data/lib/vedeu/groups/refresh.rb +9 -8
- data/lib/vedeu/interfaces/clear.rb +1 -1
- data/lib/vedeu/interfaces/clear_content.rb +4 -2
- data/lib/vedeu/repositories/all.rb +1 -0
- data/lib/vedeu/repositories/cache.rb +74 -0
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/buffers/all_test.rb +12 -0
- data/test/lib/vedeu/buffers/refresh_content_test.rb +53 -0
- data/test/lib/vedeu/buffers/refresh_test.rb +5 -37
- data/test/lib/vedeu/repositories/cache_test.rb +51 -0
- metadata +22 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea635bbb37768511d6fc0c6d1131706f1ca8d073
|
4
|
+
data.tar.gz: 32c4abf0ee196597027be7c1590c501bff675e99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 554cc6c3e219e8b128d9d64ce88c6cd2cf991541d1037d37ac185fe4d54a92ced2e2b81ff65e3279d0a6721722cdc8bbe987782d4f0591b4be9c2c4af9d2c130
|
7
|
+
data.tar.gz: 3bdffdd88d3c54ddf3698b69162579fa1faf9f06bbeeb88e87c9aed970a4bb115e635e53eb28ce2a9e7eaf8f852481f610f66546dfaae837e56b09a83f7a2b85
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# @title Building a simple application using Vedeu
|
2
|
+
# Building a simple application using Vedeu
|
3
|
+
|
4
|
+
In this small tutorial, I hope to guide you through the process of
|
5
|
+
building a simple application which uses the Vedeu framework.
|
6
|
+
|
7
|
+
We're going to build a Slack bot. This bot will simply relay the
|
8
|
+
messages sent to a specific channel to your terminal to be displayed.
|
9
|
+
In a future episode, I might extend this to be able to send messages
|
10
|
+
back too to demonstrate other aspects of Vedeu, but one step at a
|
11
|
+
time.
|
12
|
+
|
13
|
+
If you would like to create a single file application, please see this
|
14
|
+
tutorial: {file:docs/application/simple_application}[Simple
|
15
|
+
Application].
|
16
|
+
|
17
|
+
If you would like to create a gem which uses Vedeu, please see this
|
18
|
+
tutorial: {file:docs/gem_application}[Gem Application].
|
19
|
+
|
20
|
+
If you would like to include Vedeu in an existing application, please
|
21
|
+
see this tutorial: {file:docs/existing_application}[Existing
|
22
|
+
Application].
|
23
|
+
|
24
|
+
If you would like to create a standalone application, please continue
|
25
|
+
reading...
|
26
|
+
|
27
|
+
## 1) Getting started.
|
28
|
+
|
29
|
+
First, install the gem locally:
|
30
|
+
|
31
|
+
gem install vedeu
|
32
|
+
|
33
|
+
This will provide a new command to help build your client application.
|
34
|
+
Similar to Ruby on Rails, although not nearly as advanced as the Rails
|
35
|
+
equivalent, hopefully the `vedeu` command generators will get you off
|
36
|
+
the ground:
|
37
|
+
|
38
|
+
vedeu
|
39
|
+
|
40
|
+
Running the `vedeu` command with no arguments will give you a list of
|
41
|
+
the commands currently supported.
|
42
|
+
|
43
|
+
We can create a skeleton Vedeu client application using the following
|
44
|
+
command:
|
45
|
+
|
46
|
+
vedeu new your_app_name
|
47
|
+
|
48
|
+
If `your_app_name` already exists, Vedeu will only write new files
|
49
|
+
that do not exist at the file path. The generated files are a skeleton
|
50
|
+
Vedeu client application. Let's take a look at these files
|
51
|
+
individually.
|
52
|
+
|
53
|
+
@todo Add more documentation.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# @title Building a gem-based application using Vedeu
|
2
|
+
# Building a gem-based application using Vedeu
|
3
|
+
|
4
|
+
In this tutorial, I hope to guide you through the process of
|
5
|
+
building a simple application which uses the Vedeu framework as part
|
6
|
+
of a gem.
|
7
|
+
|
8
|
+
We're going to build a Slack bot. This bot will simply relay the
|
9
|
+
messages sent to a specific channel to your terminal to be displayed.
|
10
|
+
In a future episode, I might extend this to be able to send messages
|
11
|
+
back too to demonstrate other aspects of Vedeu, but one step at a
|
12
|
+
time.
|
13
|
+
|
14
|
+
## 1) Create a gem.
|
15
|
+
|
16
|
+
Firstly, let's create an empty gem. I'm going to use my name in
|
17
|
+
underscored form as the name of my bot; he is just a listener (unlike
|
18
|
+
me as I'm usually quite noisy.)
|
19
|
+
|
20
|
+
bundle gem gavin_laking
|
21
|
+
|
22
|
+
Next, we edit the `*.gemspec` file to add `vedeu` and
|
23
|
+
`simple-slack-bot` as dependencies. You may also what to update other
|
24
|
+
aspects of the gemspec file here, but I'll leave that with you.
|
25
|
+
|
26
|
+
spec.add_dependency 'vedeu'
|
27
|
+
spec.add_dependency 'simple-slack-bot'
|
28
|
+
|
29
|
+
Now, run `bundle`, and we should see the 'Bundle complete!' message.
|
30
|
+
|
31
|
+
@todo Add more documentation.
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
data/docs/getting_started.md
CHANGED
@@ -72,10 +72,10 @@ it does much the same, minus the requests.
|
|
72
72
|
|
73
73
|
### app/helpers/
|
74
74
|
|
75
|
-
Ruby on Rails has a concept of helpers which
|
76
|
-
object-oriented,
|
77
|
-
multiple views. Vedeu uses this concept as it will be familiar to
|
78
|
-
Rails developers and might be helpful to beginners.
|
75
|
+
'Ruby on Rails' has a concept of helpers, which although not very
|
76
|
+
object-oriented, allow you to share functionality/behaviour across
|
77
|
+
multiple views. Vedeu uses this concept too, as it will be familiar to
|
78
|
+
many Rails developers and might be helpful to beginners.
|
79
79
|
|
80
80
|
### app/models/
|
81
81
|
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_geometry_001'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
log '/tmp/vedeu_integrations.log'
|
17
|
+
renderers [
|
18
|
+
Vedeu::Renderers::Terminal.new(
|
19
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
20
|
+
write_file: true)
|
21
|
+
]
|
22
|
+
run_once!
|
23
|
+
standalone!
|
24
|
+
|
25
|
+
height 12
|
26
|
+
width 40
|
27
|
+
end
|
28
|
+
|
29
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
30
|
+
|
31
|
+
Vedeu.interface :geometry_interface do
|
32
|
+
background '#ff3300'
|
33
|
+
border do
|
34
|
+
title 'Other'
|
35
|
+
colour foreground: '#ff0000'
|
36
|
+
end
|
37
|
+
geometry do
|
38
|
+
x 3
|
39
|
+
y 3
|
40
|
+
xn 13
|
41
|
+
yn 4
|
42
|
+
end
|
43
|
+
zindex 2
|
44
|
+
end
|
45
|
+
|
46
|
+
Vedeu.render do
|
47
|
+
view(:geometry_interface) do
|
48
|
+
lines do
|
49
|
+
2.times do
|
50
|
+
line (" " * 10)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.start(argv = ARGV)
|
57
|
+
Vedeu::Launcher.execute!(argv)
|
58
|
+
end
|
59
|
+
|
60
|
+
end # DSLApp
|
61
|
+
|
62
|
+
Vedeu.timer('Test') do
|
63
|
+
DSLApp.start
|
64
|
+
end
|
65
|
+
|
66
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
67
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_geometry_002'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
log '/tmp/vedeu_integrations.log'
|
17
|
+
renderers [
|
18
|
+
Vedeu::Renderers::Terminal.new(
|
19
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
20
|
+
write_file: true)
|
21
|
+
]
|
22
|
+
run_once!
|
23
|
+
standalone!
|
24
|
+
|
25
|
+
height 12
|
26
|
+
width 40
|
27
|
+
end
|
28
|
+
|
29
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
30
|
+
|
31
|
+
Vedeu.interface :geometry_interface do
|
32
|
+
background '#ff3300'
|
33
|
+
border do
|
34
|
+
title 'Other'
|
35
|
+
colour foreground: '#ff0000'
|
36
|
+
end
|
37
|
+
geometry do
|
38
|
+
x 21
|
39
|
+
y 3
|
40
|
+
xn 31
|
41
|
+
yn 4
|
42
|
+
end
|
43
|
+
zindex 2
|
44
|
+
end
|
45
|
+
|
46
|
+
Vedeu.render do
|
47
|
+
view(:geometry_interface) do
|
48
|
+
lines do
|
49
|
+
2.times do
|
50
|
+
line (" " * 10)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.start(argv = ARGV)
|
57
|
+
Vedeu::Launcher.execute!(argv)
|
58
|
+
end
|
59
|
+
|
60
|
+
end # DSLApp
|
61
|
+
|
62
|
+
Vedeu.timer('Test') do
|
63
|
+
DSLApp.start
|
64
|
+
end
|
65
|
+
|
66
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
67
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_geometry_003'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
log '/tmp/vedeu_integrations.log'
|
17
|
+
renderers [
|
18
|
+
Vedeu::Renderers::Terminal.new(
|
19
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
20
|
+
write_file: true)
|
21
|
+
]
|
22
|
+
run_once!
|
23
|
+
standalone!
|
24
|
+
|
25
|
+
height 12
|
26
|
+
width 40
|
27
|
+
end
|
28
|
+
|
29
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
30
|
+
|
31
|
+
Vedeu.interface :geometry_interface do
|
32
|
+
background '#ff3300'
|
33
|
+
border do
|
34
|
+
title 'Other'
|
35
|
+
colour foreground: '#ff0000'
|
36
|
+
end
|
37
|
+
geometry do
|
38
|
+
x 3
|
39
|
+
y 4
|
40
|
+
xn 13
|
41
|
+
yn 5
|
42
|
+
end
|
43
|
+
zindex 2
|
44
|
+
end
|
45
|
+
|
46
|
+
Vedeu.render do
|
47
|
+
view(:geometry_interface) do
|
48
|
+
lines do
|
49
|
+
2.times do
|
50
|
+
line (" " * 10)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.start(argv = ARGV)
|
57
|
+
Vedeu::Launcher.execute!(argv)
|
58
|
+
end
|
59
|
+
|
60
|
+
end # DSLApp
|
61
|
+
|
62
|
+
Vedeu.timer('Test') do
|
63
|
+
DSLApp.start
|
64
|
+
end
|
65
|
+
|
66
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
67
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_geometry_004'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
log '/tmp/vedeu_integrations.log'
|
17
|
+
renderers [
|
18
|
+
Vedeu::Renderers::Terminal.new(
|
19
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
20
|
+
write_file: true)
|
21
|
+
]
|
22
|
+
run_once!
|
23
|
+
standalone!
|
24
|
+
|
25
|
+
height 12
|
26
|
+
width 40
|
27
|
+
end
|
28
|
+
|
29
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
30
|
+
|
31
|
+
Vedeu.interface :geometry_interface do
|
32
|
+
background '#ff3300'
|
33
|
+
border do
|
34
|
+
title 'Other'
|
35
|
+
colour foreground: '#ff0000'
|
36
|
+
end
|
37
|
+
geometry do
|
38
|
+
x 21
|
39
|
+
y 4
|
40
|
+
xn 31
|
41
|
+
yn 5
|
42
|
+
end
|
43
|
+
zindex 2
|
44
|
+
end
|
45
|
+
|
46
|
+
Vedeu.render do
|
47
|
+
view(:geometry_interface) do
|
48
|
+
lines do
|
49
|
+
2.times do
|
50
|
+
line (" " * 10)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.start(argv = ARGV)
|
57
|
+
Vedeu::Launcher.execute!(argv)
|
58
|
+
end
|
59
|
+
|
60
|
+
end # DSLApp
|
61
|
+
|
62
|
+
Vedeu.timer('Test') do
|
63
|
+
DSLApp.start
|
64
|
+
end
|
65
|
+
|
66
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
67
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[39m[49m(0l(B[2;3H(0q(B[2;4H [2;5HT[2;6He[2;7Hs[2;8Ht[2;9H [2;10H(0q(B[2;11H(0q(B[2;12H(0q(B[2;13H(0q(B[2;14H(0q(B[2;15H(0q(B[2;16H(0q(B[2;17H(0q(B[2;18H(0q(B[2;19H(0q(B[2;20H(0q(B[2;21H(0q(B[2;22H(0q(B[2;23H(0q(B[2;24H(0q(B[2;25H(0q(B[2;26H(0q(B[2;27H(0q(B[2;28H(0q(B[2;29H(0q(B[2;30H(0q(B[2;31H(0q(B[2;32H(0k(B[0m[3;2H[39m[49m(0x(B[3;3H[38;5;196m(0l(B[3;4H(0q(B[3;5H [3;6HO[3;7Ht[3;8Hh[3;9He[3;10Hr[3;11H [3;12H(0q(B[3;13H(0k(B[3;14H[39m[49m [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;196m(0m(B[4;4H(0q(B[4;5H(0q(B[4;6H(0q(B[4;7H(0q(B[4;8H(0q(B[4;9H(0q(B[4;10H(0q(B[4;11H(0q(B[4;12H(0q(B[4;13H(0j(B[4;14H[39m[49m [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H(0x(B[0m[5;2H[39m[49m(0x(B[5;3H [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H(0x(B[0m[6;2H[39m[49m(0m(B[6;3H(0q(B[6;4H(0q(B[6;5H(0q(B[6;6H(0q(B[6;7H(0q(B[6;8H(0q(B[6;9H(0q(B[6;10H(0q(B[6;11H(0q(B[6;12H(0q(B[6;13H(0q(B[6;14H(0q(B[6;15H(0q(B[6;16H(0q(B[6;17H(0q(B[6;18H(0q(B[6;19H(0q(B[6;20H(0q(B[6;21H(0q(B[6;22H(0q(B[6;23H(0q(B[6;24H(0q(B[6;25H(0q(B[6;26H(0q(B[6;27H(0q(B[6;28H(0q(B[6;29H(0q(B[6;30H(0q(B[6;31H(0q(B[6;32H(0j(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[39m[49m(0l(B[2;3H(0q(B[2;4H [2;5HT[2;6He[2;7Hs[2;8Ht[2;9H [2;10H(0q(B[2;11H(0q(B[2;12H(0q(B[2;13H(0q(B[2;14H(0q(B[2;15H(0q(B[2;16H(0q(B[2;17H(0q(B[2;18H(0q(B[2;19H(0q(B[2;20H(0q(B[2;21H(0q(B[2;22H(0q(B[2;23H(0q(B[2;24H(0q(B[2;25H(0q(B[2;26H(0q(B[2;27H(0q(B[2;28H(0q(B[2;29H(0q(B[2;30H(0q(B[2;31H(0q(B[2;32H(0k(B[0m[3;2H[39m[49m(0x(B[3;3H [3;4H [3;5H [3;6H [3;7H [3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H[38;5;196m(0l(B[3;22H(0q(B[3;23H [3;24HO[3;25Ht[3;26Hh[3;27He[3;28Hr[3;29H [3;30H(0q(B[3;31H(0k(B[3;32H[39m[49m(0x(B[0m[4;2H[39m[49m(0x(B[4;3H [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H[38;5;196m(0m(B[4;22H(0q(B[4;23H(0q(B[4;24H(0q(B[4;25H(0q(B[4;26H(0q(B[4;27H(0q(B[4;28H(0q(B[4;29H(0q(B[4;30H(0q(B[4;31H(0j(B[4;32H[39m[49m(0x(B[0m[5;2H[39m[49m(0x(B[5;3H [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H(0x(B[0m[6;2H[39m[49m(0m(B[6;3H(0q(B[6;4H(0q(B[6;5H(0q(B[6;6H(0q(B[6;7H(0q(B[6;8H(0q(B[6;9H(0q(B[6;10H(0q(B[6;11H(0q(B[6;12H(0q(B[6;13H(0q(B[6;14H(0q(B[6;15H(0q(B[6;16H(0q(B[6;17H(0q(B[6;18H(0q(B[6;19H(0q(B[6;20H(0q(B[6;21H(0q(B[6;22H(0q(B[6;23H(0q(B[6;24H(0q(B[6;25H(0q(B[6;26H(0q(B[6;27H(0q(B[6;28H(0q(B[6;29H(0q(B[6;30H(0q(B[6;31H(0q(B[6;32H(0j(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[39m[49m(0l(B[2;3H(0q(B[2;4H [2;5HT[2;6He[2;7Hs[2;8Ht[2;9H [2;10H(0q(B[2;11H(0q(B[2;12H(0q(B[2;13H(0q(B[2;14H(0q(B[2;15H(0q(B[2;16H(0q(B[2;17H(0q(B[2;18H(0q(B[2;19H(0q(B[2;20H(0q(B[2;21H(0q(B[2;22H(0q(B[2;23H(0q(B[2;24H(0q(B[2;25H(0q(B[2;26H(0q(B[2;27H(0q(B[2;28H(0q(B[2;29H(0q(B[2;30H(0q(B[2;31H(0q(B[2;32H(0k(B[0m[3;2H[39m[49m(0x(B[3;3H [3;4H [3;5H [3;6H [3;7H [3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;196m(0l(B[4;4H(0q(B[4;5H [4;6HO[4;7Ht[4;8Hh[4;9He[4;10Hr[4;11H [4;12H(0q(B[4;13H(0k(B[4;14H[39m[49m [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H(0x(B[0m[5;2H[39m[49m(0x(B[5;3H[38;5;196m(0m(B[5;4H(0q(B[5;5H(0q(B[5;6H(0q(B[5;7H(0q(B[5;8H(0q(B[5;9H(0q(B[5;10H(0q(B[5;11H(0q(B[5;12H(0q(B[5;13H(0j(B[5;14H[39m[49m [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H(0x(B[0m[6;2H[39m[49m(0m(B[6;3H(0q(B[6;4H(0q(B[6;5H(0q(B[6;6H(0q(B[6;7H(0q(B[6;8H(0q(B[6;9H(0q(B[6;10H(0q(B[6;11H(0q(B[6;12H(0q(B[6;13H(0q(B[6;14H(0q(B[6;15H(0q(B[6;16H(0q(B[6;17H(0q(B[6;18H(0q(B[6;19H(0q(B[6;20H(0q(B[6;21H(0q(B[6;22H(0q(B[6;23H(0q(B[6;24H(0q(B[6;25H(0q(B[6;26H(0q(B[6;27H(0q(B[6;28H(0q(B[6;29H(0q(B[6;30H(0q(B[6;31H(0q(B[6;32H(0j(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[39m[49m(0l(B[2;3H(0q(B[2;4H [2;5HT[2;6He[2;7Hs[2;8Ht[2;9H [2;10H(0q(B[2;11H(0q(B[2;12H(0q(B[2;13H(0q(B[2;14H(0q(B[2;15H(0q(B[2;16H(0q(B[2;17H(0q(B[2;18H(0q(B[2;19H(0q(B[2;20H(0q(B[2;21H(0q(B[2;22H(0q(B[2;23H(0q(B[2;24H(0q(B[2;25H(0q(B[2;26H(0q(B[2;27H(0q(B[2;28H(0q(B[2;29H(0q(B[2;30H(0q(B[2;31H(0q(B[2;32H(0k(B[0m[3;2H[39m[49m(0x(B[3;3H [3;4H [3;5H [3;6H [3;7H [3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H(0x(B[0m[4;2H[39m[49m(0x(B[4;3H [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H[38;5;196m(0l(B[4;22H(0q(B[4;23H [4;24HO[4;25Ht[4;26Hh[4;27He[4;28Hr[4;29H [4;30H(0q(B[4;31H(0k(B[4;32H[39m[49m(0x(B[0m[5;2H[39m[49m(0x(B[5;3H [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H[38;5;196m(0m(B[5;22H(0q(B[5;23H(0q(B[5;24H(0q(B[5;25H(0q(B[5;26H(0q(B[5;27H(0q(B[5;28H(0q(B[5;29H(0q(B[5;30H(0q(B[5;31H(0j(B[5;32H[39m[49m(0x(B[0m[6;2H[39m[49m(0m(B[6;3H(0q(B[6;4H(0q(B[6;5H(0q(B[6;6H(0q(B[6;7H(0q(B[6;8H(0q(B[6;9H(0q(B[6;10H(0q(B[6;11H(0q(B[6;12H(0q(B[6;13H(0q(B[6;14H(0q(B[6;15H(0q(B[6;16H(0q(B[6;17H(0q(B[6;18H(0q(B[6;19H(0q(B[6;20H(0q(B[6;21H(0q(B[6;22H(0q(B[6;23H(0q(B[6;24H(0q(B[6;25H(0q(B[6;26H(0q(B[6;27H(0q(B[6;28H(0q(B[6;29H(0q(B[6;30H(0q(B[6;31H(0q(B[6;32H(0j(B[0m
|
data/integrations/test_runner.sh
CHANGED
@@ -48,5 +48,11 @@ cd "$(dirname "$0")"
|
|
48
48
|
./dsl_app_border_011.rb # only left
|
49
49
|
./dsl_app_border_012.rb # border on
|
50
50
|
|
51
|
+
# Test some geometry functionality
|
52
|
+
./dsl_app_geometry_001.rb
|
53
|
+
./dsl_app_geometry_002.rb
|
54
|
+
./dsl_app_geometry_003.rb
|
55
|
+
./dsl_app_geometry_004.rb
|
56
|
+
|
51
57
|
# Failing
|
52
58
|
# ./dsl_app_017.rb
|
data/lib/vedeu/buffers/all.rb
CHANGED
@@ -38,7 +38,7 @@ module Vedeu
|
|
38
38
|
|
39
39
|
# See {file:docs/events/by_name/refresh_view_content.md}
|
40
40
|
Vedeu.bind(:_refresh_view_content_) do |name|
|
41
|
-
Vedeu::Buffers::
|
41
|
+
Vedeu::Buffers::RefreshContent.by_name(name) if Vedeu.ready?
|
42
42
|
end
|
43
43
|
|
44
44
|
# :nocov:
|
@@ -51,4 +51,5 @@ require 'vedeu/buffers/buffer'
|
|
51
51
|
require 'vedeu/buffers/null'
|
52
52
|
require 'vedeu/buffers/repository'
|
53
53
|
require 'vedeu/buffers/refresh'
|
54
|
+
require 'vedeu/buffers/refresh_content'
|
54
55
|
require 'vedeu/buffers/terminal'
|
@@ -16,40 +16,32 @@ module Vedeu
|
|
16
16
|
# @param (see #initialize)
|
17
17
|
# @return (see #by_name)
|
18
18
|
def self.by_name(name = Vedeu.focus)
|
19
|
-
name ||= Vedeu.focus
|
20
|
-
|
21
19
|
new(name).by_name
|
22
20
|
end
|
23
21
|
|
24
|
-
# {include:file:docs/events/by_name/refresh_view_content.md}
|
25
|
-
# @param (see #initialize)
|
26
|
-
# @return (see #by_name)
|
27
|
-
def self.refresh_content_by_name(name = Vedeu.focus)
|
28
|
-
name ||= Vedeu.focus
|
29
|
-
|
30
|
-
new(name, content_only: true).by_name
|
31
|
-
end
|
32
|
-
|
33
22
|
# Return a new instance of Vedeu::Buffers::Refresh.
|
34
23
|
#
|
35
24
|
# @macro param_name
|
36
|
-
# @param options [Hash<Symbol => Boolean>]
|
37
|
-
# @option options content_only [Boolean]
|
38
25
|
# @return [Vedeu::Buffers::Refresh]
|
39
|
-
def initialize(name
|
40
|
-
@name
|
41
|
-
@options = options
|
26
|
+
def initialize(name = Vedeu.focus)
|
27
|
+
@name = name || Vedeu.focus
|
42
28
|
end
|
43
29
|
|
44
30
|
# @return [Array|Vedeu::Error::ModelNotFound]
|
45
31
|
def by_name
|
46
|
-
Vedeu.
|
32
|
+
Vedeu.clear_content_by_name(name)
|
47
33
|
|
48
34
|
buffer.render
|
49
35
|
|
50
|
-
Vedeu.trigger(:_refresh_border_, name)
|
36
|
+
Vedeu.trigger(:_refresh_border_, name)
|
51
37
|
end
|
52
38
|
|
39
|
+
protected
|
40
|
+
|
41
|
+
# @!attribute [r] name
|
42
|
+
# @macro return_name
|
43
|
+
attr_reader :name
|
44
|
+
|
53
45
|
private
|
54
46
|
|
55
47
|
# @macro buffer_by_name
|
@@ -57,28 +49,6 @@ module Vedeu
|
|
57
49
|
Vedeu.buffers.by_name(name)
|
58
50
|
end
|
59
51
|
|
60
|
-
# @return [Boolean]
|
61
|
-
def content_only?
|
62
|
-
truthy?(options[:content_only])
|
63
|
-
end
|
64
|
-
|
65
|
-
# @return [String|Symbol]
|
66
|
-
def name
|
67
|
-
present?(@name) ? @name : Vedeu.focus
|
68
|
-
end
|
69
|
-
|
70
|
-
# @return [Hash<Symbol => Boolean>]
|
71
|
-
def options
|
72
|
-
defaults.merge!(@options)
|
73
|
-
end
|
74
|
-
|
75
|
-
# @macro defaults_method
|
76
|
-
def defaults
|
77
|
-
{
|
78
|
-
content_only: false,
|
79
|
-
}
|
80
|
-
end
|
81
|
-
|
82
52
|
end # Refresh
|
83
53
|
|
84
54
|
end # Buffers
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Vedeu
|
4
|
+
|
5
|
+
module Buffers
|
6
|
+
|
7
|
+
# Refreshes only the content of the given named interface.
|
8
|
+
#
|
9
|
+
class RefreshContent
|
10
|
+
|
11
|
+
include Vedeu::Common
|
12
|
+
|
13
|
+
# {include:file:docs/events/by_name/refresh_view_content.md}
|
14
|
+
# @param (see #initialize)
|
15
|
+
# @return (see #by_name)
|
16
|
+
def self.by_name(name = Vedeu.focus)
|
17
|
+
new(name).by_name
|
18
|
+
end
|
19
|
+
|
20
|
+
# Return a new instance of Vedeu::Buffers::RefreshContent.
|
21
|
+
#
|
22
|
+
# @macro param_name
|
23
|
+
# @return [Vedeu::Buffers::RefreshContent]
|
24
|
+
def initialize(name = Vedeu.focus)
|
25
|
+
@name = name || Vedeu.focus
|
26
|
+
end
|
27
|
+
|
28
|
+
# @return [Array|Vedeu::Error::ModelNotFound]
|
29
|
+
def by_name
|
30
|
+
Vedeu.clear_content_by_name(name)
|
31
|
+
|
32
|
+
buffer.render
|
33
|
+
end
|
34
|
+
|
35
|
+
protected
|
36
|
+
|
37
|
+
# @!attribute [r] name
|
38
|
+
# @macro return_name
|
39
|
+
attr_reader :name
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
# @return [Vedeu::Buffers::Buffer]
|
44
|
+
def buffer
|
45
|
+
Vedeu.buffers.by_name(name)
|
46
|
+
end
|
47
|
+
|
48
|
+
end # RefreshContent
|
49
|
+
|
50
|
+
end # Buffers
|
51
|
+
|
52
|
+
end # Vedeu
|
@@ -42,7 +42,7 @@ module Vedeu
|
|
42
42
|
|
43
43
|
reset!
|
44
44
|
|
45
|
-
Vedeu.
|
45
|
+
Vedeu.clear_content_by_name(name) if Vedeu.ready?
|
46
46
|
|
47
47
|
Vedeu.trigger(:_command_, command)
|
48
48
|
|
@@ -148,7 +148,7 @@ module Vedeu
|
|
148
148
|
def refresh
|
149
149
|
store
|
150
150
|
|
151
|
-
Vedeu.
|
151
|
+
Vedeu.clear_content_by_name(name) if Vedeu.ready?
|
152
152
|
|
153
153
|
Vedeu.buffer_update(output)
|
154
154
|
|
data/lib/vedeu/esc/actions.rb
CHANGED
data/lib/vedeu/esc/borders.rb
CHANGED
data/lib/vedeu/esc/colours.rb
CHANGED
data/lib/vedeu/esc/esc.rb
CHANGED
data/lib/vedeu/esc/mouse.rb
CHANGED
data/lib/vedeu/groups/refresh.rb
CHANGED
@@ -56,16 +56,17 @@ module Vedeu
|
|
56
56
|
# @macro raise_missing_required
|
57
57
|
# @return [String]
|
58
58
|
def group_name
|
59
|
-
|
60
|
-
|
59
|
+
if present?(name)
|
60
|
+
name
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
elsif present?(interface.group)
|
63
|
+
interface.group
|
64
|
+
|
65
|
+
else
|
66
|
+
raise Vedeu::Error::MissingRequired,
|
67
|
+
'Cannot refresh group with an empty group name.'
|
65
68
|
|
66
|
-
|
67
|
-
def group_from_interface
|
68
|
-
@_group_name ||= interface.group
|
69
|
+
end
|
69
70
|
end
|
70
71
|
|
71
72
|
# @macro interface_by_name
|
@@ -33,9 +33,11 @@ module Vedeu
|
|
33
33
|
|
34
34
|
# @return [Vedeu::Buffers::View]
|
35
35
|
def render
|
36
|
-
Vedeu.
|
36
|
+
if Vedeu.ready?
|
37
|
+
Vedeu.direct_write(optimised_output)
|
37
38
|
|
38
|
-
|
39
|
+
Vedeu.buffer_update(output)
|
40
|
+
end
|
39
41
|
end
|
40
42
|
|
41
43
|
protected
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Vedeu
|
2
|
+
|
3
|
+
module Repositories
|
4
|
+
|
5
|
+
# @api private
|
6
|
+
#
|
7
|
+
class Cache
|
8
|
+
|
9
|
+
# @return [Vedeu::Repositories::Cache]
|
10
|
+
def initialize
|
11
|
+
@cache ||= {}
|
12
|
+
@lock = Mutex.new
|
13
|
+
end
|
14
|
+
|
15
|
+
# Add a new resource to the cache.
|
16
|
+
#
|
17
|
+
# @param resource [void]
|
18
|
+
# @param options [Hash]
|
19
|
+
# @option options value [void] The value to be cached.
|
20
|
+
# @option options expires [Fixnum] The number of seconds after
|
21
|
+
# which the resource will have expired.
|
22
|
+
# @return [void]
|
23
|
+
def add(resource, options = {})
|
24
|
+
value = options[:value]
|
25
|
+
expires = options.fetch(:expires, 600)
|
26
|
+
|
27
|
+
@lock.synchronize do
|
28
|
+
@cache[resource] = {
|
29
|
+
value: value,
|
30
|
+
expires_at: (Time.now + expires)
|
31
|
+
}
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Remove all cached resources.
|
36
|
+
#
|
37
|
+
# @return [Hash]
|
38
|
+
def clear
|
39
|
+
@cache = {}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Read the cached resource if it exists.
|
43
|
+
#
|
44
|
+
# @param resource [void]
|
45
|
+
# @return [void]
|
46
|
+
def read(resource)
|
47
|
+
resource = @cache[resource]
|
48
|
+
|
49
|
+
return unless resource
|
50
|
+
return if resource[:expires_at] < Time.now
|
51
|
+
|
52
|
+
resource[:value]
|
53
|
+
end
|
54
|
+
|
55
|
+
# Remove the cached resource if it exists.
|
56
|
+
#
|
57
|
+
# @param resource [void]
|
58
|
+
# @return [Boolean]
|
59
|
+
def remove(resource)
|
60
|
+
if @cache.key?(resource)
|
61
|
+
@cache.delete(resource)
|
62
|
+
true
|
63
|
+
|
64
|
+
else
|
65
|
+
false
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
end # Cache
|
71
|
+
|
72
|
+
end # Repositories
|
73
|
+
|
74
|
+
end # Vedeu
|
data/lib/vedeu/version.rb
CHANGED
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
module Vedeu
|
6
|
+
|
7
|
+
module Buffers
|
8
|
+
|
9
|
+
describe RefreshContent do
|
10
|
+
|
11
|
+
let(:described) { Vedeu::Buffers::RefreshContent }
|
12
|
+
let(:instance) { described.new(_name) }
|
13
|
+
let(:_name) { :vedeu_buffers_refresh }
|
14
|
+
let(:ready) { true }
|
15
|
+
let(:buffer) { mock('Vedeu::Buffers::Buffer', render: nil) }
|
16
|
+
|
17
|
+
before do
|
18
|
+
Vedeu.stubs(:clear_content_by_name).with(_name)
|
19
|
+
Vedeu.stubs(:trigger).with(:_refresh_border_, _name)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#initialize' do
|
23
|
+
it { instance.must_be_instance_of(described) }
|
24
|
+
it { instance.instance_variable_get('@name').must_equal(_name) }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '.by_name' do
|
28
|
+
before do
|
29
|
+
Vedeu.buffers.stubs(:by_name).with(_name).returns(buffer)
|
30
|
+
end
|
31
|
+
|
32
|
+
subject { described.by_name(_name) }
|
33
|
+
|
34
|
+
it do
|
35
|
+
Vedeu.expects(:clear_content_by_name).with(_name)
|
36
|
+
subject
|
37
|
+
end
|
38
|
+
|
39
|
+
it do
|
40
|
+
Vedeu.buffers.expects(:by_name).with(_name).returns(buffer)
|
41
|
+
subject
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe '#by_name' do
|
46
|
+
it { instance.must_respond_to(:by_name) }
|
47
|
+
end
|
48
|
+
|
49
|
+
end # RefreshContent
|
50
|
+
|
51
|
+
end # Buffers
|
52
|
+
|
53
|
+
end # Vedeu
|
@@ -4,36 +4,24 @@ require 'test_helper'
|
|
4
4
|
|
5
5
|
module Vedeu
|
6
6
|
|
7
|
-
describe 'Bindings' do
|
8
|
-
it { Vedeu.bound?(:_refresh_view_).must_equal(true) }
|
9
|
-
it { Vedeu.bound?(:_refresh_view_content_).must_equal(true) }
|
10
|
-
end
|
11
|
-
|
12
7
|
module Buffers
|
13
8
|
|
14
9
|
describe Refresh do
|
15
10
|
|
16
11
|
let(:described) { Vedeu::Buffers::Refresh }
|
17
|
-
let(:instance) { described.new(_name
|
12
|
+
let(:instance) { described.new(_name) }
|
18
13
|
let(:_name) { :vedeu_buffers_refresh }
|
19
|
-
let(:
|
20
|
-
|
21
|
-
content_only: content_only,
|
22
|
-
}
|
23
|
-
}
|
24
|
-
let(:content_only) { false }
|
25
|
-
let(:ready) { true }
|
26
|
-
let(:buffer) { mock('Vedeu::Buffers::Buffer', render: nil) }
|
14
|
+
let(:ready) { true }
|
15
|
+
let(:buffer) { mock('Vedeu::Buffers::Buffer', render: nil) }
|
27
16
|
|
28
17
|
before do
|
29
|
-
Vedeu.stubs(:
|
18
|
+
Vedeu.stubs(:clear_content_by_name).with(_name)
|
30
19
|
Vedeu.stubs(:trigger).with(:_refresh_border_, _name)
|
31
20
|
end
|
32
21
|
|
33
22
|
describe '#initialize' do
|
34
23
|
it { instance.must_be_instance_of(described) }
|
35
24
|
it { instance.instance_variable_get('@name').must_equal(_name) }
|
36
|
-
it { instance.instance_variable_get('@options').must_equal(options) }
|
37
25
|
end
|
38
26
|
|
39
27
|
describe '.by_name' do
|
@@ -44,7 +32,7 @@ module Vedeu
|
|
44
32
|
subject { described.by_name(_name) }
|
45
33
|
|
46
34
|
it do
|
47
|
-
Vedeu.expects(:
|
35
|
+
Vedeu.expects(:clear_content_by_name).with(_name)
|
48
36
|
subject
|
49
37
|
end
|
50
38
|
|
@@ -59,26 +47,6 @@ module Vedeu
|
|
59
47
|
end
|
60
48
|
end
|
61
49
|
|
62
|
-
describe '.refresh_content_by_name' do
|
63
|
-
let(:content_only) { true }
|
64
|
-
|
65
|
-
before do
|
66
|
-
Vedeu.buffers.stubs(:by_name).with(_name).returns(buffer)
|
67
|
-
end
|
68
|
-
|
69
|
-
subject { described.refresh_content_by_name(_name) }
|
70
|
-
|
71
|
-
it do
|
72
|
-
Vedeu.expects(:trigger).with(:_clear_view_content_, _name)
|
73
|
-
subject
|
74
|
-
end
|
75
|
-
|
76
|
-
it do
|
77
|
-
Vedeu.buffers.expects(:by_name).with(_name).returns(buffer)
|
78
|
-
subject
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
50
|
describe '#by_name' do
|
83
51
|
it { instance.must_respond_to(:by_name) }
|
84
52
|
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Vedeu
|
4
|
+
|
5
|
+
module Repositories
|
6
|
+
|
7
|
+
describe Cache do
|
8
|
+
|
9
|
+
let(:described) { Vedeu::Repositories::Cache }
|
10
|
+
let(:instance) { described.new }
|
11
|
+
|
12
|
+
describe '#initialize' do
|
13
|
+
it { instance.must_be_instance_of(described) }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#add' do
|
17
|
+
let(:resource) {}
|
18
|
+
let(:options) { {} }
|
19
|
+
|
20
|
+
subject { instance.add(resource, options) }
|
21
|
+
|
22
|
+
it { instance.must_respond_to(:add) }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#clear' do
|
26
|
+
subject { instance.clear }
|
27
|
+
|
28
|
+
it { instance.must_respond_to(:clear) }
|
29
|
+
end
|
30
|
+
|
31
|
+
describe '#read' do
|
32
|
+
let(:resource) {}
|
33
|
+
|
34
|
+
subject { instance.read(resource) }
|
35
|
+
|
36
|
+
it { instance.must_respond_to(:read) }
|
37
|
+
end
|
38
|
+
|
39
|
+
describe '#remove' do
|
40
|
+
let(:resource) {}
|
41
|
+
|
42
|
+
subject { instance.remove(resource) }
|
43
|
+
|
44
|
+
it { instance.must_respond_to(:remove) }
|
45
|
+
end
|
46
|
+
|
47
|
+
end # Cache
|
48
|
+
|
49
|
+
end # Repositories
|
50
|
+
|
51
|
+
end # Vedeu
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vedeu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Laking
|
@@ -237,10 +237,15 @@ files:
|
|
237
237
|
- bin/vedeu_test
|
238
238
|
- config/rubocop_enabled.yml
|
239
239
|
- docs/api.md
|
240
|
+
- docs/applications/existing_application.md
|
241
|
+
- docs/applications/first_application.md
|
242
|
+
- docs/applications/gem_application.md
|
243
|
+
- docs/applications/simple_application.md
|
240
244
|
- docs/borders.md
|
241
245
|
- docs/buffer.md
|
242
246
|
- docs/cell.md
|
243
247
|
- docs/chars.md
|
248
|
+
- docs/cli/commands.md
|
244
249
|
- docs/colours_styles.md
|
245
250
|
- docs/configuration.md
|
246
251
|
- docs/configuration/background.md
|
@@ -573,6 +578,10 @@ files:
|
|
573
578
|
- integrations/dsl_app_border_010.rb
|
574
579
|
- integrations/dsl_app_border_011.rb
|
575
580
|
- integrations/dsl_app_border_012.rb
|
581
|
+
- integrations/dsl_app_geometry_001.rb
|
582
|
+
- integrations/dsl_app_geometry_002.rb
|
583
|
+
- integrations/dsl_app_geometry_003.rb
|
584
|
+
- integrations/dsl_app_geometry_004.rb
|
576
585
|
- integrations/expected/342_streams.out
|
577
586
|
- integrations/expected/dsl_app_001.out
|
578
587
|
- integrations/expected/dsl_app_002.out
|
@@ -607,6 +616,10 @@ files:
|
|
607
616
|
- integrations/expected/dsl_app_border_010.out
|
608
617
|
- integrations/expected/dsl_app_border_011.out
|
609
618
|
- integrations/expected/dsl_app_border_012.out
|
619
|
+
- integrations/expected/dsl_app_geometry_001.out
|
620
|
+
- integrations/expected/dsl_app_geometry_002.out
|
621
|
+
- integrations/expected/dsl_app_geometry_003.out
|
622
|
+
- integrations/expected/dsl_app_geometry_004.out
|
610
623
|
- integrations/support/test_interface.rb
|
611
624
|
- integrations/support/test_interface_021.rb
|
612
625
|
- integrations/support/test_interface_022.rb
|
@@ -634,6 +647,7 @@ files:
|
|
634
647
|
- lib/vedeu/buffers/empty.rb
|
635
648
|
- lib/vedeu/buffers/null.rb
|
636
649
|
- lib/vedeu/buffers/refresh.rb
|
650
|
+
- lib/vedeu/buffers/refresh_content.rb
|
637
651
|
- lib/vedeu/buffers/repository.rb
|
638
652
|
- lib/vedeu/buffers/terminal.rb
|
639
653
|
- lib/vedeu/buffers/view.rb
|
@@ -842,6 +856,7 @@ files:
|
|
842
856
|
- lib/vedeu/renderers/text.rb
|
843
857
|
- lib/vedeu/repositories/all.rb
|
844
858
|
- lib/vedeu/repositories/assemblage.rb
|
859
|
+
- lib/vedeu/repositories/cache.rb
|
845
860
|
- lib/vedeu/repositories/collection.rb
|
846
861
|
- lib/vedeu/repositories/defaults.rb
|
847
862
|
- lib/vedeu/repositories/model.rb
|
@@ -896,9 +911,11 @@ files:
|
|
896
911
|
- test/lib/vedeu/borders/refresh_test.rb
|
897
912
|
- test/lib/vedeu/borders/repository_test.rb
|
898
913
|
- test/lib/vedeu/borders/title_test.rb
|
914
|
+
- test/lib/vedeu/buffers/all_test.rb
|
899
915
|
- test/lib/vedeu/buffers/buffer_test.rb
|
900
916
|
- test/lib/vedeu/buffers/empty_test.rb
|
901
917
|
- test/lib/vedeu/buffers/null_test.rb
|
918
|
+
- test/lib/vedeu/buffers/refresh_content_test.rb
|
902
919
|
- test/lib/vedeu/buffers/refresh_test.rb
|
903
920
|
- test/lib/vedeu/buffers/repository_test.rb
|
904
921
|
- test/lib/vedeu/buffers/terminal_test.rb
|
@@ -1068,6 +1085,7 @@ files:
|
|
1068
1085
|
- test/lib/vedeu/renderers/terminal_test.rb
|
1069
1086
|
- test/lib/vedeu/renderers/text_test.rb
|
1070
1087
|
- test/lib/vedeu/repositories/assemblage_test.rb
|
1088
|
+
- test/lib/vedeu/repositories/cache_test.rb
|
1071
1089
|
- test/lib/vedeu/repositories/collection_test.rb
|
1072
1090
|
- test/lib/vedeu/repositories/defaults_test.rb
|
1073
1091
|
- test/lib/vedeu/repositories/model_test.rb
|
@@ -1160,9 +1178,11 @@ test_files:
|
|
1160
1178
|
- test/lib/vedeu/borders/refresh_test.rb
|
1161
1179
|
- test/lib/vedeu/borders/repository_test.rb
|
1162
1180
|
- test/lib/vedeu/borders/title_test.rb
|
1181
|
+
- test/lib/vedeu/buffers/all_test.rb
|
1163
1182
|
- test/lib/vedeu/buffers/buffer_test.rb
|
1164
1183
|
- test/lib/vedeu/buffers/empty_test.rb
|
1165
1184
|
- test/lib/vedeu/buffers/null_test.rb
|
1185
|
+
- test/lib/vedeu/buffers/refresh_content_test.rb
|
1166
1186
|
- test/lib/vedeu/buffers/refresh_test.rb
|
1167
1187
|
- test/lib/vedeu/buffers/repository_test.rb
|
1168
1188
|
- test/lib/vedeu/buffers/terminal_test.rb
|
@@ -1332,6 +1352,7 @@ test_files:
|
|
1332
1352
|
- test/lib/vedeu/renderers/terminal_test.rb
|
1333
1353
|
- test/lib/vedeu/renderers/text_test.rb
|
1334
1354
|
- test/lib/vedeu/repositories/assemblage_test.rb
|
1355
|
+
- test/lib/vedeu/repositories/cache_test.rb
|
1335
1356
|
- test/lib/vedeu/repositories/collection_test.rb
|
1336
1357
|
- test/lib/vedeu/repositories/defaults_test.rb
|
1337
1358
|
- test/lib/vedeu/repositories/model_test.rb
|