whirled_peas 0.5.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +31 -0
- data/README.md +748 -137
- data/Rakefile +4 -32
- data/bin/easing +33 -0
- data/bin/reset_cursor +11 -0
- data/bin/screen_test +68 -0
- data/examples/graph.rb +54 -0
- data/examples/intro.rb +52 -0
- data/examples/scrolling.rb +54 -0
- data/lib/whirled_peas.rb +4 -12
- data/lib/whirled_peas/animator.rb +5 -0
- data/lib/whirled_peas/animator/debug_consumer.rb +17 -0
- data/lib/whirled_peas/animator/easing.rb +72 -0
- data/lib/whirled_peas/animator/frame.rb +5 -0
- data/lib/whirled_peas/animator/frameset.rb +33 -0
- data/lib/whirled_peas/animator/producer.rb +35 -0
- data/lib/whirled_peas/animator/renderer_consumer.rb +31 -0
- data/lib/whirled_peas/command.rb +5 -0
- data/lib/whirled_peas/command/base.rb +86 -0
- data/lib/whirled_peas/command/config_command.rb +44 -0
- data/lib/whirled_peas/command/debug.rb +21 -0
- data/lib/whirled_peas/command/fonts.rb +22 -0
- data/lib/whirled_peas/command/frame_command.rb +34 -0
- data/lib/whirled_peas/command/frames.rb +24 -0
- data/lib/whirled_peas/command/help.rb +38 -0
- data/lib/whirled_peas/command/play.rb +108 -0
- data/lib/whirled_peas/command/record.rb +57 -0
- data/lib/whirled_peas/command/still.rb +29 -0
- data/lib/whirled_peas/command_line.rb +22 -220
- data/lib/whirled_peas/config.rb +56 -6
- data/lib/whirled_peas/device.rb +5 -0
- data/lib/whirled_peas/device/null_device.rb +8 -0
- data/lib/whirled_peas/device/output_file.rb +19 -0
- data/lib/whirled_peas/device/screen.rb +26 -0
- data/lib/whirled_peas/graphics.rb +14 -0
- data/lib/whirled_peas/graphics/box_painter.rb +48 -47
- data/lib/whirled_peas/graphics/canvas.rb +22 -11
- data/lib/whirled_peas/graphics/composer.rb +98 -0
- data/lib/whirled_peas/graphics/container_coords.rb +24 -13
- data/lib/whirled_peas/graphics/container_dimensions.rb +37 -9
- data/lib/whirled_peas/graphics/container_painter.rb +283 -36
- data/lib/whirled_peas/graphics/content_dimensions.rb +19 -0
- data/lib/whirled_peas/graphics/content_painter.rb +20 -0
- data/lib/whirled_peas/graphics/debugger.rb +10 -1
- data/lib/whirled_peas/graphics/graph_dimensions.rb +12 -0
- data/lib/whirled_peas/graphics/graph_painter.rb +95 -0
- data/lib/whirled_peas/graphics/grid_painter.rb +25 -15
- data/lib/whirled_peas/graphics/mock_screen.rb +1 -1
- data/lib/whirled_peas/graphics/painter.rb +15 -6
- data/lib/whirled_peas/graphics/renderer.rb +13 -30
- data/lib/whirled_peas/graphics/text_painter.rb +11 -13
- data/lib/whirled_peas/settings/alignment.rb +24 -0
- data/lib/whirled_peas/settings/bg_color.rb +2 -0
- data/lib/whirled_peas/settings/border.rb +16 -16
- data/lib/whirled_peas/settings/color.rb +13 -14
- data/lib/whirled_peas/settings/container_settings.rb +133 -40
- data/lib/whirled_peas/settings/debugger.rb +9 -0
- data/lib/whirled_peas/settings/display_flow.rb +13 -11
- data/lib/whirled_peas/settings/element_settings.rb +8 -3
- data/lib/whirled_peas/settings/graph_settings.rb +21 -0
- data/lib/whirled_peas/settings/grid_settings.rb +15 -0
- data/lib/whirled_peas/settings/scrollbar.rb +15 -0
- data/lib/whirled_peas/settings/sizing.rb +19 -0
- data/lib/whirled_peas/settings/spacing.rb +34 -0
- data/lib/whirled_peas/settings/text_color.rb +2 -0
- data/lib/whirled_peas/settings/vert_alignment.rb +24 -0
- data/lib/whirled_peas/utils/ansi.rb +13 -0
- data/lib/whirled_peas/utils/file_handler.rb +57 -0
- data/lib/whirled_peas/utils/title_font.rb +1 -1
- data/lib/whirled_peas/version.rb +1 -1
- data/screen_test/{rendered/elements → elements}/box.frame +1 -1
- data/screen_test/{rendered/elements → elements}/box.rb +0 -0
- data/screen_test/elements/graph.frame +1 -0
- data/screen_test/elements/graph.rb +12 -0
- data/screen_test/elements/grid.frame +1 -0
- data/screen_test/{rendered/elements → elements}/grid.rb +0 -0
- data/screen_test/elements/screen_overflow_x.frame +1 -0
- data/screen_test/{rendered/elements/screen_overflow.rb → elements/screen_overflow_x.rb} +0 -0
- data/screen_test/elements/screen_overflow_y.frame +1 -0
- data/screen_test/elements/screen_overflow_y.rb +9 -0
- data/screen_test/elements/text.frame +1 -0
- data/screen_test/{rendered/elements → elements}/text.rb +0 -0
- data/screen_test/elements/text_multiline.frame +1 -0
- data/screen_test/{rendered/elements → elements}/text_multiline.rb +0 -0
- data/screen_test/settings/align/box_around.frame +1 -0
- data/screen_test/settings/align/box_around.rb +16 -0
- data/screen_test/settings/align/box_between.frame +1 -0
- data/screen_test/settings/align/box_between.rb +16 -0
- data/screen_test/settings/align/box_center.frame +1 -0
- data/screen_test/{rendered/settings/align/box.rb → settings/align/box_center.rb} +5 -4
- data/screen_test/settings/align/box_default.frame +1 -0
- data/screen_test/{rendered/settings/align/grid.rb → settings/align/box_default.rb} +6 -6
- data/screen_test/settings/align/box_evenly.frame +1 -0
- data/screen_test/settings/align/box_evenly.rb +16 -0
- data/screen_test/settings/align/box_left.frame +1 -0
- data/screen_test/settings/align/box_left.rb +21 -0
- data/screen_test/settings/align/box_right.frame +1 -0
- data/screen_test/settings/align/box_right.rb +21 -0
- data/screen_test/settings/align/children_center.frame +1 -0
- data/screen_test/settings/align/children_center.rb +15 -0
- data/screen_test/settings/align/children_left.frame +1 -0
- data/screen_test/settings/align/children_left.rb +15 -0
- data/screen_test/settings/align/children_right.frame +1 -0
- data/screen_test/settings/align/children_right.rb +15 -0
- data/screen_test/settings/align/grid_center.frame +1 -0
- data/screen_test/settings/align/grid_center.rb +18 -0
- data/screen_test/settings/align/grid_default.frame +1 -0
- data/screen_test/settings/align/grid_default.rb +17 -0
- data/screen_test/settings/align/grid_left.frame +1 -0
- data/screen_test/settings/align/grid_left.rb +18 -0
- data/screen_test/settings/align/grid_right.frame +1 -0
- data/screen_test/settings/align/grid_right.rb +18 -0
- data/screen_test/settings/ansi/bold.frame +1 -0
- data/screen_test/{rendered/settings/width/overflow_box_t2b.rb → settings/ansi/bold.rb} +4 -5
- data/screen_test/{rendered/settings → settings}/ansi/color.frame +1 -1
- data/screen_test/{rendered/settings → settings}/ansi/color.rb +0 -0
- data/screen_test/settings/ansi/underline.frame +1 -0
- data/screen_test/{rendered/settings → settings}/ansi/underline.rb +4 -5
- data/screen_test/{rendered/settings → settings}/border.frame +1 -1
- data/screen_test/{rendered/settings → settings}/border.rb +1 -1
- data/screen_test/settings/flow/box_b2t.frame +1 -0
- data/screen_test/settings/flow/box_b2t.rb +26 -0
- data/screen_test/settings/flow/box_l2r.frame +1 -0
- data/screen_test/settings/flow/box_l2r.rb +26 -0
- data/screen_test/settings/flow/box_r2l.frame +1 -0
- data/screen_test/settings/flow/box_r2l.rb +26 -0
- data/screen_test/settings/flow/box_t2b.frame +1 -0
- data/screen_test/settings/flow/box_t2b.rb +26 -0
- data/screen_test/settings/flow/grid_b2t.frame +1 -0
- data/screen_test/settings/flow/grid_b2t.rb +14 -0
- data/screen_test/settings/flow/grid_l2r.frame +1 -0
- data/screen_test/{rendered/settings/margin.rb → settings/flow/grid_l2r.rb} +4 -4
- data/screen_test/settings/flow/grid_r2l.frame +1 -0
- data/screen_test/settings/flow/grid_r2l.rb +14 -0
- data/screen_test/settings/flow/grid_t2b.frame +1 -0
- data/screen_test/settings/flow/grid_t2b.rb +14 -0
- data/screen_test/settings/height/box.frame +1 -0
- data/screen_test/{rendered/settings → settings}/height/box.rb +0 -0
- data/screen_test/settings/height/box_border_sizing.frame +1 -0
- data/screen_test/settings/height/box_border_sizing.rb +15 -0
- data/screen_test/settings/height/grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/height/grid.rb +0 -0
- data/screen_test/settings/height/overflow_box.frame +1 -0
- data/screen_test/settings/height/overflow_box.rb +13 -0
- data/screen_test/settings/height/overflow_box_l2r.frame +1 -0
- data/screen_test/settings/height/overflow_box_l2r.rb +17 -0
- data/screen_test/settings/height/overflow_box_t2b.frame +1 -0
- data/screen_test/settings/height/overflow_box_t2b.rb +16 -0
- data/screen_test/settings/height/overflow_grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/height/overflow_grid.rb +0 -0
- data/screen_test/settings/margin.frame +1 -0
- data/screen_test/settings/margin.rb +16 -0
- data/screen_test/settings/padding.frame +1 -0
- data/screen_test/settings/padding.rb +13 -0
- data/screen_test/settings/position/box_left.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_left.rb +2 -2
- data/screen_test/settings/position/box_left_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_left_negative.rb +2 -2
- data/screen_test/settings/position/box_top.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_top.rb +1 -1
- data/screen_test/settings/position/box_top_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_top_negative.rb +2 -2
- data/screen_test/settings/position/grid_left.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_left.rb +1 -1
- data/screen_test/settings/position/grid_left_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_left_negative.rb +1 -1
- data/screen_test/settings/position/grid_top.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_top.rb +1 -1
- data/screen_test/settings/position/grid_top_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_top_negative.rb +1 -1
- data/screen_test/settings/scroll/horiz_box.frame +1 -0
- data/screen_test/settings/scroll/horiz_box.rb +17 -0
- data/screen_test/settings/scroll/horiz_box_align_center.rb +18 -0
- data/screen_test/settings/scroll/horiz_box_align_right.rb +18 -0
- data/screen_test/settings/scroll/vert_box.frame +1 -0
- data/screen_test/settings/scroll/vert_box.rb +20 -0
- data/screen_test/settings/title_font.frame +1 -0
- data/screen_test/{rendered/settings → settings}/title_font.rb +1 -1
- data/screen_test/settings/valign/box_around.frame +1 -0
- data/screen_test/settings/valign/box_around.rb +17 -0
- data/screen_test/settings/valign/box_between.frame +1 -0
- data/screen_test/settings/valign/box_between.rb +17 -0
- data/screen_test/settings/valign/box_bottom.frame +1 -0
- data/screen_test/settings/valign/box_bottom.rb +17 -0
- data/screen_test/settings/valign/box_default.frame +1 -0
- data/screen_test/settings/valign/box_default.rb +16 -0
- data/screen_test/settings/valign/box_evenly.frame +1 -0
- data/screen_test/settings/valign/box_evenly.rb +17 -0
- data/screen_test/settings/valign/box_middle.frame +1 -0
- data/screen_test/settings/valign/box_middle.rb +17 -0
- data/screen_test/settings/valign/box_top.frame +1 -0
- data/screen_test/settings/valign/box_top.rb +17 -0
- data/screen_test/settings/valign/grid_bottom.frame +1 -0
- data/screen_test/settings/valign/grid_bottom.rb +15 -0
- data/screen_test/settings/valign/grid_default.frame +1 -0
- data/screen_test/settings/valign/grid_default.rb +14 -0
- data/screen_test/settings/valign/grid_middle.frame +1 -0
- data/screen_test/settings/valign/grid_middle.rb +15 -0
- data/screen_test/settings/valign/grid_top.frame +1 -0
- data/screen_test/settings/valign/grid_top.rb +15 -0
- data/screen_test/settings/width/box_border_sizing.frame +1 -0
- data/screen_test/settings/width/box_border_sizing.rb +15 -0
- data/screen_test/settings/width/box_content.frame +1 -0
- data/screen_test/settings/width/box_content.rb +15 -0
- data/screen_test/settings/width/box_default.frame +1 -0
- data/screen_test/{rendered/settings/width/box.rb → settings/width/box_default.rb} +3 -2
- data/screen_test/settings/width/grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/width/grid.rb +2 -2
- data/screen_test/settings/width/overflow_align_center.frame +1 -0
- data/screen_test/settings/width/overflow_align_center.rb +14 -0
- data/screen_test/settings/width/overflow_align_right.frame +1 -0
- data/screen_test/settings/width/overflow_align_right.rb +14 -0
- data/screen_test/settings/width/overflow_box.frame +1 -0
- data/screen_test/settings/width/overflow_box.rb +13 -0
- data/screen_test/settings/width/overflow_box_l2r.frame +1 -0
- data/screen_test/settings/width/overflow_box_l2r.rb +16 -0
- data/screen_test/settings/width/overflow_box_t2b.frame +1 -0
- data/screen_test/settings/width/overflow_box_t2b.rb +17 -0
- data/screen_test/settings/width/overflow_grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/width/overflow_grid.rb +0 -0
- data/tools/whirled_peas/tools/screen_tester.rb +285 -0
- metadata +192 -98
- data/bin/debug +0 -35
- data/lib/whirled_peas/debugger.rb +0 -80
- data/lib/whirled_peas/frame.rb +0 -6
- data/lib/whirled_peas/frame/consumer.rb +0 -30
- data/lib/whirled_peas/frame/debug_consumer.rb +0 -30
- data/lib/whirled_peas/frame/event_loop.rb +0 -90
- data/lib/whirled_peas/frame/producer.rb +0 -67
- data/lib/whirled_peas/graphics/screen.rb +0 -65
- data/lib/whirled_peas/graphics/text_dimensions.rb +0 -15
- data/lib/whirled_peas/settings/text_align.rb +0 -19
- data/lib/whirled_peas/template.rb +0 -5
- data/lib/whirled_peas/template/box_element.rb +0 -8
- data/lib/whirled_peas/template/composer.rb +0 -68
- data/lib/whirled_peas/template/container.rb +0 -28
- data/lib/whirled_peas/template/debugger.rb +0 -34
- data/lib/whirled_peas/template/element.rb +0 -13
- data/lib/whirled_peas/template/grid_element.rb +0 -8
- data/lib/whirled_peas/template/text_element.rb +0 -24
- data/screen_test/rendered/elements/grid.frame +0 -1
- data/screen_test/rendered/elements/text.frame +0 -1
- data/screen_test/rendered/elements/text_multiline.frame +0 -1
- data/screen_test/rendered/settings/align/box.frame +0 -1
- data/screen_test/rendered/settings/align/children_center.frame +0 -1
- data/screen_test/rendered/settings/align/children_center.rb +0 -13
- data/screen_test/rendered/settings/align/children_left.frame +0 -1
- data/screen_test/rendered/settings/align/children_left.rb +0 -13
- data/screen_test/rendered/settings/align/children_right.frame +0 -1
- data/screen_test/rendered/settings/align/children_right.rb +0 -13
- data/screen_test/rendered/settings/align/grid.frame +0 -1
- data/screen_test/rendered/settings/ansi/bold.frame +0 -1
- data/screen_test/rendered/settings/ansi/bold.rb +0 -15
- data/screen_test/rendered/settings/ansi/underline.frame +0 -1
- data/screen_test/rendered/settings/flow/l2r.frame +0 -1
- data/screen_test/rendered/settings/flow/l2r.rb +0 -24
- data/screen_test/rendered/settings/flow/t2b.frame +0 -1
- data/screen_test/rendered/settings/flow/t2b.rb +0 -24
- data/screen_test/rendered/settings/height/box.frame +0 -1
- data/screen_test/rendered/settings/height/grid.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box.rb +0 -13
- data/screen_test/rendered/settings/height/overflow_box_l2r.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box_l2r.rb +0 -15
- data/screen_test/rendered/settings/height/overflow_box_t2b.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box_t2b.rb +0 -14
- data/screen_test/rendered/settings/height/overflow_grid.frame +0 -1
- data/screen_test/rendered/settings/margin.frame +0 -1
- data/screen_test/rendered/settings/padding.frame +0 -1
- data/screen_test/rendered/settings/padding.rb +0 -11
- data/screen_test/rendered/settings/position/box_left.frame +0 -1
- data/screen_test/rendered/settings/position/box_left_negative.frame +0 -1
- data/screen_test/rendered/settings/position/box_top.frame +0 -1
- data/screen_test/rendered/settings/position/box_top_negative.frame +0 -1
- data/screen_test/rendered/settings/position/grid_left.frame +0 -1
- data/screen_test/rendered/settings/position/grid_left_negative.frame +0 -1
- data/screen_test/rendered/settings/position/grid_top.frame +0 -1
- data/screen_test/rendered/settings/position/grid_top_negative.frame +0 -1
- data/screen_test/rendered/settings/title_font.frame +0 -1
- data/screen_test/rendered/settings/width/box.frame +0 -1
- data/screen_test/rendered/settings/width/grid.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_box.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_box.rb +0 -11
- data/screen_test/rendered/settings/width/overflow_box_l2r.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_box_l2r.rb +0 -14
- data/screen_test/rendered/settings/width/overflow_box_t2b.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_grid.frame +0 -1
- data/screen_test/screen_tester.rb +0 -191
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whirled_peas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Collier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -70,35 +70,60 @@ files:
|
|
70
70
|
- README.md
|
71
71
|
- Rakefile
|
72
72
|
- bin/console
|
73
|
-
- bin/
|
73
|
+
- bin/easing
|
74
|
+
- bin/reset_cursor
|
75
|
+
- bin/screen_test
|
74
76
|
- bin/setup
|
77
|
+
- examples/graph.rb
|
78
|
+
- examples/intro.rb
|
79
|
+
- examples/scrolling.rb
|
75
80
|
- exe/whirled_peas
|
76
81
|
- lib/whirled_peas.rb
|
82
|
+
- lib/whirled_peas/animator.rb
|
83
|
+
- lib/whirled_peas/animator/debug_consumer.rb
|
84
|
+
- lib/whirled_peas/animator/easing.rb
|
85
|
+
- lib/whirled_peas/animator/frame.rb
|
86
|
+
- lib/whirled_peas/animator/frameset.rb
|
87
|
+
- lib/whirled_peas/animator/producer.rb
|
88
|
+
- lib/whirled_peas/animator/renderer_consumer.rb
|
89
|
+
- lib/whirled_peas/command.rb
|
90
|
+
- lib/whirled_peas/command/base.rb
|
91
|
+
- lib/whirled_peas/command/config_command.rb
|
92
|
+
- lib/whirled_peas/command/debug.rb
|
93
|
+
- lib/whirled_peas/command/fonts.rb
|
94
|
+
- lib/whirled_peas/command/frame_command.rb
|
95
|
+
- lib/whirled_peas/command/frames.rb
|
96
|
+
- lib/whirled_peas/command/help.rb
|
97
|
+
- lib/whirled_peas/command/play.rb
|
98
|
+
- lib/whirled_peas/command/record.rb
|
99
|
+
- lib/whirled_peas/command/still.rb
|
77
100
|
- lib/whirled_peas/command_line.rb
|
78
101
|
- lib/whirled_peas/config.rb
|
79
|
-
- lib/whirled_peas/
|
102
|
+
- lib/whirled_peas/device.rb
|
103
|
+
- lib/whirled_peas/device/null_device.rb
|
104
|
+
- lib/whirled_peas/device/output_file.rb
|
105
|
+
- lib/whirled_peas/device/screen.rb
|
80
106
|
- lib/whirled_peas/errors.rb
|
81
|
-
- lib/whirled_peas/frame.rb
|
82
|
-
- lib/whirled_peas/frame/consumer.rb
|
83
|
-
- lib/whirled_peas/frame/debug_consumer.rb
|
84
|
-
- lib/whirled_peas/frame/event_loop.rb
|
85
|
-
- lib/whirled_peas/frame/producer.rb
|
86
107
|
- lib/whirled_peas/graphics.rb
|
87
108
|
- lib/whirled_peas/graphics/box_painter.rb
|
88
109
|
- lib/whirled_peas/graphics/canvas.rb
|
110
|
+
- lib/whirled_peas/graphics/composer.rb
|
89
111
|
- lib/whirled_peas/graphics/container_coords.rb
|
90
112
|
- lib/whirled_peas/graphics/container_dimensions.rb
|
91
113
|
- lib/whirled_peas/graphics/container_painter.rb
|
114
|
+
- lib/whirled_peas/graphics/content_dimensions.rb
|
115
|
+
- lib/whirled_peas/graphics/content_painter.rb
|
92
116
|
- lib/whirled_peas/graphics/debugger.rb
|
117
|
+
- lib/whirled_peas/graphics/graph_dimensions.rb
|
118
|
+
- lib/whirled_peas/graphics/graph_painter.rb
|
93
119
|
- lib/whirled_peas/graphics/grid_painter.rb
|
94
120
|
- lib/whirled_peas/graphics/mock_screen.rb
|
95
121
|
- lib/whirled_peas/graphics/painter.rb
|
96
122
|
- lib/whirled_peas/graphics/renderer.rb
|
97
|
-
- lib/whirled_peas/graphics/screen.rb
|
98
|
-
- lib/whirled_peas/graphics/text_dimensions.rb
|
99
123
|
- lib/whirled_peas/graphics/text_painter.rb
|
100
124
|
- lib/whirled_peas/null_logger.rb
|
101
125
|
- lib/whirled_peas/settings.rb
|
126
|
+
- lib/whirled_peas/settings/alignment.rb
|
102
127
|
- lib/whirled_peas/settings/bg_color.rb
|
103
128
|
- lib/whirled_peas/settings/border.rb
|
104
129
|
- lib/whirled_peas/settings/box_settings.rb
|
@@ -107,105 +132,174 @@ files:
|
|
107
132
|
- lib/whirled_peas/settings/debugger.rb
|
108
133
|
- lib/whirled_peas/settings/display_flow.rb
|
109
134
|
- lib/whirled_peas/settings/element_settings.rb
|
135
|
+
- lib/whirled_peas/settings/graph_settings.rb
|
110
136
|
- lib/whirled_peas/settings/grid_settings.rb
|
111
137
|
- lib/whirled_peas/settings/margin.rb
|
112
138
|
- lib/whirled_peas/settings/padding.rb
|
113
139
|
- lib/whirled_peas/settings/position.rb
|
140
|
+
- lib/whirled_peas/settings/scrollbar.rb
|
141
|
+
- lib/whirled_peas/settings/sizing.rb
|
114
142
|
- lib/whirled_peas/settings/spacing.rb
|
115
|
-
- lib/whirled_peas/settings/text_align.rb
|
116
143
|
- lib/whirled_peas/settings/text_color.rb
|
117
144
|
- lib/whirled_peas/settings/text_settings.rb
|
118
|
-
- lib/whirled_peas/
|
119
|
-
- lib/whirled_peas/template/box_element.rb
|
120
|
-
- lib/whirled_peas/template/composer.rb
|
121
|
-
- lib/whirled_peas/template/container.rb
|
122
|
-
- lib/whirled_peas/template/debugger.rb
|
123
|
-
- lib/whirled_peas/template/element.rb
|
124
|
-
- lib/whirled_peas/template/grid_element.rb
|
125
|
-
- lib/whirled_peas/template/text_element.rb
|
145
|
+
- lib/whirled_peas/settings/vert_alignment.rb
|
126
146
|
- lib/whirled_peas/utils.rb
|
127
147
|
- lib/whirled_peas/utils/ansi.rb
|
148
|
+
- lib/whirled_peas/utils/file_handler.rb
|
128
149
|
- lib/whirled_peas/utils/formatted_string.rb
|
129
150
|
- lib/whirled_peas/utils/title_font.rb
|
130
151
|
- lib/whirled_peas/version.rb
|
131
|
-
- screen_test/
|
132
|
-
- screen_test/
|
133
|
-
- screen_test/
|
134
|
-
- screen_test/
|
135
|
-
- screen_test/
|
136
|
-
- screen_test/
|
137
|
-
- screen_test/
|
138
|
-
- screen_test/
|
139
|
-
- screen_test/
|
140
|
-
- screen_test/
|
141
|
-
- screen_test/
|
142
|
-
- screen_test/
|
143
|
-
- screen_test/
|
144
|
-
- screen_test/
|
145
|
-
- screen_test/
|
146
|
-
- screen_test/
|
147
|
-
- screen_test/
|
148
|
-
- screen_test/
|
149
|
-
- screen_test/
|
150
|
-
- screen_test/
|
151
|
-
- screen_test/
|
152
|
-
- screen_test/
|
153
|
-
- screen_test/
|
154
|
-
- screen_test/
|
155
|
-
- screen_test/
|
156
|
-
- screen_test/
|
157
|
-
- screen_test/
|
158
|
-
- screen_test/
|
159
|
-
- screen_test/
|
160
|
-
- screen_test/
|
161
|
-
- screen_test/
|
162
|
-
- screen_test/
|
163
|
-
- screen_test/
|
164
|
-
- screen_test/
|
165
|
-
- screen_test/
|
166
|
-
- screen_test/
|
167
|
-
- screen_test/
|
168
|
-
- screen_test/
|
169
|
-
- screen_test/
|
170
|
-
- screen_test/
|
171
|
-
- screen_test/
|
172
|
-
- screen_test/
|
173
|
-
- screen_test/
|
174
|
-
- screen_test/
|
175
|
-
- screen_test/
|
176
|
-
- screen_test/
|
177
|
-
- screen_test/
|
178
|
-
- screen_test/
|
179
|
-
- screen_test/
|
180
|
-
- screen_test/
|
181
|
-
- screen_test/
|
182
|
-
- screen_test/
|
183
|
-
- screen_test/
|
184
|
-
- screen_test/
|
185
|
-
- screen_test/
|
186
|
-
- screen_test/
|
187
|
-
- screen_test/
|
188
|
-
- screen_test/
|
189
|
-
- screen_test/
|
190
|
-
- screen_test/
|
191
|
-
- screen_test/
|
192
|
-
- screen_test/
|
193
|
-
- screen_test/
|
194
|
-
- screen_test/
|
195
|
-
- screen_test/
|
196
|
-
- screen_test/
|
197
|
-
- screen_test/
|
198
|
-
- screen_test/
|
199
|
-
- screen_test/
|
200
|
-
- screen_test/
|
201
|
-
- screen_test/
|
202
|
-
- screen_test/
|
203
|
-
- screen_test/
|
204
|
-
- screen_test/
|
205
|
-
- screen_test/
|
206
|
-
- screen_test/
|
207
|
-
- screen_test/
|
208
|
-
- screen_test/
|
152
|
+
- screen_test/elements/box.frame
|
153
|
+
- screen_test/elements/box.rb
|
154
|
+
- screen_test/elements/graph.frame
|
155
|
+
- screen_test/elements/graph.rb
|
156
|
+
- screen_test/elements/grid.frame
|
157
|
+
- screen_test/elements/grid.rb
|
158
|
+
- screen_test/elements/screen_overflow_x.frame
|
159
|
+
- screen_test/elements/screen_overflow_x.rb
|
160
|
+
- screen_test/elements/screen_overflow_y.frame
|
161
|
+
- screen_test/elements/screen_overflow_y.rb
|
162
|
+
- screen_test/elements/text.frame
|
163
|
+
- screen_test/elements/text.rb
|
164
|
+
- screen_test/elements/text_multiline.frame
|
165
|
+
- screen_test/elements/text_multiline.rb
|
166
|
+
- screen_test/settings/align/box_around.frame
|
167
|
+
- screen_test/settings/align/box_around.rb
|
168
|
+
- screen_test/settings/align/box_between.frame
|
169
|
+
- screen_test/settings/align/box_between.rb
|
170
|
+
- screen_test/settings/align/box_center.frame
|
171
|
+
- screen_test/settings/align/box_center.rb
|
172
|
+
- screen_test/settings/align/box_default.frame
|
173
|
+
- screen_test/settings/align/box_default.rb
|
174
|
+
- screen_test/settings/align/box_evenly.frame
|
175
|
+
- screen_test/settings/align/box_evenly.rb
|
176
|
+
- screen_test/settings/align/box_left.frame
|
177
|
+
- screen_test/settings/align/box_left.rb
|
178
|
+
- screen_test/settings/align/box_right.frame
|
179
|
+
- screen_test/settings/align/box_right.rb
|
180
|
+
- screen_test/settings/align/children_center.frame
|
181
|
+
- screen_test/settings/align/children_center.rb
|
182
|
+
- screen_test/settings/align/children_left.frame
|
183
|
+
- screen_test/settings/align/children_left.rb
|
184
|
+
- screen_test/settings/align/children_right.frame
|
185
|
+
- screen_test/settings/align/children_right.rb
|
186
|
+
- screen_test/settings/align/grid_center.frame
|
187
|
+
- screen_test/settings/align/grid_center.rb
|
188
|
+
- screen_test/settings/align/grid_default.frame
|
189
|
+
- screen_test/settings/align/grid_default.rb
|
190
|
+
- screen_test/settings/align/grid_left.frame
|
191
|
+
- screen_test/settings/align/grid_left.rb
|
192
|
+
- screen_test/settings/align/grid_right.frame
|
193
|
+
- screen_test/settings/align/grid_right.rb
|
194
|
+
- screen_test/settings/ansi/bold.frame
|
195
|
+
- screen_test/settings/ansi/bold.rb
|
196
|
+
- screen_test/settings/ansi/color.frame
|
197
|
+
- screen_test/settings/ansi/color.rb
|
198
|
+
- screen_test/settings/ansi/underline.frame
|
199
|
+
- screen_test/settings/ansi/underline.rb
|
200
|
+
- screen_test/settings/border.frame
|
201
|
+
- screen_test/settings/border.rb
|
202
|
+
- screen_test/settings/flow/box_b2t.frame
|
203
|
+
- screen_test/settings/flow/box_b2t.rb
|
204
|
+
- screen_test/settings/flow/box_l2r.frame
|
205
|
+
- screen_test/settings/flow/box_l2r.rb
|
206
|
+
- screen_test/settings/flow/box_r2l.frame
|
207
|
+
- screen_test/settings/flow/box_r2l.rb
|
208
|
+
- screen_test/settings/flow/box_t2b.frame
|
209
|
+
- screen_test/settings/flow/box_t2b.rb
|
210
|
+
- screen_test/settings/flow/grid_b2t.frame
|
211
|
+
- screen_test/settings/flow/grid_b2t.rb
|
212
|
+
- screen_test/settings/flow/grid_l2r.frame
|
213
|
+
- screen_test/settings/flow/grid_l2r.rb
|
214
|
+
- screen_test/settings/flow/grid_r2l.frame
|
215
|
+
- screen_test/settings/flow/grid_r2l.rb
|
216
|
+
- screen_test/settings/flow/grid_t2b.frame
|
217
|
+
- screen_test/settings/flow/grid_t2b.rb
|
218
|
+
- screen_test/settings/height/box.frame
|
219
|
+
- screen_test/settings/height/box.rb
|
220
|
+
- screen_test/settings/height/box_border_sizing.frame
|
221
|
+
- screen_test/settings/height/box_border_sizing.rb
|
222
|
+
- screen_test/settings/height/grid.frame
|
223
|
+
- screen_test/settings/height/grid.rb
|
224
|
+
- screen_test/settings/height/overflow_box.frame
|
225
|
+
- screen_test/settings/height/overflow_box.rb
|
226
|
+
- screen_test/settings/height/overflow_box_l2r.frame
|
227
|
+
- screen_test/settings/height/overflow_box_l2r.rb
|
228
|
+
- screen_test/settings/height/overflow_box_t2b.frame
|
229
|
+
- screen_test/settings/height/overflow_box_t2b.rb
|
230
|
+
- screen_test/settings/height/overflow_grid.frame
|
231
|
+
- screen_test/settings/height/overflow_grid.rb
|
232
|
+
- screen_test/settings/margin.frame
|
233
|
+
- screen_test/settings/margin.rb
|
234
|
+
- screen_test/settings/padding.frame
|
235
|
+
- screen_test/settings/padding.rb
|
236
|
+
- screen_test/settings/position/box_left.frame
|
237
|
+
- screen_test/settings/position/box_left.rb
|
238
|
+
- screen_test/settings/position/box_left_negative.frame
|
239
|
+
- screen_test/settings/position/box_left_negative.rb
|
240
|
+
- screen_test/settings/position/box_top.frame
|
241
|
+
- screen_test/settings/position/box_top.rb
|
242
|
+
- screen_test/settings/position/box_top_negative.frame
|
243
|
+
- screen_test/settings/position/box_top_negative.rb
|
244
|
+
- screen_test/settings/position/grid_left.frame
|
245
|
+
- screen_test/settings/position/grid_left.rb
|
246
|
+
- screen_test/settings/position/grid_left_negative.frame
|
247
|
+
- screen_test/settings/position/grid_left_negative.rb
|
248
|
+
- screen_test/settings/position/grid_top.frame
|
249
|
+
- screen_test/settings/position/grid_top.rb
|
250
|
+
- screen_test/settings/position/grid_top_negative.frame
|
251
|
+
- screen_test/settings/position/grid_top_negative.rb
|
252
|
+
- screen_test/settings/scroll/horiz_box.frame
|
253
|
+
- screen_test/settings/scroll/horiz_box.rb
|
254
|
+
- screen_test/settings/scroll/horiz_box_align_center.rb
|
255
|
+
- screen_test/settings/scroll/horiz_box_align_right.rb
|
256
|
+
- screen_test/settings/scroll/vert_box.frame
|
257
|
+
- screen_test/settings/scroll/vert_box.rb
|
258
|
+
- screen_test/settings/title_font.frame
|
259
|
+
- screen_test/settings/title_font.rb
|
260
|
+
- screen_test/settings/valign/box_around.frame
|
261
|
+
- screen_test/settings/valign/box_around.rb
|
262
|
+
- screen_test/settings/valign/box_between.frame
|
263
|
+
- screen_test/settings/valign/box_between.rb
|
264
|
+
- screen_test/settings/valign/box_bottom.frame
|
265
|
+
- screen_test/settings/valign/box_bottom.rb
|
266
|
+
- screen_test/settings/valign/box_default.frame
|
267
|
+
- screen_test/settings/valign/box_default.rb
|
268
|
+
- screen_test/settings/valign/box_evenly.frame
|
269
|
+
- screen_test/settings/valign/box_evenly.rb
|
270
|
+
- screen_test/settings/valign/box_middle.frame
|
271
|
+
- screen_test/settings/valign/box_middle.rb
|
272
|
+
- screen_test/settings/valign/box_top.frame
|
273
|
+
- screen_test/settings/valign/box_top.rb
|
274
|
+
- screen_test/settings/valign/grid_bottom.frame
|
275
|
+
- screen_test/settings/valign/grid_bottom.rb
|
276
|
+
- screen_test/settings/valign/grid_default.frame
|
277
|
+
- screen_test/settings/valign/grid_default.rb
|
278
|
+
- screen_test/settings/valign/grid_middle.frame
|
279
|
+
- screen_test/settings/valign/grid_middle.rb
|
280
|
+
- screen_test/settings/valign/grid_top.frame
|
281
|
+
- screen_test/settings/valign/grid_top.rb
|
282
|
+
- screen_test/settings/width/box_border_sizing.frame
|
283
|
+
- screen_test/settings/width/box_border_sizing.rb
|
284
|
+
- screen_test/settings/width/box_content.frame
|
285
|
+
- screen_test/settings/width/box_content.rb
|
286
|
+
- screen_test/settings/width/box_default.frame
|
287
|
+
- screen_test/settings/width/box_default.rb
|
288
|
+
- screen_test/settings/width/grid.frame
|
289
|
+
- screen_test/settings/width/grid.rb
|
290
|
+
- screen_test/settings/width/overflow_align_center.frame
|
291
|
+
- screen_test/settings/width/overflow_align_center.rb
|
292
|
+
- screen_test/settings/width/overflow_align_right.frame
|
293
|
+
- screen_test/settings/width/overflow_align_right.rb
|
294
|
+
- screen_test/settings/width/overflow_box.frame
|
295
|
+
- screen_test/settings/width/overflow_box.rb
|
296
|
+
- screen_test/settings/width/overflow_box_l2r.frame
|
297
|
+
- screen_test/settings/width/overflow_box_l2r.rb
|
298
|
+
- screen_test/settings/width/overflow_box_t2b.frame
|
299
|
+
- screen_test/settings/width/overflow_box_t2b.rb
|
300
|
+
- screen_test/settings/width/overflow_grid.frame
|
301
|
+
- screen_test/settings/width/overflow_grid.rb
|
302
|
+
- tools/whirled_peas/tools/screen_tester.rb
|
209
303
|
- whirled_peas.gemspec
|
210
304
|
homepage: https://github.com/tcollier/whirled_peas
|
211
305
|
licenses:
|
data/bin/debug
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
def print_usage
|
4
|
-
puts "Usage: #{$0} <config file> [options]"
|
5
|
-
puts
|
6
|
-
puts 'options include'
|
7
|
-
puts ' --disable-screen Disable the screen (useful when printing debug statements)'
|
8
|
-
puts ' --painter Print the painter debug tree and exit'
|
9
|
-
puts ' --template Print the template debug tree and exit'
|
10
|
-
end
|
11
|
-
|
12
|
-
if !(1..2).include?(ARGV.length)
|
13
|
-
print_usage
|
14
|
-
exit(1)
|
15
|
-
elsif !File.exist?(ARGV.first)
|
16
|
-
puts "File not found: #{ARGV.first}"
|
17
|
-
print_usage
|
18
|
-
exit(1)
|
19
|
-
elsif ARGV.length == 2 && !%w[--disable-screen --template --painter].include?(ARGV[1])
|
20
|
-
puts "Unrecognized option: #{ARGV[1]}"
|
21
|
-
print_usage
|
22
|
-
exit(1)
|
23
|
-
end
|
24
|
-
|
25
|
-
require 'bundler/setup'
|
26
|
-
require 'whirled_peas'
|
27
|
-
|
28
|
-
if ARGV.length == 1
|
29
|
-
option = nil
|
30
|
-
else
|
31
|
-
option = ARGV[1].sub(/^--/, '').gsub(/-/, '_').to_sym
|
32
|
-
end
|
33
|
-
|
34
|
-
template_file = ARGV.first[0] == '/' ? ARGV.first : File.join(Dir.pwd, ARGV.first)
|
35
|
-
WhirledPeas.debug(template_file, option)
|
@@ -1,80 +0,0 @@
|
|
1
|
-
require 'whirled_peas/frame/event_loop'
|
2
|
-
require 'whirled_peas/frame/producer'
|
3
|
-
require 'whirled_peas/graphics/debugger'
|
4
|
-
require 'whirled_peas/graphics/mock_screen'
|
5
|
-
require 'whirled_peas/graphics/renderer'
|
6
|
-
require 'whirled_peas/graphics/screen'
|
7
|
-
require 'whirled_peas/template/debugger'
|
8
|
-
|
9
|
-
module WhirledPeas
|
10
|
-
class Debugger
|
11
|
-
module Option
|
12
|
-
DISABLE_SCREEN = :disable_screen
|
13
|
-
PAINTER = :painter
|
14
|
-
TEMPLATE = :template
|
15
|
-
|
16
|
-
VALID = [DISABLE_SCREEN, PAINTER, TEMPLATE]
|
17
|
-
end
|
18
|
-
private_constant :Option
|
19
|
-
|
20
|
-
FRAME = 'debug'
|
21
|
-
private_constant :FRAME
|
22
|
-
|
23
|
-
def initialize(template_file, option=nil)
|
24
|
-
unless option.nil? || Option::VALID.include?(option)
|
25
|
-
message =
|
26
|
-
"Invalid option: #{option}, expecting one of #{Option::VALID.join(', ')}"
|
27
|
-
raise ArgumentError, message
|
28
|
-
end
|
29
|
-
@template_file = template_file
|
30
|
-
@option = option
|
31
|
-
end
|
32
|
-
|
33
|
-
def debug
|
34
|
-
require template_file
|
35
|
-
template_factory = TemplateFactory.new
|
36
|
-
if play_frame?
|
37
|
-
screen = if disable_screen?
|
38
|
-
Graphics::MockScreen.new(80, 40)
|
39
|
-
else
|
40
|
-
Graphics::Screen.new
|
41
|
-
end
|
42
|
-
consumer = Frame::EventLoop.new(template_factory, screen: screen)
|
43
|
-
Frame::Producer.produce(consumer) do |producer|
|
44
|
-
producer.send_frame(FRAME, args: {})
|
45
|
-
end
|
46
|
-
return
|
47
|
-
end
|
48
|
-
|
49
|
-
template = template_factory.build(FRAME, {})
|
50
|
-
if print_painter?
|
51
|
-
painter = Graphics::Renderer.new(template, *Graphics::Screen.current_dimensions).painter
|
52
|
-
puts Graphics::Debugger.new(painter).debug
|
53
|
-
elsif print_template?
|
54
|
-
puts Template::Debugger.new(template).debug
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
private
|
59
|
-
|
60
|
-
attr_reader :template_file, :option
|
61
|
-
|
62
|
-
def play_frame?
|
63
|
-
option.nil? || option == Option::DISABLE_SCREEN
|
64
|
-
end
|
65
|
-
|
66
|
-
def disable_screen?
|
67
|
-
!option.nil? && option == Option::DISABLE_SCREEN
|
68
|
-
end
|
69
|
-
|
70
|
-
def print_painter?
|
71
|
-
!option.nil? && option == Option::PAINTER
|
72
|
-
end
|
73
|
-
|
74
|
-
def print_template?
|
75
|
-
!option.nil? && option == Option::TEMPLATE
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
private_constant :Debugger
|
80
|
-
end
|