Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling of 'supersede' #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ when you initialise the ADR log.
editor of choice (as specified by the VISUAL or EDITOR environment
variable).

To create a new ADR that supercedes a previous one (ADR 9, for example),
To create a new ADR that supersedes a previous one (ADR 9, for example),
use the -s option.

adr new -s 9 Use Rust for performance-critical functionality

This will create a new ADR file that is flagged as superceding
This will create a new ADR file that is flagged as superseding
ADR 9, and changes the status of ADR 9 to indicate that it is
superceded by the new ADR. It then opens the new ADR in your
superseded by the new ADR. It then opens the new ADR in your
editor of choice.

3. For further information, use the built in help:
Expand Down
2 changes: 1 addition & 1 deletion doc/adr/0004-markdown-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The decision records must be stored in a plain text format:
* This works well with version control systems.

* It allows the tool to modify the status of records and insert
hyperlinks when one decision supercedes another.
hyperlinks when one decision supersedes another.

* Decisions can be read in the terminal, IDE, version control
browser, etc.
Expand Down
24 changes: 12 additions & 12 deletions src/_adr_help_new
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
eval "$($(dirname $0)/adr-config)"

cat <<ENDHELP
usage: adr new [-s SUPERCEDED] [-l TARGET:LINK:REVERSE-LINK] TITLE_TEXT...
usage: adr new [-s SUPERSEDED] [-l TARGET:LINK:REVERSE-LINK] TITLE_TEXT...

Creates a new, numbered ADR. The TITLE_TEXT arguments are concatenated to
form the title of the new ADR. The ADR is opened for editing in the
Expand All @@ -23,32 +23,32 @@ This template follows the style described by Michael Nygard in this article.

Options:

-s SUPERCEDED A reference (number or partial filename) of a previous
decision that the new decision supercedes. A Markdown link
to the superceded ADR is inserted into the Status section.
The status of the superceded ADR is changed to record that
it has been superceded by the new ADR.
-s SUPERSEDED A reference (number or partial filename) of a previous
decision that the new decision supersedes. A Markdown link
to the superseded ADR is inserted into the Status section.
The status of the superseded ADR is changed to record that
it has been superseded by the new ADR.

-l TARGET:LINK:REVERSE-LINK
Links the new ADR to a previous ADR.
TARGET is a reference (number or partial filename) of a
previous decision.
Links the new ADR to a previous ADR.
TARGET is a reference (number or partial filename) of a
previous decision.
LINK is the description of the link created in the new ADR.
REVERSE-LINK is the description of the link created in the
existing ADR that will refer to the new ADR.

Multiple -s and -l options can be given, so that the new ADR can supercede
Multiple -s and -l options can be given, so that the new ADR can supersede
or link to multiple existing ADRs.

E.g. to create a new ADR with the title "Use MySQL Database":

adr new Use MySQL Database

E.g. to create a new ADR that supercedes ADR 12:
E.g. to create a new ADR that supersedes ADR 12:

adr new -s 12 Use PostgreSQL Database

E.g. to create a new ADR that supercedes ADRs 3 and 4, and amends ADR 5:
E.g. to create a new ADR that supersedes ADRs 3 and 4, and amends ADR 5:

adr new -s 3 -s 4 -l "5:Amends:Amended by" Use Riak CRDTs to cope with scale

Expand Down
36 changes: 18 additions & 18 deletions src/adr-new
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
eval "$($(dirname $0)/adr-config)"

## usage: adr new [-s SUPERCEDED] [-l TARGET:LINK:REVERSE-LINK] TITLE_TEXT...
## usage: adr new [-s SUPERSEDED] [-l TARGET:LINK:REVERSE-LINK] TITLE_TEXT...
##
## Creates a new, numbered ADR. The TITLE_TEXT arguments are concatenated to
## form the title of the new ADR. The ADR is opened for editing in the
Expand All @@ -19,44 +19,44 @@ eval "$($(dirname $0)/adr-config)"
##
## Options:
##
## -s SUPERCEDED A reference (number or partial filename) of a previous
## decision that the new decision supercedes. A Markdown link
## to the superceded ADR is inserted into the Status section.
## The status of the superceded ADR is changed to record that
## it has been superceded by the new ADR.
## -s SUPERSEDED A reference (number or partial filename) of a previous
## decision that the new decision supersedes. A Markdown link
## to the superseded ADR is inserted into the Status section.
## The status of the superseded ADR is changed to record that
## it has been superseded by the new ADR.
##
## -l TARGET:LINK:REVERSE-LINK
## Links the new ADR to a previous ADR.
## TARGET is a reference (number or partial filename) of a
## previous decision.
## Links the new ADR to a previous ADR.
## TARGET is a reference (number or partial filename) of a
## previous decision.
## LINK is the description of the link created in the new ADR.
## REVERSE-LINK is the description of the link created in the
## existing ADR that will refer to the new ADR.
##
## Multiple -s and -l options can be given, so that the new ADR can supercede
## Multiple -s and -l options can be given, so that the new ADR can supersede
## or link to multiple existing ADRs.
##
## E.g. to create a new ADR with the title "Use MySQL Database":
##
## adr new Use MySQL Database
##
## E.g. to create a new ADR that supercedes ADR 12:
## E.g. to create a new ADR that supersedes ADR 12:
##
## adr new -s 12 Use PostgreSQL Database
##
## E.g. to create a new ADR that supercedes ADRs 3 and 4, and amends ADR 5:
## E.g. to create a new ADR that supersedes ADRs 3 and 4, and amends ADR 5:
##
## adr new -s 3 -s 4 -l "5:Amends:Amended by" Use Riak CRDTs to cope with scale
##

superceded=()
superseded=()
links=()

while getopts s:l: arg
do
case "$arg" in
s)
superceded+=("$OPTARG")
superseded+=("$OPTARG")
;;
l)
links+=("$OPTARG")
Expand Down Expand Up @@ -112,19 +112,19 @@ cat $template | sed \
-e "s|STATUS|Accepted|" \
> $dstfile

for target in "${superceded[@]}"
for target in "${superseded[@]}"
do
"$adr_bin_dir/_adr_add_link" "$target" "Superceded by" "$dstfile"
"$adr_bin_dir/_adr_add_link" "$target" "Superseded by" "$dstfile"
"$adr_bin_dir/_adr_remove_status" "Accepted" "$target"
"$adr_bin_dir/_adr_add_link" "$dstfile" "Supercedes" "$target"
"$adr_bin_dir/_adr_add_link" "$dstfile" "Supersedes" "$target"
done

for l in "${links[@]}"
do
target="$(echo $l | cut -d : -f 1)"
forward_link="$(echo $l | cut -d : -f 2)"
reverse_link="$(echo $l | cut -d : -f 3)"

"$adr_bin_dir/_adr_add_link" "$dstfile" "$forward_link" "$target"
"$adr_bin_dir/_adr_add_link" "$target" "$reverse_link" "$dstfile"
done
Expand Down
8 changes: 4 additions & 4 deletions tests/generate-graph.expected
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ digraph {
_5 [label="5. The end"; URL="0005-the-end.html"];
_4 -> _5 [style="dotted", weight=1];
}
_3 -> _2 [label="Supercedes", weight=0]
_5 -> _3 [label="Supercedes", weight=0]
_3 -> _2 [label="Supersedes", weight=0]
_5 -> _3 [label="Supersedes", weight=0]
}
# with specified root and extension in links
adr generate graph -p http://example.com/ -e .xxx
Expand All @@ -41,6 +41,6 @@ digraph {
_5 [label="5. The end"; URL="http://example.com/0005-the-end.xxx"];
_4 -> _5 [style="dotted", weight=1];
}
_3 -> _2 [label="Supercedes", weight=0]
_5 -> _3 [label="Supercedes", weight=0]
_3 -> _2 [label="Supersedes", weight=0]
_5 -> _3 [label="Supersedes", weight=0]
}
4 changes: 2 additions & 2 deletions tests/supercede-existing-adr.expected
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Date: 1992-01-12

## Status

Superceded by [2. Second Record](0002-second-record.md)
Superseded by [2. Second Record](0002-second-record.md)

## Context

Expand All @@ -22,7 +22,7 @@ Date: 1992-01-12

Accepted

Supercedes [1. First Record](0001-first-record.md)
Supersedes [1. First Record](0001-first-record.md)

## Context

Expand Down
8 changes: 4 additions & 4 deletions tests/supercede-multiple-adrs.expected
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Date: 1992-01-12

## Status

Superceded by [3. Third Record](0003-third-record.md)
Superseded by [3. Third Record](0003-third-record.md)

head -8 doc/adr/0002-second-record.md
# 2. Second Record
Expand All @@ -20,7 +20,7 @@ Date: 1992-01-12

## Status

Superceded by [3. Third Record](0003-third-record.md)
Superseded by [3. Third Record](0003-third-record.md)

head -12 doc/adr/0003-third-record.md
# 3. Third Record
Expand All @@ -31,7 +31,7 @@ Date: 1992-01-12

Accepted

Supercedes [1. First Record](0001-first-record.md)
Supersedes [1. First Record](0001-first-record.md)

Supercedes [2. Second Record](0002-second-record.md)
Supersedes [2. Second Record](0002-second-record.md)