vedeu 0.4.57 → 0.4.58

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/bin/vedeu_drb_server +1 -0
  3. data/examples/drb_app.rb +1 -0
  4. data/lib/vedeu/all.rb +95 -65
  5. data/lib/vedeu/api.rb +0 -45
  6. data/lib/vedeu/application.rb +1 -0
  7. data/lib/vedeu/{bindings/all.rb → bindings.rb} +0 -6
  8. data/lib/vedeu/bindings/system.rb +1 -1
  9. data/lib/vedeu/cli/generator/templates/application/config/configuration.erb +1 -0
  10. data/lib/vedeu/configuration/api.rb +47 -3
  11. data/lib/vedeu/configuration/configuration.rb +6 -7
  12. data/lib/vedeu/distributed/templates/default_configuration.vedeu +1 -0
  13. data/lib/vedeu/{dsl/all.rb → dsl.rb} +0 -16
  14. data/lib/vedeu/dsl/composition.rb +4 -4
  15. data/lib/vedeu/events/event_collection.rb +9 -0
  16. data/lib/vedeu/input/keys.rb +9 -0
  17. data/lib/vedeu/main_loop.rb +2 -2
  18. data/lib/vedeu/models/chars.rb +9 -0
  19. data/lib/vedeu/models/interface_collection.rb +9 -0
  20. data/lib/vedeu/models/lines.rb +9 -0
  21. data/lib/vedeu/models/streams.rb +9 -0
  22. data/lib/vedeu/{null/all.rb → null.rb} +2 -8
  23. data/lib/vedeu/output/{renderers/all.rb → renderers.rb} +0 -0
  24. data/lib/vedeu/{repositories/all.rb → repositories.rb} +9 -0
  25. data/lib/vedeu/repositories/collection.rb +0 -36
  26. data/lib/vedeu/terminal.rb +1 -54
  27. data/lib/vedeu/terminal_mode.rb +57 -0
  28. data/lib/vedeu/version.rb +1 -1
  29. data/test/lib/vedeu/configuration/api_test.rb +24 -0
  30. data/test/lib/vedeu/events/event_collection_test.rb +18 -0
  31. data/test/lib/vedeu/input/keys_test.rb +18 -0
  32. data/test/lib/vedeu/models/chars_test.rb +18 -0
  33. data/test/lib/vedeu/models/interface_collection_test.rb +18 -0
  34. data/test/lib/vedeu/models/lines_test.rb +18 -0
  35. data/test/lib/vedeu/models/streams_test.rb +18 -0
  36. data/test/lib/vedeu/repositories/collection_test.rb +0 -78
  37. data/test/lib/vedeu/terminal_mode_test.rb +72 -0
  38. data/test/lib/vedeu/terminal_test.rb +6 -67
  39. data/test/support/stats.sh +3 -0
  40. metadata +27 -9
  41. data/lib/vedeu/input/all.rb +0 -18
  42. data/test/support/colour_test.sh +0 -100
@@ -1,18 +0,0 @@
1
- require 'vedeu/input/mapper'
2
- require 'vedeu/input/key'
3
- require 'vedeu/input/input'
4
- require 'vedeu/input/keymaps'
5
- require 'vedeu/input/keymap'
6
-
7
- module Vedeu
8
-
9
- # Define a keymap called '_global_' which will respond no matter which
10
- # interface is in focus.
11
- #
12
- # @note
13
- # Initially, no keys are registered with the global keymap.
14
- Vedeu::DSL::Keymap.keymap('_global_') do
15
- # ...
16
- end
17
-
18
- end # Vedeu
@@ -1,100 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # This file echoes four gradients with 24-bit color codes
4
- # to the terminal to demonstrate their functionality.
5
- # The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
6
- # The background escape sequence is ^[48;2;<r>;<g>;<b>m
7
- # <r> <g> <b> range from 0 to 255 inclusive.
8
- # The escape sequence ^[0m returns output to default
9
-
10
- SEPARATOR=':'
11
-
12
- setBackgroundColor()
13
- {
14
- echo -en "\x1b[48${SEPARATOR}2${SEPARATOR}$1${SEPARATOR}$2${SEPARATOR}$3""m"
15
- }
16
-
17
- resetOutput()
18
- {
19
- echo -en "\x1b[0m\n"
20
- }
21
-
22
- # Gives a color $1/255 % along HSV
23
- # Who knows what happens when $1 is outside 0-255
24
- # Echoes "$red $green $blue" where
25
- # $red $green and $blue are integers
26
- # ranging between 0 and 255 inclusive
27
- rainbowColor()
28
- {
29
- let h=$1/43
30
- let f=$1-43*$h
31
- let t=$f*255/43
32
- let q=255-t
33
-
34
- if [ $h -eq 0 ]
35
- then
36
- echo "255 $t 0"
37
- elif [ $h -eq 1 ]
38
- then
39
- echo "$q 255 0"
40
- elif [ $h -eq 2 ]
41
- then
42
- echo "0 255 $t"
43
- elif [ $h -eq 3 ]
44
- then
45
- echo "0 $q 255"
46
- elif [ $h -eq 4 ]
47
- then
48
- echo "$t 0 255"
49
- elif [ $h -eq 5 ]
50
- then
51
- echo "255 0 $q"
52
- else
53
- # execution should never reach here
54
- echo "0 0 0"
55
- fi
56
- }
57
-
58
- for i in `seq 0 127`; do
59
- setBackgroundColor $i 0 0
60
- echo -en " "
61
- done
62
- resetOutput
63
- for i in `seq 255 128`; do
64
- setBackgroundColor $i 0 0
65
- echo -en " "
66
- done
67
- resetOutput
68
-
69
- for i in `seq 0 127`; do
70
- setBackgroundColor 0 $i 0
71
- echo -n " "
72
- done
73
- resetOutput
74
- for i in `seq 255 128`; do
75
- setBackgroundColor 0 $i 0
76
- echo -n " "
77
- done
78
- resetOutput
79
-
80
- for i in `seq 0 127`; do
81
- setBackgroundColor 0 0 $i
82
- echo -n " "
83
- done
84
- resetOutput
85
- for i in `seq 255 128`; do
86
- setBackgroundColor 0 0 $i
87
- echo -n " "
88
- done
89
- resetOutput
90
-
91
- for i in `seq 0 127`; do
92
- setBackgroundColor `rainbowColor $i`
93
- echo -n " "
94
- done
95
- resetOutput
96
- for i in `seq 255 128`; do
97
- setBackgroundColor `rainbowColor $i`
98
- echo -n " "
99
- done
100
- resetOutput