vedeu 0.8.21 → 0.8.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/vedeu_drb_server +4 -4
- data/docs/configuration/log.md +3 -1
- data/docs/configuration/profile.md +2 -1
- data/examples/dsl_alignment.rb +2 -2
- data/examples/dsl_colours.rb +2 -2
- data/examples/dsl_demo_groups.rb +1 -1
- data/examples/dsl_editor.rb +2 -2
- data/examples/dsl_hello_worlds.rb +1 -1
- data/examples/dsl_horizontal_alignment.rb +2 -2
- data/examples/dsl_menus.rb +1 -1
- data/examples/dsl_vertical_alignment.rb +2 -2
- data/examples/views/empty_template.rb +5 -5
- data/examples/views/full_screen.rb +5 -5
- data/examples/views/misc_view.rb +3 -2
- data/examples/views/wordwrap.rb +1 -1
- data/integrations/342_streams.rb +2 -2
- data/integrations/dsl_app_001.rb +5 -5
- data/integrations/dsl_app_002.rb +5 -5
- data/integrations/dsl_app_003.rb +5 -5
- data/integrations/dsl_app_004.rb +5 -5
- data/integrations/dsl_app_005.rb +5 -5
- data/integrations/dsl_app_006.rb +5 -5
- data/integrations/dsl_app_007.rb +5 -5
- data/integrations/dsl_app_008.rb +5 -5
- data/integrations/dsl_app_009.rb +5 -5
- data/integrations/dsl_app_010.rb +5 -5
- data/integrations/dsl_app_011.rb +5 -5
- data/integrations/dsl_app_012.rb +5 -5
- data/integrations/dsl_app_013.rb +5 -5
- data/integrations/dsl_app_014.rb +5 -5
- data/integrations/dsl_app_015.rb +5 -5
- data/integrations/dsl_app_016.rb +5 -5
- data/integrations/dsl_app_017.rb +5 -5
- data/integrations/dsl_app_018.rb +5 -5
- data/integrations/dsl_app_019.rb +5 -5
- data/integrations/dsl_app_020.rb +5 -5
- data/integrations/dsl_app_021.rb +5 -5
- data/integrations/dsl_app_022.rb +5 -5
- data/integrations/dsl_app_border_001.rb +5 -5
- data/integrations/dsl_app_border_002.rb +5 -5
- data/integrations/dsl_app_border_003.rb +5 -5
- data/integrations/dsl_app_border_004.rb +5 -5
- data/integrations/dsl_app_border_005.rb +5 -5
- data/integrations/dsl_app_border_006.rb +5 -5
- data/integrations/dsl_app_border_007.rb +5 -5
- data/integrations/dsl_app_border_008.rb +5 -5
- data/integrations/dsl_app_border_009.rb +5 -5
- data/integrations/dsl_app_border_010.rb +5 -5
- data/integrations/dsl_app_border_011.rb +5 -5
- data/integrations/test_runner.rb +1 -1
- data/lib/vedeu/configuration/configuration.rb +1 -1
- data/lib/vedeu/distributed/subprocess.rb +2 -4
- data/lib/vedeu/distributed/templates/default_configuration.vedeu +2 -2
- data/lib/vedeu/editor/cropper.rb +4 -4
- data/lib/vedeu/editor/cursor.rb +13 -6
- data/lib/vedeu/editor/item.rb +12 -2
- data/lib/vedeu/logging/debug.rb +1 -1
- data/lib/vedeu/renderers/support/options.rb +1 -1
- data/lib/vedeu/runtime/bootstrap.rb +1 -1
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu.rb +1 -0
- data/test/lib/vedeu/configuration/api_test.rb +2 -2
- data/test/lib/vedeu/configuration/configuration_test.rb +3 -3
- data/test/lib/vedeu/logging/debug_test.rb +1 -1
- data/test/lib/vedeu/renderers/support/file_test.rb +3 -3
- data/test/lib/vedeu/templating/template_test.rb +2 -2
- data/test/lib/vedeu/templating/view_template_test.rb +1 -1
- data/test/support/examples/drb_app.rb +2 -2
- data/test/support/examples/focus_app.rb +1 -1
- data/test/support/examples/hello_world.rb +1 -1
- data/test/support/examples/material_colours_app.rb +2 -2
- data/test/support/examples/view_templates_app/view_templates_app.rb +1 -1
- data/test/support/ttyrec.rb +2 -2
- data/test/test_helper.rb +3 -3
- metadata +2 -2
data/integrations/dsl_app_019.rb
CHANGED
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
data/integrations/dsl_app_020.rb
CHANGED
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
data/integrations/dsl_app_021.rb
CHANGED
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
data/integrations/dsl_app_022.rb
CHANGED
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
@@ -14,14 +14,14 @@ class DSLApp
|
|
14
14
|
Vedeu.configure do
|
15
15
|
debug!
|
16
16
|
height 10
|
17
|
-
log '/
|
17
|
+
log Dir.tmpdir + '/vedeu_views_dsl.log'
|
18
18
|
renderers [
|
19
19
|
Vedeu::Renderers::Terminal.new(
|
20
|
-
filename: "
|
20
|
+
filename: Dir.tmpdir + "/#{TESTCASE}.out",
|
21
21
|
write_file: true),
|
22
|
-
# Vedeu::Renderers::JSON.new(filename: "
|
23
|
-
# Vedeu::Renderers::HTML.new(filename: "
|
24
|
-
# Vedeu::Renderers::Text.new(filename: "
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: Dir.tmpdir + "/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: Dir.tmpdir + "/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: Dir.tmpdir + "/#{TESTCASE}.txt"),
|
25
25
|
]
|
26
26
|
run_once!
|
27
27
|
standalone!
|
data/integrations/test_runner.rb
CHANGED
@@ -27,9 +27,7 @@ module Vedeu
|
|
27
27
|
def execute!
|
28
28
|
file_open && file_write && file_close
|
29
29
|
|
30
|
-
@pid = fork
|
31
|
-
exec(file_path)
|
32
|
-
end
|
30
|
+
@pid = fork { exec(file_path) }
|
33
31
|
|
34
32
|
Process.detach(@pid)
|
35
33
|
|
@@ -91,7 +89,7 @@ module Vedeu
|
|
91
89
|
|
92
90
|
# @return [String]
|
93
91
|
def file_name
|
94
|
-
"/
|
92
|
+
Dir.tmpdir + "/foo_#{timestamp}"
|
95
93
|
end
|
96
94
|
|
97
95
|
# return [Fixnum]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Vedeu.configure do
|
2
2
|
# compression false
|
3
|
-
# log '/
|
3
|
+
# log Dir.tmpdir + '/your_app.log'
|
4
4
|
# debug!
|
5
5
|
# profile!
|
6
6
|
# drb!
|
@@ -22,5 +22,5 @@ Vedeu.configure do
|
|
22
22
|
# Not used yet
|
23
23
|
# stdin File.open("/dev/tty", "r")
|
24
24
|
# stdout File.open("/dev/tty", "w")
|
25
|
-
# stderr File.open("/
|
25
|
+
# stderr File.open(Dir.tmpdir + "/vedeu_error.log", "w+")
|
26
26
|
end
|
data/lib/vedeu/editor/cropper.rb
CHANGED
@@ -45,10 +45,10 @@ module Vedeu
|
|
45
45
|
|
46
46
|
visible.each_with_index do |line, iy|
|
47
47
|
line.chars.each_with_index do |char, ix|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
out << Vedeu::Cells::Char.new(
|
49
|
+
name: name,
|
50
|
+
position: Vedeu::Geometries::Position.new((by + iy), (bx + ix)),
|
51
|
+
value: char)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
data/lib/vedeu/editor/cursor.rb
CHANGED
@@ -93,12 +93,7 @@ module Vedeu
|
|
93
93
|
# @return [Vedeu::Editor::Cursor]
|
94
94
|
# @todo Should ox/oy be 0; or set to @ox/@oy? (GL: 2015-10-02)
|
95
95
|
def refresh
|
96
|
-
Vedeu::Cursors::Cursor.store(
|
97
|
-
x: real_x,
|
98
|
-
y: real_y,
|
99
|
-
ox: 0,
|
100
|
-
oy: 0,
|
101
|
-
visible: true)
|
96
|
+
Vedeu::Cursors::Cursor.store(refresh_attributes)
|
102
97
|
|
103
98
|
Vedeu.trigger(:_refresh_cursor_, name)
|
104
99
|
|
@@ -195,6 +190,18 @@ module Vedeu
|
|
195
190
|
(bx + x) - ox
|
196
191
|
end
|
197
192
|
|
193
|
+
# @return [Hash<Symbol => Fixnum, String, Symbol>]
|
194
|
+
def refresh_attributes
|
195
|
+
{
|
196
|
+
name: name,
|
197
|
+
x: real_x,
|
198
|
+
y: real_y,
|
199
|
+
ox: 0,
|
200
|
+
oy: 0,
|
201
|
+
visible: true
|
202
|
+
}
|
203
|
+
end
|
204
|
+
|
198
205
|
end # Cursor
|
199
206
|
|
200
207
|
end # Editor
|
data/lib/vedeu/editor/item.rb
CHANGED
@@ -30,10 +30,10 @@ module Vedeu
|
|
30
30
|
def by_index
|
31
31
|
return nil unless collection
|
32
32
|
|
33
|
-
if
|
33
|
+
if index_out_of_range?
|
34
34
|
last_item
|
35
35
|
|
36
|
-
elsif
|
36
|
+
elsif index_within_range?
|
37
37
|
nth_item
|
38
38
|
|
39
39
|
else
|
@@ -69,6 +69,16 @@ module Vedeu
|
|
69
69
|
collection[index]
|
70
70
|
end
|
71
71
|
|
72
|
+
# @return [Boolean]
|
73
|
+
def index_out_of_range?
|
74
|
+
index.nil? || index > collection.size
|
75
|
+
end
|
76
|
+
|
77
|
+
# @return [Boolean]
|
78
|
+
def index_within_range?
|
79
|
+
index > 0 && index <= collection.size
|
80
|
+
end
|
81
|
+
|
72
82
|
end # Item
|
73
83
|
|
74
84
|
end # Editor
|
data/lib/vedeu/logging/debug.rb
CHANGED
@@ -41,7 +41,7 @@ module Vedeu
|
|
41
41
|
# @macro raise_requires_block
|
42
42
|
# @return [void]
|
43
43
|
# @yieldreturn [void] The section of the application to profile.
|
44
|
-
def profile(filename = '/
|
44
|
+
def profile(filename = Dir.tmpdir + '/vedeu_profile', &block)
|
45
45
|
Vedeu.requires_gem!('ruby-prof')
|
46
46
|
|
47
47
|
raise Vedeu::Error::RequiresBlock unless block_given?
|
data/lib/vedeu/version.rb
CHANGED
data/lib/vedeu.rb
CHANGED
@@ -257,8 +257,8 @@ module Vedeu
|
|
257
257
|
|
258
258
|
describe '#log' do
|
259
259
|
it 'sets the options to the desired value' do
|
260
|
-
configuration = Vedeu.configure { log('/
|
261
|
-
configuration.log.must_equal('/
|
260
|
+
configuration = Vedeu.configure { log(Dir.tmpdir + '/vedeu_api_test.log') }
|
261
|
+
configuration.log.must_equal(Dir.tmpdir + '/vedeu_api_test.log')
|
262
262
|
end
|
263
263
|
end
|
264
264
|
|
@@ -66,18 +66,18 @@ module Vedeu
|
|
66
66
|
describe '.log' do
|
67
67
|
context 'when the log is not configured' do
|
68
68
|
it 'sends messages to the default log' do
|
69
|
-
described.log.must_equal('/
|
69
|
+
described.log.must_equal(Dir.tmpdir + '/vedeu_bootstrap.log')
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
73
|
context 'when the log is configured with a filename' do
|
74
74
|
before do
|
75
75
|
Vedeu.configure do
|
76
|
-
log '/
|
76
|
+
log Dir.tmpdir + '/vedeu.log'
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
it { described.log.must_equal('/
|
80
|
+
it { described.log.must_equal(Dir.tmpdir + '/vedeu.log') }
|
81
81
|
end
|
82
82
|
|
83
83
|
context 'when the log is configured with false' do
|
@@ -11,7 +11,7 @@ module Vedeu
|
|
11
11
|
let(:described) { Vedeu::Logging::Debug }
|
12
12
|
|
13
13
|
before do
|
14
|
-
File.stubs(:open).with('/
|
14
|
+
File.stubs(:open).with(Dir.tmpdir + '/vedeu_profile', 'w').returns(:some_code)
|
15
15
|
end
|
16
16
|
|
17
17
|
describe '.debug' do
|
@@ -55,7 +55,7 @@ module Vedeu
|
|
55
55
|
# context 'when the filename option is not set' do
|
56
56
|
# context 'when the timestamp option is not set' do
|
57
57
|
# # it do
|
58
|
-
# # ::File.expects(:write).with('/
|
58
|
+
# # ::File.expects(:write).with(Dir.tmpdir + '/out', nil)
|
59
59
|
# # subject
|
60
60
|
# # end
|
61
61
|
# end
|
@@ -66,7 +66,7 @@ module Vedeu
|
|
66
66
|
# before { Time.stubs(:now).returns(_time) }
|
67
67
|
|
68
68
|
# # it do
|
69
|
-
# # ::File.expects(:write).with('/
|
69
|
+
# # ::File.expects(:write).with(Dir.tmpdir + '/out_1428865500.0', 'w')
|
70
70
|
# # subject
|
71
71
|
# # end
|
72
72
|
# end
|
@@ -76,7 +76,7 @@ module Vedeu
|
|
76
76
|
# let(:filename) { 'some_name' }
|
77
77
|
|
78
78
|
# # it do
|
79
|
-
# # ::File.expects(:write).with('/
|
79
|
+
# # ::File.expects(:write).with(Dir.tmpdir + '/some_name', 'w')
|
80
80
|
# # subject
|
81
81
|
# # end
|
82
82
|
# end
|
@@ -29,7 +29,7 @@ module Vedeu
|
|
29
29
|
end
|
30
30
|
|
31
31
|
context 'when the path is does not exist' do
|
32
|
-
let(:path) { '/
|
32
|
+
let(:path) { Dir.tmpdir + '/vedeu_does_not_exist' }
|
33
33
|
|
34
34
|
before { File.stubs(:exist?).returns(false) }
|
35
35
|
|
@@ -37,7 +37,7 @@ module Vedeu
|
|
37
37
|
end
|
38
38
|
|
39
39
|
context 'when the path exists' do
|
40
|
-
let(:path) { '/
|
40
|
+
let(:path) { Dir.tmpdir + '/vedeu_exists' }
|
41
41
|
let(:expected) { "This is a test.\n" }
|
42
42
|
|
43
43
|
before do
|
@@ -11,7 +11,7 @@ module Vedeu
|
|
11
11
|
let(:described) { Vedeu::Templating::ViewTemplate }
|
12
12
|
let(:instance) { described.new(object, path, options) }
|
13
13
|
let(:object) {}
|
14
|
-
let(:path) { '/
|
14
|
+
let(:path) { Dir.tmpdir + '/some_template.erb' }
|
15
15
|
let(:options) { {} }
|
16
16
|
let(:content) { '' }
|
17
17
|
|
@@ -17,7 +17,7 @@ class VedeuTestApplication
|
|
17
17
|
# Be aware that running an application with profiling enabled will affect
|
18
18
|
# performance.
|
19
19
|
Vedeu.configure do
|
20
|
-
log '/
|
20
|
+
log Dir.tmpdir + '/vedeu_test_helper.log'
|
21
21
|
debug!
|
22
22
|
# profile!
|
23
23
|
drb!
|
@@ -45,7 +45,7 @@ class VedeuTestApplication
|
|
45
45
|
# Not used yet
|
46
46
|
# stdin File.open("/dev/tty", "r")
|
47
47
|
# stdout File.open("/dev/tty", "w")
|
48
|
-
# stderr File.open("/
|
48
|
+
# stderr File.open(Dir.tmpdir + "/vedeu_error.log", "w+")
|
49
49
|
end
|
50
50
|
|
51
51
|
Vedeu.border 'test_interface' do
|