Mercurial > p > roundup > code
annotate doc/Makefile @ 8218:32aaf5dc562b
fix(REST): issue2551383; improve errors for bad json, fix PUT docs
While adding fuzz testing for email addresses via REST
/rest/data/user/1/address, I had an error when setting the address to
the same value it currently had. Traced this to a bug in
userauditor.py. Fixed the bug. Documented in upgrading.txt.
While trying to track down issue, I realized invalid json was being
accepted without error. So I fixed the code that parses the json and
have it return an error. Also modified some tests that broke (used
invalid json, or passed body (e.g. DELETE) but shouldn't have. Add
tests for bad json to verify new code.
Fixed test that wasn't initializing the body_file in each loop, so the
test wasn't actually supplying a body.
Also realised PUT documentation was not correct. Output format isn't
quite like GET.
Fuss tests for email address also added.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 17 Dec 2024 19:42:46 -0500 |
| parents | d4fbfc6a7662 |
| children | 8824c81cc431 |
| rev | line source |
|---|---|
|
8096
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
1 all: man_html tracker_config.txt admin_help.html |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
2 cd ..; ./setup.py build_doc |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
3 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
4 tracker_config.txt: ../roundup/configuration.py |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
5 # generate a current config file |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
6 python3 ../roundup/scripts/roundup_admin.py \ |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
7 genconfig _temp_config.txt |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
8 |
|
8036
8b5f8b950f58
docs: add section anchors to config.ini in references.txt; change format
John Rouillard <rouilj@ieee.org>
parents:
7920
diff
changeset
|
9 awk -f format_config.awk _temp_config.txt | \ |
|
8b5f8b950f58
docs: add section anchors to config.ini in references.txt; change format
John Rouillard <rouilj@ieee.org>
parents:
7920
diff
changeset
|
10 cat -s > tracker_config.txt |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
11 rm -f _temp_config.txt |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
12 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
13 ## generate html versions of man pages for inclusion in documentation |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
14 # find all man pages and generate output file paths. |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
15 MAN_ROFF=$(wildcard ../share/man/man1/*.1) |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
16 MAN_HTML=$(patsubst ../share/man/man1/%.1,html_extra/man_pages/%.1.html,$(MAN_ROFF)) |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
17 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
18 man_html: $(MAN_HTML) |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
19 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
20 html_extra/man_pages/%.1.html: ../share/man/man1/%.1 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
21 man --html=cat $< > $@ |
|
8075
08fcbdfe670b
docs: set max width for man page paragraphs to 65ch
John Rouillard <rouilj@ieee.org>
parents:
8036
diff
changeset
|
22 # set max width for paragraphs |
|
08fcbdfe670b
docs: set max width for man page paragraphs to 65ch
John Rouillard <rouilj@ieee.org>
parents:
8036
diff
changeset
|
23 sed -i '/<style/,/<\/style/s/\(p\s* { \)margin/\1max-width: 65ch; margin/' $@ |
|
8116
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
24 # add link rel=cannonical $@(F) takes |
|
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
25 # target $@ (html_extra/man_pages/x.1.html) |
|
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
26 # and returns file part (x.1.html) |
|
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
27 sed -i '/<head>/,/<\/head>/s#^<style#<link rel="canonical" href="https://www.roundup-tracker.org/docs/man_pages/$(@F)">\n<style#' $@ |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
28 #man2html $< > $@ |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
29 |
|
8096
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
30 admin_help.html: ../roundup/admin.py |
|
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
31 python3 ../roundup/scripts/roundup_admin.py htmlhelp > admin_help.py |
|
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
32 |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
33 clean: |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
34 rm -f _temp_config.txt tracker_config.txt \ |
|
8096
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
35 html_extra/man_pages/*.1.html \ |
|
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
36 admin_help.py |
