Skip to content

Commit 874763c

Browse files
committed
refactor rendering specs
1 parent 1f86420 commit 874763c

File tree

24 files changed

+548
-9
lines changed

24 files changed

+548
-9
lines changed

examples/render-mandoc/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
rm -f ./src/*.sh
44

5-
set -x
5+
# set -x # can't use this here, since the piped command appears in random order
66

77
bashly render :mandoc docs
88

lib/bashly/render_context.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class RenderContext
66
include Colsole
77

88
attr_reader :source, :target, :show
9+
attr_writer :config
910

1011
def initialize(source:, target:, show: nil)
1112
@source = source

spec/approvals/examples/render-mandoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
+ bashly render :mandoc docs
21
saved docs/download.md
32
saved docs/download.1
4-
+ col -bx
5-
+ man docs/download.1
63
download(1) Sample application download(1)
74

85
NAME
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
saved spec/tmp/download.md
2+
saved spec/tmp/download.1
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
download(1) Sample minimal application without commands download(1)
2+
3+
NAME
4+
download - Sample minimal application without commands
5+
6+
SYNOPSIS
7+
download SOURCE TARGET OPTIONS
8+
9+
DESCRIPTION
10+
Sample minimal application without commands
11+
12+
ARGUMENTS
13+
SOURCE
14+
URL to download from
15+
16+
• Required
17+
18+
TARGET
19+
Target filename (default: same as source)
20+
21+
OPTIONS
22+
--force, -f
23+
Overwrite existing files
24+
25+
EXAMPLES
26+
27+
download example.com
28+
29+
download example.com ./output -f
30+
31+
32+
Version 0.1.0 August 2023 download(1)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
% download(1) Version 0.1.0 | Sample minimal application without commands
2+
%
3+
% August 2023
4+
5+
NAME
6+
==================================================
7+
8+
**download** - Sample minimal application without commands
9+
10+
SYNOPSIS
11+
==================================================
12+
13+
**download** SOURCE [TARGET] [OPTIONS]
14+
15+
DESCRIPTION
16+
==================================================
17+
18+
Sample minimal application without commands
19+
20+
21+
ARGUMENTS
22+
==================================================
23+
24+
SOURCE
25+
--------------------------------------------------
26+
27+
URL to download from
28+
29+
- *Required*
30+
31+
TARGET
32+
--------------------------------------------------
33+
34+
Target filename (default: same as source)
35+
36+
37+
OPTIONS
38+
==================================================
39+
40+
--force, -f
41+
--------------------------------------------------
42+
43+
Overwrite existing files
44+
45+
46+
EXAMPLES
47+
==================================================
48+
49+
~~~
50+
download example.com
51+
52+
download example.com ./output -f
53+
54+
~~~
55+
56+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
saved spec/tmp/cli.md
2+
saved spec/tmp/cli.1
3+
saved spec/tmp/cli-download.md
4+
saved spec/tmp/cli-download.1
5+
saved spec/tmp/cli-upload.md
6+
saved spec/tmp/cli-upload.1
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
% cli-download(1) | Download a file
2+
%
3+
% August 2023
4+
5+
NAME
6+
==================================================
7+
8+
**cli download** - Download a file
9+
10+
SYNOPSIS
11+
==================================================
12+
13+
**cli download** SOURCE [TARGET] [OPTIONS]
14+
15+
DESCRIPTION
16+
==================================================
17+
18+
Download a file
19+
20+
- Alias: **d**
21+
22+
ARGUMENTS
23+
==================================================
24+
25+
SOURCE
26+
--------------------------------------------------
27+
28+
URL to download from
29+
30+
- *Required*
31+
32+
TARGET
33+
--------------------------------------------------
34+
35+
Target filename (default: same as source)
36+
37+
38+
OPTIONS
39+
==================================================
40+
41+
--force, -f
42+
--------------------------------------------------
43+
44+
Overwrite existing files
45+
46+
47+
ENVIRONMENT VARIABLES
48+
==================================================
49+
50+
DEFAULT_TARGET_LOCATION
51+
--------------------------------------------------
52+
53+
Set the default location to download to
54+
55+
56+
EXAMPLES
57+
==================================================
58+
59+
~~~
60+
cli download example.com
61+
62+
cli download example.com ./output -f
63+
64+
~~~
65+
66+
SEE ALSO
67+
==================================================
68+
69+
**cli**(1)
70+
71+
72+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
saved spec/tmp/download.md
2+
saved spec/tmp/download.1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
saved spec/tmp/index.md

0 commit comments

Comments
 (0)