howzit 2.1.23 → 2.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fc52d90b2a71d349a14e77f6e313baed51003a43ce2ca615a31f0b070f0681e
4
- data.tar.gz: fa0fa63742822ef396b45abc56b6ae7dfbc7acb72a4c896a9e6570cc9e13b1c3
3
+ metadata.gz: 9539bebf0157985ac2d5a035923c1e7f78e942961f79a0729d20920d78c38f3a
4
+ data.tar.gz: 0f16b31308c0e78f7d13e140363d2f62cd8da38658c5d1a9e29721ea0e6dda5f
5
5
  SHA512:
6
- metadata.gz: d7e01306310519e4454960b5246740572a7731aa4946fa3d4d455ee3f9a3c30b1415eabdf91a58dca48d0123a0b78332754d7e4d86bd112692574b517a328072
7
- data.tar.gz: 99ab41b0612da8c5a0e456c5a5006e9dc6cf5e679726b461cba170622d3aa615fe6a259c50dec67b2b4c7151afff200af8d8cf2c3dfe1d775b0dea83e3975fba
6
+ metadata.gz: bb8ddc83529c66ddbcc1a71be7bdcdbf118427f08a206d7bc5a02e0b5b1a363d01f321e8865eab8f44a8b871dd8a8134e20e4d1bbd3a880cbbdc7c87f688062c
7
+ data.tar.gz: 3a8501d2c2c7b7a35ac82701353b8b3162eb6b6b5890c98c5b171eb8be56bdaf9fc8cd841ef8610ca95482c2fe820964aae98c0945be8eaae6e2a1eb0b3432de
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ### 2.1.24
2
+
3
+ 2025-12-13 07:11
4
+
5
+ #### CHANGED
6
+
7
+ - Run summary now displays as simple list with emoji status indicators
8
+
9
+ #### IMPROVED
10
+
11
+ - Use horizontal rule (***) as separator instead of box borders
12
+
1
13
  ### 2.1.23
2
14
 
3
15
  2025-12-13 06:38
@@ -21,16 +21,37 @@ module Howzit
21
21
  def format
22
22
  return '' if entries.empty?
23
23
 
24
+ lines = entries.map { |entry| format_line(entry, Howzit.multi_topic_run) }
25
+ output_lines = ["\n\n***\n"] + lines
26
+ output_lines.join("\n")
27
+ end
28
+
29
+ def format_line(entry, prefix_topic)
30
+ symbol = entry[:success] ? '✅' : '❌'
31
+ parts = ["#{symbol} "]
32
+ parts << "{bw}#{entry[:topic]}{x}: " if prefix_topic && entry[:topic] && !entry[:topic].empty?
33
+ parts << "{by}#{entry[:task]}{x}"
34
+ unless entry[:success]
35
+ reason = entry[:exit_status] ? "exit code #{entry[:exit_status]}" : 'failed'
36
+ parts << " {br}(#{reason}){x}"
37
+ end
38
+ parts.join.c
39
+ end
40
+
41
+ # Table formatting methods kept for possible future use
42
+ def format_as_table
43
+ return '' if entries.empty?
44
+
24
45
  rows = entries.map { |entry| format_row(entry, Howzit.multi_topic_run) }
25
46
 
26
- # Status column: emoji + 1 space on each side = 3 chars wide visually
27
- # But emojis are 2-width in terminal, so we need width of 4 for " "
28
- status_width = 4
47
+ # Status column width: " :--: " = 6 chars (4 for :--: plus 1 space each side)
48
+ # Emoji is 2-width in terminal, so we need 2 spaces on each side to center it
49
+ status_width = 6
29
50
  task_width = [4, rows.map { |r| r[:task_plain].length }.max].max
30
51
 
31
- # Build the table with emoji header
32
- header = "| 🚥 | #{'Task'.ljust(task_width)} |"
33
- separator = "| #{':' + '-' * 2 + ':'} | #{':' + '-' * (task_width - 2)} |"
52
+ # Build the table with emoji header - center emoji in 6-char column
53
+ header = "| 🚥 | #{'Task'.ljust(task_width)} |"
54
+ separator = "| :--: | #{':' + '-' * (task_width - 1)} |"
34
55
 
35
56
  table_lines = [header, separator]
36
57
  rows.each do |row|
@@ -43,12 +64,13 @@ module Howzit
43
64
  def table_row_colored(status, task, task_plain, status_width, task_width)
44
65
  task_padding = task_width - task_plain.length
45
66
 
46
- "| #{status} | #{task}#{' ' * task_padding} |"
67
+ "| #{status} | #{task}#{' ' * task_padding} |"
47
68
  end
48
69
 
49
70
  def format_row(entry, prefix_topic)
71
+ # Use plain emoji without color codes - the emoji itself provides visual meaning
72
+ # and complex ANSI codes interfere with mdless table rendering
50
73
  symbol = entry[:success] ? '✅' : '❌'
51
- symbol_colored = entry[:success] ? '{bg}✅{x}'.c : '{br}❌{x}'.c
52
74
 
53
75
  task_parts = []
54
76
  task_parts_plain = []
@@ -68,7 +90,7 @@ module Howzit
68
90
  end
69
91
 
70
92
  {
71
- status: symbol_colored,
93
+ status: symbol,
72
94
  status_plain: symbol,
73
95
  task: task_parts.join.c,
74
96
  task_plain: task_parts_plain.join
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.1.23'
6
+ VERSION = '2.1.24'
7
7
  end
@@ -13,11 +13,10 @@ describe Howzit::RunReport do
13
13
  Howzit.multi_topic_run = false
14
14
  end
15
15
 
16
- it 'renders a markdown table for single topic runs' do
16
+ it 'renders a simple list for single topic runs' do
17
17
  Howzit::RunReport.log({ topic: 'Git: Config', task: 'Run Git Origin', success: true, exit_status: 0 })
18
18
  plain = Howzit::RunReport.format.uncolor
19
- expect(plain).to include('| 🚥 |')
20
- expect(plain).to include('| Task')
19
+ expect(plain).to include('***')
21
20
  expect(plain).to include('✅')
22
21
  expect(plain).to include('Run Git Origin')
23
22
  expect(plain).not_to include('Git: Config:')
@@ -35,10 +34,10 @@ describe Howzit::RunReport do
35
34
  expect(plain).to include('exit code 12')
36
35
  end
37
36
 
38
- it 'formats as a proper markdown table with aligned columns' do
37
+ it 'formats as a proper markdown table with aligned columns using format_as_table' do
39
38
  Howzit::RunReport.log({ topic: 'Test', task: 'Short', success: true, exit_status: 0 })
40
39
  Howzit::RunReport.log({ topic: 'Test', task: 'A much longer task name', success: true, exit_status: 0 })
41
- plain = Howzit::RunReport.format.uncolor
40
+ plain = Howzit::RunReport.format_as_table.uncolor
42
41
  lines = plain.split("\n")
43
42
  # All lines should start and end with pipe
44
43
  lines.each do |line|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.23
4
+ version: 2.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra