Class: Taski::Progress::Theme::Compact
- Defined in:
- lib/taski/progress/theme/compact.rb
Overview
Compact theme for TTY environments with single-line progress display. Provides spinner animation, colored icons, and status formatting.
Output format:
⠹ [3/5] DeployTask | Uploading files...
✓ [5/5] All tasks completed (1.2s)
Instance Method Summary collapse
-
#execution_complete ⇒ Object
Execution complete with icon.
-
#execution_fail ⇒ Object
Execution fail with icon.
-
#execution_running ⇒ Object
Execution running with spinner.
Methods inherited from Base
#clean_fail, #clean_start, #clean_success, #color_dim, #color_green, #color_red, #color_reset, #color_yellow, #execution_start, #format_count, #format_duration, #group_fail, #group_start, #group_success, #icon_failure, #icon_pending, #icon_skip, #icon_success, #render_interval, #spinner_frames, #spinner_interval, #task_fail, #task_pending, #task_skip, #task_start, #task_success, #truncate_list_separator, #truncate_list_suffix, #truncate_text_suffix
Instance Method Details
#execution_complete ⇒ Object
Execution complete with icon
47 48 49 |
# File 'lib/taski/progress/theme/compact.rb', line 47 def execution_complete "{% icon %} [TASKI] Completed: {{ execution.done_count }}/{{ execution.total_count }} tasks ({{ execution.total_duration | format_duration }})" end |
#execution_fail ⇒ Object
Execution fail with icon
52 53 54 |
# File 'lib/taski/progress/theme/compact.rb', line 52 def execution_fail "{% icon %} [TASKI] Failed: {{ execution.failed_count }}/{{ execution.total_count }} tasks ({{ execution.total_duration | format_duration }})" end |
#execution_running ⇒ Object
Execution running with spinner
42 43 44 |
# File 'lib/taski/progress/theme/compact.rb', line 42 def execution_running "{% spinner %} [{{ execution.done_count }}/{{ execution.total_count }}]{% if execution.task_names %} {% for name in execution.task_names limit: 3 %}{{ name | short_name }}{% unless forloop.last %}, {% endunless %}{% endfor %}{% if execution.task_names.size > 3 %}...{% endif %}{% endif %}{% if task.stdout %} | {{ task.stdout | truncate_text: 40 }}{% endif %}" end |