Skip to content

Commit 1555a85

Browse files
committed
typo
1 parent b5919ad commit 1555a85

File tree

4 files changed

+97
-3
lines changed

4 files changed

+97
-3
lines changed

tests/build-matrix.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
:
2+
3+
tmp="/tmp/c$$"
4+
tmp="/tmp/c0"
5+
6+
trap "rm -f ${tmp}_*; exit" 0 1 2 15
7+
8+
if true
9+
then
10+
curl -s -S https://api.cloudflare.com/ > ${tmp}_api.html
11+
ls -l ${tmp}_api.html 1>&2
12+
cp ${tmp}_api.html /tmp/api.html
13+
else
14+
cp /tmp/api.html ${tmp}_api.html
15+
fi
16+
17+
cat ${tmp}_api.html | sed -e '
18+
s/<\/br>/&\
19+
/g
20+
s/<\/h[0-9]>/&\
21+
/g' | egrep language-http |\
22+
sed -e '
23+
s/\/organization\//\/organizations\//
24+
/GET \/object\/:object_id/d
25+
s/<[^>]*>//g
26+
s/^[ ]*//
27+
s/\/:[a-z_]*\//\/:identifier\//g
28+
s/\/:[a-z_]*$/\//
29+
s/\/$//' |\
30+
awk '
31+
BEGIN {
32+
methods[1] = "GET"
33+
methods[2] = "PUT"
34+
methods[3] = "POST"
35+
methods[4] = "PATCH"
36+
methods[5] = "DELETE"
37+
}
38+
/ / {
39+
if (match(a[$2],$1)==0) {
40+
a[$2] = a[$2] " " $1
41+
}
42+
}
43+
END {
44+
for (m=1;m<=5;m++) {
45+
printf "|%-8s", "`" methods[m] "`"
46+
}
47+
printf "|%-8s|\n", "API Call"
48+
for (m=1;m<=5;m++) {
49+
printf "|%-8s", "---"
50+
}
51+
printf "|%-8s|\n", ":---"
52+
for (k in a) {
53+
for (m=1;m<=5;m++) {
54+
if (match(a[k], methods[m])) {
55+
printf "|%-8s", "`" methods[m] "`"
56+
} else {
57+
printf "|%-8s", ""
58+
}
59+
}
60+
printf "|%s|\n", k
61+
}
62+
}
63+
' | sort -t/ -k2,3
64+

tests/compare-api_v4.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:
2+
3+
tmp="/tmp/c$$"
4+
tmp="/tmp/c0"
5+
6+
# trap "rm -f ${tmp}_*; exit" 0 1 2 15
7+
8+
(sed -e 's/#.*//' | egrep setattr) < ../CloudFlare/api_v4.py | egrep -v self._unused | cut -d, -f4,5,6 | sed -e 's/^ "/\//' -e 's/", "/\/:identifier\//g' -e 's/"))$//' | sort -u > ${tmp}_1
9+
if false
10+
then
11+
curl -s -S https://api.cloudflare.com/ > ${tmp}_api.html
12+
else
13+
cp /tmp/api.html ${tmp}_api.html
14+
fi
15+
egrep 'language-http' < ${tmp}_api.html | sed -e 's/\/organization\//\/organizations\//' -e '/GET \/object\/:object_id/d' -e 's/<[^>]*>//g' -e 's/^[ ]*//' -e 's/\/:[a-z_]*\//\/:identifier\//g' -e 's/\/:[a-z_]*$/\//' -e 's/\/$//' | tee ${tmp}_3 | awk '{print $2}' | sort -u > ${tmp}_2
16+
17+
echo "< GitHUb vs > Documentation"
18+
19+
diff ${tmp}_1 ${tmp}_2
20+

tests/create-readme-rst.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
3+
import os
4+
import pypandoc
5+
6+
long_description = pypandoc.convert('README.md', 'rst')
7+
long_description = long_description.replace("\r","")
8+
with open('README.rst','w') as f:
9+
f.write(long_description)
10+

tests/test1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
def test_ips():
11-
cf = CloudFlare.CloudFlare()
12-
zones = cf.ips.get()
13-
assert zones
11+
cf = CloudFlare.CloudFlare()
12+
ips = cf.ips.get()
13+
assert ips
1414

0 commit comments

Comments
 (0)