vedeu 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/integrations/342_streams.rb +74 -0
- data/integrations/dsl_app_001.rb +58 -0
- data/integrations/dsl_app_002.rb +59 -0
- data/integrations/dsl_app_003.rb +58 -0
- data/integrations/dsl_app_004.rb +63 -0
- data/integrations/dsl_app_005.rb +62 -0
- data/integrations/dsl_app_006.rb +57 -0
- data/integrations/dsl_app_007.rb +63 -0
- data/integrations/dsl_app_008.rb +65 -0
- data/integrations/dsl_app_009.rb +70 -0
- data/integrations/dsl_app_010.rb +71 -0
- data/integrations/dsl_app_011.rb +61 -0
- data/integrations/dsl_app_012.rb +59 -0
- data/integrations/dsl_app_013.rb +60 -0
- data/integrations/dsl_app_014.rb +60 -0
- data/integrations/dsl_app_015.rb +60 -0
- data/integrations/dsl_app_016.rb +64 -0
- data/integrations/dsl_app_017.rb +56 -0
- data/integrations/dsl_app_018.rb +56 -0
- data/integrations/dsl_app_019.rb +56 -0
- data/integrations/dsl_app_020.rb +56 -0
- data/integrations/expected/342_streams.out +1 -0
- data/integrations/expected/dsl_app_001.out +1 -0
- data/integrations/expected/dsl_app_002.out +1 -0
- data/integrations/expected/dsl_app_003.out +1 -0
- data/integrations/expected/dsl_app_004.out +1 -0
- data/integrations/expected/dsl_app_005.out +1 -0
- data/integrations/expected/dsl_app_006.out +1 -0
- data/integrations/expected/dsl_app_007.out +1 -0
- data/integrations/expected/dsl_app_008.out +1 -0
- data/integrations/expected/dsl_app_009.out +1 -0
- data/integrations/expected/dsl_app_010.out +1 -0
- data/integrations/expected/dsl_app_011.out +1 -0
- data/integrations/expected/dsl_app_012.out +1 -0
- data/integrations/expected/dsl_app_013.out +1 -0
- data/integrations/expected/dsl_app_014.out +1 -0
- data/integrations/expected/dsl_app_015.out +1 -0
- data/integrations/expected/dsl_app_016.out +1 -0
- data/integrations/support/test_interface.rb +13 -0
- data/integrations/test_runner.sh +32 -0
- data/lib/vedeu/cells/empty.rb +14 -0
- data/lib/vedeu/colours/background.rb +13 -0
- data/lib/vedeu/colours/colour.rb +11 -4
- data/lib/vedeu/colours/foreground.rb +13 -0
- data/lib/vedeu/common.rb +42 -0
- data/lib/vedeu/dsl/attributes.rb +1 -1
- data/lib/vedeu/dsl/elements.rb +57 -23
- data/lib/vedeu/dsl/string/align.rb +17 -2
- data/lib/vedeu/geometries/position.rb +5 -0
- data/lib/vedeu/geometries/positionable.rb +2 -2
- data/lib/vedeu/presentation/style.rb +5 -0
- data/lib/vedeu/renderers/all.rb +1 -0
- data/lib/vedeu/renderers/escape.rb +96 -0
- data/lib/vedeu/repositories/defaults.rb +14 -6
- data/lib/vedeu/runtime/launcher.rb +5 -1
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/lines.rb +5 -0
- data/lib/vedeu/views/stream.rb +8 -1
- data/lib/vedeu/views/streams.rb +6 -1
- data/lib/vedeu/views/value.rb +2 -8
- data/lib/vedeu/views/view.rb +1 -1
- data/test/lib/vedeu/colours/colour_test.rb +0 -8
- data/test/lib/vedeu/common_test.rb +72 -0
- data/test/lib/vedeu/dsl/string/align_test.rb +1 -1
- metadata +43 -17
- data/examples/284_slow_rendering.rb +0 -108
- data/examples/views/expected/vedeu_line.html +0 -140
- data/examples/views/expected/vedeu_line.json +0 -96050
- data/examples/views/expected/vedeu_line.out +0 -1
- data/examples/views/expected/vedeu_line.txt +0 -58
- data/examples/views/expected/vedeu_lines.html +0 -140
- data/examples/views/expected/vedeu_lines.json +0 -96050
- data/examples/views/expected/vedeu_lines.out +0 -1
- data/examples/views/expected/vedeu_lines_alignment.html +0 -80
- data/examples/views/expected/vedeu_lines_alignment.json +0 -46370
- data/examples/views/expected/vedeu_lines_alignment.out +0 -1
- data/examples/views/line.rb +0 -128
- data/examples/views/lines.rb +0 -165
- data/examples/views/lines_alignment.rb +0 -126
- data/examples/views/runner.sh +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abd33ac728a08d3f956652ebd9d8bac4b7c8174c
|
4
|
+
data.tar.gz: 9a9e106f52a0313cd07403bf11e2a39ba68c187c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44a86ea06288d4aa5addcd6a9035622e45f489e53c99214ac3191daf64662ea3d85044110a536ed0d30dcebcf2112ebddfddd3e54af71e3c3ae54d9c7d3b1cb1
|
7
|
+
data.tar.gz: 48cd0c06ff4387e3629e07a162b9ca74b4172e8cf815fe9b93e15dd4f1a3d50c8b7e162ffe6438e72bb7e295e348449ddfcc811d2ebe6914d00f822e3b057094
|
data/.rubocop.yml
CHANGED
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
height 5
|
14
|
+
debug!
|
15
|
+
log '/tmp/vedeu_views_dsl.log'
|
16
|
+
renderers(Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/342_streams.out',
|
18
|
+
write_file: true))
|
19
|
+
run_once!
|
20
|
+
standalone!
|
21
|
+
end
|
22
|
+
|
23
|
+
Vedeu.interface :test1_interface do
|
24
|
+
background '#000022'
|
25
|
+
geometry do
|
26
|
+
x 3
|
27
|
+
y 3
|
28
|
+
xn 53
|
29
|
+
yn 3
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
Vedeu.render do
|
34
|
+
view(:test1_interface) do
|
35
|
+
line do
|
36
|
+
stream do
|
37
|
+
foreground '#cc66ff'
|
38
|
+
left '07/01/2016 21:32:19'
|
39
|
+
end
|
40
|
+
stream do
|
41
|
+
foreground '#007777'
|
42
|
+
left ' null'
|
43
|
+
end
|
44
|
+
stream do
|
45
|
+
foreground '#dddddd'
|
46
|
+
left ' > hi'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.actual
|
53
|
+
File.read('/tmp/342_streams.out')
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.expected
|
57
|
+
File.read(File.expand_path('../expected/342_streams.out', __FILE__))
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.start(argv = ARGV)
|
61
|
+
Vedeu::Launcher.execute!(argv)
|
62
|
+
end
|
63
|
+
|
64
|
+
end # DSLApp
|
65
|
+
|
66
|
+
DSLApp.start
|
67
|
+
|
68
|
+
if DSLApp.expected == DSLApp.actual
|
69
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
70
|
+
exit 0;
|
71
|
+
else
|
72
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
73
|
+
exit 1;
|
74
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
debug!
|
14
|
+
log '/tmp/vedeu_views_dsl.log'
|
15
|
+
renderers [
|
16
|
+
Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/dsl_app_001.out',
|
18
|
+
write_file: true),
|
19
|
+
# Vedeu::Renderers::JSON.new(filename: '/tmp/dsl_app_001.json'),
|
20
|
+
# Vedeu::Renderers::HTML.new(filename: '/tmp/dsl_app_001.html'),
|
21
|
+
# Vedeu::Renderers::Text.new(filename: '/tmp/dsl_app_001.txt'),
|
22
|
+
]
|
23
|
+
run_once!
|
24
|
+
standalone!
|
25
|
+
end
|
26
|
+
|
27
|
+
load './support/test_interface.rb'
|
28
|
+
|
29
|
+
Vedeu.render do
|
30
|
+
view(:test_interface) do
|
31
|
+
background '#440000'
|
32
|
+
line 'view->line', { foreground: '#ff0000' }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.actual
|
37
|
+
File.read('/tmp/dsl_app_001.out')
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.expected
|
41
|
+
File.read(File.expand_path('../expected/dsl_app_001.out', __FILE__))
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.start(argv = ARGV)
|
45
|
+
Vedeu::Launcher.execute!(argv)
|
46
|
+
end
|
47
|
+
|
48
|
+
end # DSLApp
|
49
|
+
|
50
|
+
DSLApp.start
|
51
|
+
|
52
|
+
if DSLApp.expected == DSLApp.actual
|
53
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
54
|
+
exit 0;
|
55
|
+
else
|
56
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
57
|
+
exit 1;
|
58
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
debug!
|
14
|
+
log '/tmp/vedeu_views_dsl.log'
|
15
|
+
renderers [
|
16
|
+
Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/dsl_app_002.out',
|
18
|
+
write_file: true),
|
19
|
+
# Vedeu::Renderers::JSON.new(filename: '/tmp/dsl_app_002.json'),
|
20
|
+
# Vedeu::Renderers::HTML.new(filename: '/tmp/dsl_app_002.html'),
|
21
|
+
# Vedeu::Renderers::Text.new(filename: '/tmp/dsl_app_002.txt'),
|
22
|
+
]
|
23
|
+
run_once!
|
24
|
+
standalone!
|
25
|
+
end
|
26
|
+
|
27
|
+
load './support/test_interface.rb'
|
28
|
+
|
29
|
+
Vedeu.render do
|
30
|
+
view(:test_interface) do
|
31
|
+
line 'view->line 1', { foreground: '#ff7f00' }
|
32
|
+
line 'view->line 2', { foreground: '#ffff00' }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.actual
|
37
|
+
File.read('/tmp/dsl_app_002.out')
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.expected
|
41
|
+
File.read(File.expand_path('../expected/dsl_app_002.out', __FILE__))
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.start(argv = ARGV)
|
45
|
+
Vedeu::Launcher.execute!(argv)
|
46
|
+
end
|
47
|
+
|
48
|
+
end # DSLApp
|
49
|
+
|
50
|
+
DSLApp.start
|
51
|
+
|
52
|
+
if DSLApp.expected == DSLApp.actual
|
53
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
54
|
+
exit 0;
|
55
|
+
else
|
56
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
57
|
+
exit 1;
|
58
|
+
end
|
59
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
debug!
|
14
|
+
log '/tmp/vedeu_views_dsl.log'
|
15
|
+
renderers [
|
16
|
+
Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/dsl_app_003.out',
|
18
|
+
write_file: true),
|
19
|
+
# Vedeu::Renderers::JSON.new(filename: '/tmp/dsl_app_003.json'),
|
20
|
+
# Vedeu::Renderers::HTML.new(filename: '/tmp/dsl_app_003.html'),
|
21
|
+
# Vedeu::Renderers::Text.new(filename: '/tmp/dsl_app_003.txt'),
|
22
|
+
]
|
23
|
+
run_once!
|
24
|
+
standalone!
|
25
|
+
end
|
26
|
+
|
27
|
+
load './support/test_interface.rb'
|
28
|
+
|
29
|
+
Vedeu.render do
|
30
|
+
view(:test_interface) do
|
31
|
+
text 'view->text 1', { foreground: '#00ff00' }
|
32
|
+
text 'view->text 2', { foreground: '#007fff' }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.actual
|
37
|
+
File.read('/tmp/dsl_app_003.out')
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.expected
|
41
|
+
File.read(File.expand_path('../expected/dsl_app_003.out', __FILE__))
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.start(argv = ARGV)
|
45
|
+
Vedeu::Launcher.execute!(argv)
|
46
|
+
end
|
47
|
+
|
48
|
+
end # DSLApp
|
49
|
+
|
50
|
+
DSLApp.start
|
51
|
+
|
52
|
+
if DSLApp.expected == DSLApp.actual
|
53
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
54
|
+
exit 0;
|
55
|
+
else
|
56
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
57
|
+
exit 1;
|
58
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
debug!
|
14
|
+
log '/tmp/vedeu_views_dsl.log'
|
15
|
+
renderers [
|
16
|
+
Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/dsl_app_004.out',
|
18
|
+
write_file: true),
|
19
|
+
# Vedeu::Renderers::JSON.new(filename: '/tmp/dsl_app_004.json'),
|
20
|
+
# Vedeu::Renderers::HTML.new(filename: '/tmp/dsl_app_004.html'),
|
21
|
+
# Vedeu::Renderers::Text.new(filename: '/tmp/dsl_app_004.txt'),
|
22
|
+
]
|
23
|
+
run_once!
|
24
|
+
standalone!
|
25
|
+
end
|
26
|
+
|
27
|
+
load './support/test_interface.rb'
|
28
|
+
|
29
|
+
Vedeu.render do
|
30
|
+
view(:test_interface) do
|
31
|
+
line do
|
32
|
+
text 'view->line 1->text', { foreground: '#5500cc' }
|
33
|
+
end
|
34
|
+
line do
|
35
|
+
text 'view->line 2->text 1', { foreground: '#ff00ff' }
|
36
|
+
text 'view->line 2->text 2', { foreground: '#ffffff' }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.actual
|
42
|
+
File.read('/tmp/dsl_app_004.out')
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.expected
|
46
|
+
File.read(File.expand_path('../expected/dsl_app_004.out', __FILE__))
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.start(argv = ARGV)
|
50
|
+
Vedeu::Launcher.execute!(argv)
|
51
|
+
end
|
52
|
+
|
53
|
+
end # DSLApp
|
54
|
+
|
55
|
+
DSLApp.start
|
56
|
+
|
57
|
+
if DSLApp.expected == DSLApp.actual
|
58
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
59
|
+
exit 0;
|
60
|
+
else
|
61
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
62
|
+
exit 1;
|
63
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
debug!
|
14
|
+
log '/tmp/vedeu_views_dsl.log'
|
15
|
+
renderers [
|
16
|
+
Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/dsl_app_005.out',
|
18
|
+
write_file: true),
|
19
|
+
# Vedeu::Renderers::JSON.new(filename: '/tmp/dsl_app_005.json'),
|
20
|
+
# Vedeu::Renderers::HTML.new(filename: '/tmp/dsl_app_005.html'),
|
21
|
+
# Vedeu::Renderers::Text.new(filename: '/tmp/dsl_app_005.txt'),
|
22
|
+
]
|
23
|
+
run_once!
|
24
|
+
standalone!
|
25
|
+
end
|
26
|
+
|
27
|
+
load './support/test_interface.rb'
|
28
|
+
|
29
|
+
Vedeu.render do
|
30
|
+
view(:test_interface) do
|
31
|
+
lines do
|
32
|
+
background '#000066'
|
33
|
+
line 'view->lines->line 1', { foreground: '#00ff00' }
|
34
|
+
line 'view->lines->line 2', { background: '#000000', foreground: '#007fff' }
|
35
|
+
line 'view->lines->line 3', { foreground: '#55aa00' }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.actual
|
41
|
+
File.read('/tmp/dsl_app_005.out')
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.expected
|
45
|
+
File.read(File.expand_path('../expected/dsl_app_005.out', __FILE__))
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.start(argv = ARGV)
|
49
|
+
Vedeu::Launcher.execute!(argv)
|
50
|
+
end
|
51
|
+
|
52
|
+
end # DSLApp
|
53
|
+
|
54
|
+
DSLApp.start
|
55
|
+
|
56
|
+
if DSLApp.expected == DSLApp.actual
|
57
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
58
|
+
exit 0;
|
59
|
+
else
|
60
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
61
|
+
exit 1;
|
62
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
class DSLApp
|
9
|
+
|
10
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
11
|
+
|
12
|
+
Vedeu.configure do
|
13
|
+
debug!
|
14
|
+
log '/tmp/vedeu_views_dsl.log'
|
15
|
+
renderers [
|
16
|
+
Vedeu::Renderers::Terminal.new(
|
17
|
+
filename: '/tmp/dsl_app_006.out',
|
18
|
+
write_file: true),
|
19
|
+
# Vedeu::Renderers::JSON.new(filename: '/tmp/dsl_app_006.json'),
|
20
|
+
# Vedeu::Renderers::HTML.new(filename: '/tmp/dsl_app_006.html'),
|
21
|
+
# Vedeu::Renderers::Text.new(filename: '/tmp/dsl_app_006.txt'),
|
22
|
+
]
|
23
|
+
run_once!
|
24
|
+
standalone!
|
25
|
+
end
|
26
|
+
|
27
|
+
load './support/test_interface.rb'
|
28
|
+
|
29
|
+
Vedeu.render do
|
30
|
+
view(:test_interface) do
|
31
|
+
stream 'view->stream', { foreground: '#ff0000' }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.actual
|
36
|
+
File.read('/tmp/dsl_app_006.out')
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.expected
|
40
|
+
File.read(File.expand_path('../expected/dsl_app_006.out', __FILE__))
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.start(argv = ARGV)
|
44
|
+
Vedeu::Launcher.execute!(argv)
|
45
|
+
end
|
46
|
+
|
47
|
+
end # DSLApp
|
48
|
+
|
49
|
+
DSLApp.start
|
50
|
+
|
51
|
+
if DSLApp.expected == DSLApp.actual
|
52
|
+
puts "#{__FILE__} \e[32mPassed.\e[39m"
|
53
|
+
exit 0;
|
54
|
+
else
|
55
|
+
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
56
|
+
exit 1;
|
57
|
+
end
|