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
@@ -0,0 +1 @@
|
|
1
|
+
[0m[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;46m[49mM[3;4Hu[3;5Hl[3;6Ht[3;7Hi[3;8Hp[3;9Hl[3;10He[3;11H [3;12H[38;5;33m[49m`[3;13Ht[3;14He[3;15Hx[3;16Ht[3;17H`[3;18H [3;19H[38;5;46m[49mk[3;20He[3;21Hy[3;22Hw[3;23Ho[3;24Hr[3;25Hd[3;26Hs[3;27H [3;28Hw[3;29Hi[3;30Ht[3;31Hh[3;32H[39m[49m(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;46m[49ma[4;4H [4;5H[38;5;33m[49m`[4;6Hs[4;7Ht[4;8Hr[4;9He[4;10Ha[4;11Hm[4;12H`[4;13H [4;14H[38;5;46m[49mb[4;15Hl[4;16Ho[4;17Hc[4;18Hk[4;19H [4;20Hv[4;21Hi[4;22He[4;23Hw[4;24H [4;25Ha[4;26Hr[4;27He[4;28H[39m[49m [4;29H [4;30H [4;31H [4;32H(0x(B[0m[5;2H[39m[49m(0x(B[5;3H[38;5;46m[49mt[5;4Hr[5;5He[5;6Ha[5;7Ht[5;8He[5;9Hd[5;10H [5;11Ha[5;12Hs[5;13H [5;14H[38;5;33m[49ms[5;15He[5;16Hp[5;17Ha[5;18Hr[5;19Ha[5;20Ht[5;21He[5;22H [5;23Hs[5;24Ht[5;25Hr[5;26He[5;27Ha[5;28Hm[5;29Hs[5;30H.[5;31H[39m[49m [5;32H(0x(B[0m[6;2H[39m[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[4;8Ha[4;9Hm[4;10Hs[4;11H`[4;12H [4;13H[38;5;46m[49mw[4;14Hi[4;15Ht[4;16Hh[4;17Hi[4;18Hn[4;19H [4;20Ha[4;21H [4;22H[38;5;33m[49m`[4;23Hl[4;24Hi[4;25Hn[4;26He[4;27H`[4;28H[38;5;46m[49m.[4;29H[39m[49m [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[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[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;154m[48;5;16mv[3;4Hi[3;5He[3;6Hw[3;7H-[3;8H>[3;9Hl[3;10Hi[3;11Hn[3;12He[3;13H [3;14H([3;15Ha[3;16Hl[3;17Hi[3;18Hg[3;19Hn[3;20H:[3;21H [3;22H:[3;23Hl[3;24He[3;25Hf[3;26Ht[3;27H)[3;28H [3;29H [3;30H [3;31H [3;32H[39m[49m(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;154m[48;5;16m [4;4Hv[4;5Hi[4;6He[4;7Hw[4;8H-[4;9H>[4;10Hl[4;11Hi[4;12Hn[4;13He[4;14H [4;15H([4;16Ha[4;17Hl[4;18Hi[4;19Hg[4;20Hn[4;21H:[4;22H [4;23H:[4;24Hc[4;25He[4;26Hn[4;27Ht[4;28Hr[4;29He[4;30H)[4;31H [4;32H[39m[49m(0x(B[0m[5;2H[39m[49m(0x(B[5;3H[38;5;154m[48;5;16m [5;4H [5;5H [5;6Hv[5;7Hi[5;8He[5;9Hw[5;10H-[5;11H>[5;12Hl[5;13Hi[5;14Hn[5;15He[5;16H [5;17H([5;18Ha[5;19Hl[5;20Hi[5;21Hg[5;22Hn[5;23H:[5;24H [5;25H:[5;26Hr[5;27Hi[5;28Hg[5;29Hh[5;30Ht[5;31H)[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[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[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;3Hv[3;4Hi[3;5He[3;6Hw[3;7H-[3;8H>[3;9Hl[3;10He[3;11Hf[3;12Ht[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;11Hv[4;12Hi[4;13He[4;14Hw[4;15H-[4;16H>[4;17Hc[4;18He[4;19Hn[4;20Ht[4;21Hr[4;22He[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;21Hv[5;22Hi[5;23He[5;24Hw[5;25H-[5;26H>[5;27Hr[5;28Hi[5;29Hg[5;30Hh[5;31Ht[5;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l[4;10Hi[4;11Hn[4;12He[4;13Hs[4;14H-[4;15H>[4;16Hl[4;17He[4;18Hf[4;19Ht[4;20H [4;21H2[4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [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[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[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;46m[49m [3;4H [3;5H [3;6H [3;7H [3;8H [3;9H [3;10H [3;11H [3;12Hv[3;13Hi[3;14He[3;15Hw[3;16H-[3;17H>[3;18Hl[3;19Hi[3;20Hn[3;21He[3;22Hs[3;23H-[3;24H>[3;25Hr[3;26Hi[3;27Hg[3;28Hh[3;29Ht[3;30H [3;31H1[3;32H[39m[49m(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;16m[48;5;46m [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12Hv[4;13Hi[4;14He[4;15Hw[4;16H-[4;17H>[4;18Hl[4;19Hi[4;20Hn[4;21He[4;22Hs[4;23H-[4;24H>[4;25Hr[4;26Hi[4;27Hg[4;28Hh[4;29Ht[4;30H [4;31H2[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[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[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;27m[49m [3;4H [3;5H [3;6H [3;7Hv[3;8Hi[3;9He[3;10Hw[3;11H-[3;12H>[3;13Hl[3;14Hi[3;15Hn[3;16He[3;17Hs[3;18H-[3;19H>[3;20Hc[3;21He[3;22Hn[3;23Ht[3;24Hr[3;25He[3;26H [3;27H1[3;28H [3;29H [3;30H [3;31H [3;32H[39m[49m(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;16m[48;5;27m [4;4H [4;5H [4;6H [4;7Hv[4;8Hi[4;9He[4;10Hw[4;11H-[4;12H>[4;13Hl[4;14Hi[4;15Hn[4;16He[4;17Hs[4;18H-[4;19H>[4;20Hc[4;21He[4;22Hn[4;23Ht[4;24Hr[4;25He[4;26H [4;27H2[4;28H [4;29H [4;30H [4;31H [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[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[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;231m[48;5;124mv[3;4H-[3;5H>[3;6Hl[3;7H-[3;8H>[3;9Hl[3;10He[3;11Hf[3;12Ht[3;13H [3;14H [3;15H [3;16H [3;17H[38;5;231m[48;5;21m [3;18H [3;19H [3;20H [3;21Hv[3;22H-[3;23H>[3;24Hl[3;25H-[3;26H>[3;27Hr[3;28Hi[3;29Hg[3;30Hh[3;31Ht[3;32H[39m[49m(0x(B[0m[4;2H[39m[49m(0x(B[4;3H[38;5;231m[48;5;28m [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12Hv[4;13H-[4;14H>[4;15Hl[4;16H-[4;17H>[4;18Hc[4;19He[4;20Hn[4;21Ht[4;22Hr[4;23He[4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [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[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m[0m
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Notes:
|
4
|
+
# At the moment, the terminal must be set to width 135 x height 34 for
|
5
|
+
# these tests to pass.
|
6
|
+
|
7
|
+
# die on error
|
8
|
+
set -e
|
9
|
+
|
10
|
+
# change to directory that contains this script
|
11
|
+
cd "$(dirname "$0")"
|
12
|
+
|
13
|
+
# Issue regression tests
|
14
|
+
./342_streams.rb
|
15
|
+
|
16
|
+
# Integration tests
|
17
|
+
./dsl_app_001.rb
|
18
|
+
./dsl_app_002.rb
|
19
|
+
./dsl_app_003.rb
|
20
|
+
./dsl_app_004.rb
|
21
|
+
./dsl_app_005.rb
|
22
|
+
./dsl_app_006.rb
|
23
|
+
./dsl_app_007.rb
|
24
|
+
./dsl_app_008.rb
|
25
|
+
./dsl_app_009.rb
|
26
|
+
./dsl_app_010.rb
|
27
|
+
./dsl_app_011.rb
|
28
|
+
./dsl_app_012.rb
|
29
|
+
./dsl_app_013.rb
|
30
|
+
./dsl_app_014.rb
|
31
|
+
./dsl_app_015.rb
|
32
|
+
./dsl_app_016.rb
|
data/lib/vedeu/cells/empty.rb
CHANGED
@@ -56,6 +56,20 @@ module Vedeu
|
|
56
56
|
' '
|
57
57
|
end
|
58
58
|
|
59
|
+
# @return [String]
|
60
|
+
def to_ast
|
61
|
+
[
|
62
|
+
'[',
|
63
|
+
[
|
64
|
+
position.to_ast,
|
65
|
+
colour.to_ast,
|
66
|
+
style.to_ast,
|
67
|
+
":#{type}",
|
68
|
+
].reject(&:empty?).join(' '),
|
69
|
+
']',
|
70
|
+
].join
|
71
|
+
end
|
72
|
+
|
59
73
|
# @return [Hash<Symbol => Hash<Symbol => String>, String>]
|
60
74
|
def to_h
|
61
75
|
{
|
@@ -17,6 +17,19 @@ module Vedeu
|
|
17
17
|
present?(to_s)
|
18
18
|
end
|
19
19
|
|
20
|
+
# @return [String]
|
21
|
+
def to_ast
|
22
|
+
return '' unless background?
|
23
|
+
|
24
|
+
if rgb?
|
25
|
+
":bg_#{colour.to_s.slice(1..-1)}"
|
26
|
+
|
27
|
+
else
|
28
|
+
':bg'
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
20
33
|
# @return [Hash<Symbol => String>]
|
21
34
|
def to_h
|
22
35
|
{
|
data/lib/vedeu/colours/colour.rb
CHANGED
@@ -74,7 +74,7 @@ module Vedeu
|
|
74
74
|
|
75
75
|
# @return [Vedeu::Colours::Background]
|
76
76
|
def background
|
77
|
-
|
77
|
+
Vedeu::Colours::Background.coerce(@background)
|
78
78
|
end
|
79
79
|
|
80
80
|
# Converts the value into a Vedeu::Colours::Background.
|
@@ -82,7 +82,7 @@ module Vedeu
|
|
82
82
|
# @param value [String]
|
83
83
|
# @return [Vedeu::Colours::Foreground]
|
84
84
|
def background=(value)
|
85
|
-
@
|
85
|
+
@background = Vedeu::Colours::Background.coerce(value)
|
86
86
|
end
|
87
87
|
|
88
88
|
# An object is equal when its values are the same.
|
@@ -97,7 +97,7 @@ module Vedeu
|
|
97
97
|
|
98
98
|
# @return [Vedeu::Colours::Foreground]
|
99
99
|
def foreground
|
100
|
-
|
100
|
+
Vedeu::Colours::Foreground.coerce(@foreground)
|
101
101
|
end
|
102
102
|
|
103
103
|
# Converts the value into a Vedeu::Colours::Foreground.
|
@@ -105,7 +105,14 @@ module Vedeu
|
|
105
105
|
# @param value [String]
|
106
106
|
# @return [Vedeu::Colours::Foreground]
|
107
107
|
def foreground=(value)
|
108
|
-
@
|
108
|
+
@foreground = Vedeu::Colours::Foreground.coerce(value)
|
109
|
+
end
|
110
|
+
|
111
|
+
# @return [String]
|
112
|
+
def to_ast
|
113
|
+
[foreground.to_ast, background.to_ast].reject do |value|
|
114
|
+
absent?(value)
|
115
|
+
end.join(' ')
|
109
116
|
end
|
110
117
|
|
111
118
|
# @return [Hash<Symbol => Hash<Symbol => String>>]
|
@@ -17,6 +17,19 @@ module Vedeu
|
|
17
17
|
present?(to_s)
|
18
18
|
end
|
19
19
|
|
20
|
+
# @return [String]
|
21
|
+
def to_ast
|
22
|
+
return '' unless foreground?
|
23
|
+
|
24
|
+
if rgb?
|
25
|
+
":fg_#{colour.to_s.slice(1..-1)}"
|
26
|
+
|
27
|
+
else
|
28
|
+
':fg'
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
20
33
|
# @return [Hash<Symbol => String>]
|
21
34
|
def to_h
|
22
35
|
{
|
data/lib/vedeu/common.rb
CHANGED
@@ -61,6 +61,20 @@ module Vedeu
|
|
61
61
|
value.is_a?(Hash)
|
62
62
|
end
|
63
63
|
|
64
|
+
# Returns a boolean indicating the model is a
|
65
|
+
# {Vedeu::Views::Line}.
|
66
|
+
#
|
67
|
+
# @return [Boolean]
|
68
|
+
def line_model?
|
69
|
+
if defined?(model)
|
70
|
+
model.is_a?(Vedeu::Views::Line)
|
71
|
+
|
72
|
+
else
|
73
|
+
false
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
64
78
|
# Returns a boolean indicating whether the value is a Fixnum.
|
65
79
|
#
|
66
80
|
# @param value [Fixnum|void]
|
@@ -108,6 +122,20 @@ module Vedeu
|
|
108
122
|
end.join('/')
|
109
123
|
end
|
110
124
|
|
125
|
+
# Returns a boolean indicating the model is a
|
126
|
+
# {Vedeu::Views::Stream}.
|
127
|
+
#
|
128
|
+
# @return [Boolean]
|
129
|
+
def stream_model?
|
130
|
+
if defined?(model)
|
131
|
+
model.is_a?(Vedeu::Views::Stream)
|
132
|
+
|
133
|
+
else
|
134
|
+
false
|
135
|
+
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
111
139
|
# Returns a boolean indicating whether the value is a Fixnum.
|
112
140
|
#
|
113
141
|
# @param value [String|void]
|
@@ -125,6 +153,20 @@ module Vedeu
|
|
125
153
|
!falsy?(value)
|
126
154
|
end
|
127
155
|
|
156
|
+
# Returns a boolean indicating the model is a
|
157
|
+
# {Vedeu::Views::View}.
|
158
|
+
#
|
159
|
+
# @return [Boolean]
|
160
|
+
def view_model?
|
161
|
+
if defined?(model)
|
162
|
+
model.is_a?(Vedeu::Views::View)
|
163
|
+
|
164
|
+
else
|
165
|
+
false
|
166
|
+
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
128
170
|
end # Common
|
129
171
|
|
130
172
|
end # Vedeu
|
data/lib/vedeu/dsl/attributes.rb
CHANGED
data/lib/vedeu/dsl/elements.rb
CHANGED
@@ -126,21 +126,64 @@ module Vedeu
|
|
126
126
|
else
|
127
127
|
s = Vedeu::Views::Stream.new(attrs)
|
128
128
|
ss = Vedeu::Views::Streams.coerce([s])
|
129
|
-
|
130
129
|
Vedeu::Views::Line.new(attrs.merge!(value: ss))
|
131
130
|
|
132
131
|
end
|
133
132
|
|
134
|
-
if view_model?
|
133
|
+
if view_model?
|
135
134
|
model.add(l)
|
136
135
|
|
136
|
+
elsif line_model?
|
137
|
+
model.add(l.value)
|
138
|
+
|
137
139
|
else
|
138
140
|
fail Vedeu::Error::Fatal,
|
139
141
|
"Cannot add line to '#{model.class.name}' model."
|
140
142
|
|
141
143
|
end
|
142
144
|
end
|
143
|
-
|
145
|
+
|
146
|
+
# @param value [String] The value for the stream. Ignored when a
|
147
|
+
# block is given.
|
148
|
+
# @param opts [Hash]
|
149
|
+
# @option opts ... [void]
|
150
|
+
# @param block [Proc]
|
151
|
+
# @raise [Vedeu::Error::Fatal]
|
152
|
+
# @return [void]
|
153
|
+
def stream(value = '', opts = {}, &block)
|
154
|
+
requires_model!
|
155
|
+
|
156
|
+
attrs = Vedeu::DSL::Attributes.build(self, model, value, opts, &block)
|
157
|
+
|
158
|
+
l = if block_given?
|
159
|
+
if view_model?
|
160
|
+
Vedeu::Views::Line.build(attrs, &block)
|
161
|
+
|
162
|
+
else
|
163
|
+
Vedeu::Views::Stream.build(attrs, &block)
|
164
|
+
|
165
|
+
end
|
166
|
+
|
167
|
+
else
|
168
|
+
s = Vedeu::Views::Stream.new(attrs)
|
169
|
+
ss = Vedeu::Views::Streams.coerce([s])
|
170
|
+
|
171
|
+
Vedeu::Views::Line.new(attrs.merge!(value: ss))
|
172
|
+
|
173
|
+
end
|
174
|
+
|
175
|
+
if view_model?
|
176
|
+
model.add(l)
|
177
|
+
|
178
|
+
elsif line_model? || stream_model?
|
179
|
+
model.add([l])
|
180
|
+
|
181
|
+
else
|
182
|
+
fail Vedeu::Error::Fatal,
|
183
|
+
"Cannot add stream to '#{model.class.name}' model."
|
184
|
+
|
185
|
+
end
|
186
|
+
end
|
144
187
|
|
145
188
|
# @todo This documentation needs editing. (GL: 2015-12-17)
|
146
189
|
#
|
@@ -204,14 +247,21 @@ module Vedeu
|
|
204
247
|
def text(value = '', opts = {})
|
205
248
|
requires_model!
|
206
249
|
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
250
|
+
attrs = Vedeu::DSL::Attributes.build(self, model, value, opts)
|
251
|
+
stream = Vedeu::Views::Stream.new(attrs)
|
252
|
+
|
253
|
+
if view_model?
|
254
|
+
ss = Vedeu::Views::Streams.coerce([stream])
|
211
255
|
l = Vedeu::Views::Line.new(attrs.merge!(value: ss))
|
212
256
|
|
213
257
|
model.add(l)
|
214
258
|
|
259
|
+
elsif line_model?
|
260
|
+
model.add(stream)
|
261
|
+
|
262
|
+
elsif stream_model?
|
263
|
+
model.add(stream.value)
|
264
|
+
|
215
265
|
else
|
216
266
|
fail Vedeu::Error::Fatal,
|
217
267
|
"Cannot add text to '#{model.class.name}' model."
|
@@ -246,14 +296,6 @@ module Vedeu
|
|
246
296
|
|
247
297
|
private
|
248
298
|
|
249
|
-
# Returns a boolean indicating the model is a
|
250
|
-
# {Vedeu::Views::Line}.
|
251
|
-
#
|
252
|
-
# @return [Boolean]
|
253
|
-
def line_model?
|
254
|
-
model.is_a?(Vedeu::Views::Line)
|
255
|
-
end
|
256
|
-
|
257
299
|
# @param block [Proc]
|
258
300
|
# @macro raise_requires_block
|
259
301
|
# @return [NilClass]
|
@@ -269,14 +311,6 @@ module Vedeu
|
|
269
311
|
'No model, cannot continue.' unless present?(model)
|
270
312
|
end
|
271
313
|
|
272
|
-
# Returns a boolean indicating the model is a
|
273
|
-
# {Vedeu::Views::View}.
|
274
|
-
#
|
275
|
-
# @return [Boolean]
|
276
|
-
def view_model?
|
277
|
-
model.is_a?(Vedeu::Views::View)
|
278
|
-
end
|
279
|
-
|
280
314
|
end # Elements
|
281
315
|
|
282
316
|
end # DSL
|
@@ -91,7 +91,7 @@ module Vedeu
|
|
91
91
|
@_geometry ||= Vedeu.geometries.by_name(options[:name])
|
92
92
|
end
|
93
93
|
|
94
|
-
# The value padded to width, left justified.
|
94
|
+
# The value padded to width, left justified. See {#width}.
|
95
95
|
#
|
96
96
|
# @return [String]
|
97
97
|
def left
|
@@ -105,6 +105,15 @@ module Vedeu
|
|
105
105
|
value.rjust(width, options[:pad])
|
106
106
|
end
|
107
107
|
|
108
|
+
# Return the width given in the options. If no :width option was
|
109
|
+
# set, but a :name option was set, then we can use the width of
|
110
|
+
# the interface to determine the correct width to use. There is
|
111
|
+
# a caveat in this; if the :align option was set to :left, but
|
112
|
+
# no :width provided, then we don't want to use the interface's
|
113
|
+
# width. The reason being, is that there may be another stream
|
114
|
+
# in this line which will not appear by default as it will be
|
115
|
+
# push right out of the visible area.
|
116
|
+
#
|
108
117
|
# Return the width of the interface when a name is given,
|
109
118
|
# otherwise use the given width.
|
110
119
|
#
|
@@ -114,7 +123,13 @@ module Vedeu
|
|
114
123
|
options[:width]
|
115
124
|
|
116
125
|
elsif present?(options[:name])
|
117
|
-
|
126
|
+
if left_aligned?
|
127
|
+
value.size
|
128
|
+
|
129
|
+
else
|
130
|
+
geometry.bordered_width
|
131
|
+
|
132
|
+
end
|
118
133
|
|
119
134
|
else
|
120
135
|
value.size
|
@@ -14,7 +14,7 @@ module Vedeu
|
|
14
14
|
#
|
15
15
|
# @return [Vedeu::Geometries::Position]
|
16
16
|
def position
|
17
|
-
|
17
|
+
Vedeu::Geometries::Position.coerce(@position)
|
18
18
|
end
|
19
19
|
|
20
20
|
# Sets the position.
|
@@ -23,7 +23,7 @@ module Vedeu
|
|
23
23
|
# Vedeu::Geometries::Position]
|
24
24
|
# @return [Vedeu::Geometries::Position]
|
25
25
|
def position=(value)
|
26
|
-
@
|
26
|
+
@position = Vedeu::Geometries::Position.coerce(value)
|
27
27
|
end
|
28
28
|
|
29
29
|
# Returns a boolean indicating the position attribute of the
|