Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
|
0ae34c8ac1 |
|
@ -42,7 +42,7 @@ Note, though, that internationalisation files for languages other than British E
|
|||
|
||||
The following severity levels are understood:
|
||||
|
||||
0. `info` things which are not actuallys fault, but issues noted during
|
||||
0. `info` things which are not actually faults, but issues noted during
|
||||
validation;
|
||||
1. `minor` things which I consider to be faults, but which
|
||||
don't actually breach the spec;
|
||||
|
|
|
@ -2,95 +2,90 @@
|
|||
{"dog_and_duck/quack/picky/constants.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, 1, null, null, null,
|
||||
null, 1, null, null, null, null, 1, null, null, null, null, null, 1,
|
||||
null, null, null, 1, null, 1, null, null, null, null, null, null,
|
||||
null, null, null, null, null, 1, null, 1, null, 1, 1, 1, 1, 1, 1,
|
||||
null, 1, null, null, null, null, 1, null, null, null, null, 1, null,
|
||||
null, null, null],
|
||||
null, null, null, null, null, 1, null, null, null, null, 1, null,
|
||||
null, null, null, null, 1, null, null, null, 1, null, 1, null, null,
|
||||
null, null, 1, null, null, null, null, null, null, null, null, null,
|
||||
null, null, 1, null, 1, null, 1, 1, 1, 1, 1, 1, null, 1, null, null,
|
||||
null, null, 1, null, null, null, null, 1, null, null, null, null, 1,
|
||||
null, null, null, null, null, 1, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, 1, null, null,
|
||||
null, 1, null],
|
||||
"dog_and_duck/quack/picky/utils.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null, 1,
|
||||
null, null, 7, null, 1, null, null, null, 0, null, 1, null, null,
|
||||
null, null, null, 0, 0, 0, 0, 0, null, 1, null, null, 0, 0, 0, null,
|
||||
null, null, null, true, null, null, 0, null, null, 1, null, null,
|
||||
null, 4, null, 1, null, null, null, 0, 0, 0, 0, null, 1, null, null,
|
||||
null, 3, 3, true, 3, null, 1, null, null, null, true, true, 45, 45,
|
||||
45, 70, 45, null, 0, 0, null, 0, 0, null, 1, null, null, null, null,
|
||||
null, null, true, 162, 66, true, 6, null, null, null, 53, null,
|
||||
null, 3, null, 1, null, null, null, null, null, null, null, null,
|
||||
220, 220, 220, 220, null, 220, null, 220, null, 220, 220, true,
|
||||
null, 0, 0, null, 53, null, null, 2, 2, null, 1, null, null, null,
|
||||
true, null, 1, null, null, null, null, null, null, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, null, 0, 0, 0, 0, 0, 0, null, 1, null, null, null, null,
|
||||
null, null, null, null, null, 0, 0, null, 0, null, 3, null, null,
|
||||
null, 3, null, 1, null, null, null, null, null, 0, null, 0, 0, null,
|
||||
null, 1, null, null, null, null, null, null, true, 53, 53, 53, 3,
|
||||
53, 53, 41, 53, 9, 53, 16, null, 0, 0, 0, 0, 0, null, null, 1, null,
|
||||
null, null, null, null, null, null, null, null, null, 1, null, null,
|
||||
7, null, 1, null, null, null, 1023, null, 1, null, null, null, true,
|
||||
null, 1, null, null, null, null, null, null, null, null, null, true,
|
||||
1023, 1023, true, true, true, 1023, 140, null, 1, null, null, true,
|
||||
408, 352, null, null, null, null, 125, 122, 70, null, null, null,
|
||||
true, null, null, 0, null, null, 1, null, null, null, 74, null, 1,
|
||||
null, null, null, 70, 70, true, 70, null, 1, null, null, null, 3, 3,
|
||||
true, 3, null, 1, null, null, null, true, 0, null, 0, 0, 16, true,
|
||||
11, 11, 11, true, 21, null, 11, null, 0, 0, null, 0, 0, null, 1,
|
||||
null, null, null, null, null, null, true, 56, 47, true, 8, null,
|
||||
null, null, 1, null, null, 1, null, 1, null, null, null, null, null,
|
||||
null, null, null, 99, 99, 99, 99, null, 99, null, 99, null, 99, 99,
|
||||
true, null, 0, 0, null, 115, null, null, 2, 2, null, 1, null, null,
|
||||
null, true, null, 1, null, null, null, null, null, null, 12, 12, 12,
|
||||
true, true, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, 0, 1, null, 1,
|
||||
null, null, null, null, null, null, null, null, null, 1, 1, null, 1,
|
||||
null, 1, null, null, null, 298, null, 1, null, null, null, null,
|
||||
null, 0, null, 0, 0],
|
||||
"dog_and_duck/quack/picky/time.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, null,
|
||||
null, 0, 0, 0, null, 0, 0, 0, 0, 0, null, 0, 0, 0, 0, 0, null, 1,
|
||||
null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, 0],
|
||||
null, null, null, null, null, 1, null, null, null, true, true, null,
|
||||
0, null, null, 0, null, null, 1, null, null, null, 0, 0, 0, null, 0,
|
||||
null, null, 0, null, null, 1, null, null, null, null, null, null, 0,
|
||||
0, 0, 0, 0],
|
||||
"dog_and_duck/quack/quack.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, 1, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, 1, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, 34, null, 34, null, 1, null, null, null, null,
|
||||
null, 4, null, 4, null, 1, null, 3, null, 3, null, 1, null, null,
|
||||
null, null, null, null, null, 0, 0, 0, 0, null, null, null, null, 1,
|
||||
null, 0, null, 0, null, 1, null, 0, null, 0, null, 1, null, null,
|
||||
null, null, null, 0, 0, 0, null, null, 1, null, null, null, null,
|
||||
null, true, true, true, true, 2, 1, null, 1, 1, true, true, 1, null,
|
||||
null, null, null, null, null, null, null, 0, 0, 0, 0, null, null, 1,
|
||||
null, null, 0, null, 1, null, null, 0, null, 1, null, null, 0, null,
|
||||
1, null, null, 2, null, null],
|
||||
"dog_and_duck/quack/picky/fault_messages.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, 1, null, 1,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null],
|
||||
null, null, null, null, 14, null, 14, null, 1, null, null, null,
|
||||
null, null, 1, null, true, null, 1, null, 3, null, 3, null, 1, null,
|
||||
null, null, null, null, null, null, 0, 0, 0, 0, null, null, null,
|
||||
null, 1, null, 0, null, 0, null, 1, null, 0, null, 0, null, 1, null,
|
||||
null, null, null, null, 0, 0, 0, null, null, 1, null, null, null,
|
||||
null, null, true, true, true, true, 2, 1, null, 1, 1, true, true, 1,
|
||||
null, null, null, null, null, null, null, null, 0, 0, 0, 0, null,
|
||||
null, 1, null, null, 0, null, 1, null, null, 0, null, 1, null, null,
|
||||
0, null, 1, null, null, 2, null, null],
|
||||
"dog_and_duck/utils/process.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, 1, null, null, null,
|
||||
null, null, null, 1, 1, 1, 1, 1, null, true, null, null, null, null,
|
||||
null, null, null, null, null, 1, null, 1, null, null, null, null,
|
||||
1],
|
||||
"clj_activitypub/internal/http_util.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, 1, 1, 1, 1,
|
||||
2, 2, 1, 1, 1, null, 1, 0, 0, null, 1, null, null, null, 0],
|
||||
"clj_activitypub/internal/thread_cache.clj":
|
||||
[null, 1, null, null, null, null, 1, null, null, 8, null, 1, 4, 4, 4,
|
||||
null, 1, null, 2, null, 2, 2, 2, 2, 2, 2, 2, 2, null, 4, 4, 4, null,
|
||||
4, 4, 2, 2, true, 2, 2, null, 0, 0, 0, 2, 2, 2, 2],
|
||||
"dog_and_duck/scratch/parser.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, 1, null, null, null, 9, 9, 9, 9, 9, true, 0, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null],
|
||||
"dog_and_duck/quack/picky/required_properties.clj":[null, 1],
|
||||
null, 1, null, null, null, 11, 11, 11, 11, 11, true, 0, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null],
|
||||
"dog_and_duck/quack/picky/scratch.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null],
|
||||
"dog_and_duck/quack/picky/control_variables.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, 1, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, 1, null, null, null, null, null,
|
||||
null, null, null],
|
||||
"clj_activitypub/core.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, 1,
|
||||
null, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, null, 1, null,
|
||||
null, null, 6, 2, 2, null, 1, 1, null, null, null, 1, 1, 1, 1, null,
|
||||
null, 1, null, 1, null, null, null, 0, null, 0, null, 0, 0, 0, 0, 0,
|
||||
0, null, 1, null, 1, 0, 0, 0, 0, 0, 0, 0, 0, null, 1, null, null, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, 1, null, null, null, 0, 0, 0, 0,
|
||||
0, 0, 0, null, 1, null, null, null, true, null, 1, null, null, null,
|
||||
null, null, 0, null, 0, 0, 0, 0, 0, null, 1, null, null, null, true,
|
||||
null, 1, 0, null, null, 0, 0, null, 1, 0, null, null, 0, 0, null, 1,
|
||||
null, null, null, 0, 0, 0, 0, 0, 0],
|
||||
"clj_activitypub/internal/crypto.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, 1, 1, null, 1, 0,
|
||||
0, null, null, 1, 0, 0, null, 1, 0, 0, null, null, 1, 0, null, 1, 0,
|
||||
0, null, 1, 0, 0, 0, 0, 0, null],
|
||||
"dog_and_duck/quack/cli.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, 1, null, null, null, 1, null, 1, null, 1,
|
||||
null, 1, null, 0, true, 1, 1, 1, null, 0, true, 1, null, 1, 1, null,
|
||||
1, null, 0, 0, 0, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, 0, null,
|
||||
1, null, 0, null, 1, null, 0, 0, null, 1, 0, null, 0, 0, 0, 0, 0, 0,
|
||||
0, null, null, 1, null, 0, 0, 0, 0, 0, null, 0, null, null, 0, 0, 0,
|
||||
null, 0, 0, 0, 0, 0, null, 0, 0, 0, null, 0, 0, 0, 0, 0, null, 1,
|
||||
null, 0, 0, 0, 0, 0, 0, null, 1, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0],
|
||||
"dog_and_duck/quack/picky.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
|
@ -98,34 +93,68 @@
|
|||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, 1, null, null, null, null, 0,
|
||||
null, 6, 6, null, 0, null, 0, null, 4, null, 1, null, null, 12, 12,
|
||||
12, 12, 9, 8, 4, null, 1, null, 0, 3, null, 0, 0, 0, 0, null, 1,
|
||||
null, null, 3, 3, 3, 3, 1, 3, 3, 3, 3, null, 1, null, null, null,
|
||||
null, 0, 0, 0, 0, 0, 0, null, null, null, 1, null, null, null, true,
|
||||
0, true, true, null, 1, null, null, null, 1, null, 1, null, null, 1,
|
||||
null, 1, 0, null, null, null, 1, null, null, 1, 1, 1, 1, null, 1, 1,
|
||||
1, 1, 1, 1, null, 1, 1, 1, 0, null, null, null, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, null, 1, null, null, null, null, null,
|
||||
null, null, 0, 0, 0, null, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0,
|
||||
0, 0, null, 1, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, 0, 0, 0, 0, 0, 0, null, null,
|
||||
null, null, null, 0, 0, 0, 0, null, null, 0, 0],
|
||||
"dog_and_duck/scratch/core.clj":
|
||||
null, 6, 6, null, 0, null, 0, null, 4, null, 1, null, null, 9, 9, 8,
|
||||
8, 7, 6, 3, null, 1, null, 0, 1, null, 0, 0, 0, 0, null, 1, null,
|
||||
null, 3, 3, 3, 3, 1, 3, 3, 3, 3, null, 1, null, null, null, null, 0,
|
||||
0, 0, 0, 0, 0, null, null, null, 1, null, null, null, true, 0, true,
|
||||
true, null, 1, null, null, null, 1, null, 1, null, null, 1, null, 1,
|
||||
0, null, null, null, 1, null, null, 1, 1, 1, 1, null, 1, 1, 1, 1, 1,
|
||||
1, null, 1, 1, 1, 0, null, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, null, 1, null, null, null, null, null, null, null,
|
||||
0, 0, 0, null, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, 3, 3, 3, 3, 12, 3, null, null, null,
|
||||
null, null, 3, true, 1, 1, null, null, true, 0],
|
||||
"dog_and_duck/quack/picky/objects.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, 1, null, null, 0],
|
||||
"clj_activitypub/webfinger.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, 1, null, 1, 1,
|
||||
null, 1, null, null, 1, 1, 1, null, 1, 1, null, 1, null, null, null,
|
||||
3, 3, 3, true, 1, true, 2, null],
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, 1, null, 0, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null, 1,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, 1, 1, true, 0, 0, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, null, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, true, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, null, null, null, null, null, 85, 85, 73, 33, true, null, 1, 1,
|
||||
1, 78, 1, 1, 76, 1, null, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, null, null, null, null, null, 70, 70, 58, 20, 8, null, 1, 1, 1,
|
||||
70, null, null, 1, 1, 1, 1, 1, 1, 1, 1, 1, true, null, true, 1, 1,
|
||||
null, null, true, 1, 1, 547, 51, null, 1, 1, true, 1, 1, true, 1, 1,
|
||||
1, 1, null, 1, 1, true, 70, null, null, 12, 12, 12, true, 1, 1, 1,
|
||||
true, 70, 0, null, null, null, null, null, null, null, null, 70, 70,
|
||||
null, 20, 8, null, 1, 1, null, null, null, 1, 1, 1, true, 1, 1, 1,
|
||||
1, 1, true, 1, 1, 1, 1, 1, 12, null, 1, 1, 1, 1, null, null, null,
|
||||
1, 1, null, 1, null, 1, 1, true, 66, null, null, 14, 14, 0, true, 1,
|
||||
1, 1, 1, 1, 1, 70, null, 12, null, 1, 1, 12, null, 1, 1, null, 1, 1,
|
||||
1, 1, 1, 1, true, null, 1, 1, true, 1, 1, null, true, 1, null, null,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 70, 1, 1, 1, null, null, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, null, 1, 1, 1, null, null,
|
||||
true, 1, 1, 1, 1, 1, true, 1, 1, 1, null, 1, 1104, 1104, 1104, 807,
|
||||
807, 21, null, 1, null, null, 1104, 1104, 1104, 1104, 283, 283, 283,
|
||||
null, 1, 549, true, 547, true, 547, 547, 547, 547, null, 1, null,
|
||||
null, null, 42, 42, 42, 41, 41, 2542, 41, 41, 549, 41, null, 1,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
42, 42, 42, 42, 3, 42, 42, 20, 42, 3, 42, 17, 42, null, 16, 16, 16,
|
||||
12, 12, null, 1, null, null, null, null, null, null, null, null, 1,
|
||||
1, true, true, 0, null, 0, null, null, 0, null, null, 1, null, null,
|
||||
null, null, 10, 10, 0, true, null, 1, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, 18, 18, 8, 0, null, null, 0, 0, 0, null, 0, 0, 7, 1, 1, null,
|
||||
1, 1, 1, 1, 17, null, 1, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, null, 0, 0, 0, 0],
|
||||
"dog_and_duck/scratch/scratch.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, 1, null, 1, 1, 1, null, null, null, null, 1, null, 1, 1,
|
||||
1, 1, null, null, 1, null, null, null, null, null, null, null, 1, 1,
|
||||
1, 1, 1, 1, null, null],
|
||||
null, null, null, null, null, 1, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null],
|
||||
"dog_and_duck/quack/picky/collections.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, 1, null, null, null, 0, 0, 0, 0, 0, 0, null, 1, null, null,
|
||||
null, 0, 0, 0, 0, 0, 0, 0, null, 1, null, 0, 0, 0, 0, 0, null, null,
|
||||
0, 0]}}
|
||||
null, 1, null, null, null, 3, 3, 3, 3, 3, 2, null, 1, null, null,
|
||||
null, 6, 6, 6, 6, 6, 6, 6, 6, null, 1, null, null, null, 2, 2, 2, 2,
|
||||
2, null, null, 2, 2],
|
||||
"dog_and_duck/quack/picky/distribution.clj":
|
||||
[null, 1, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, 1, null, null, null, null,
|
||||
null, 0, 0, 0, 0, null, null]}}
|
||||
|
|
|
@ -1 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><report><stats><packages value="17"/><methods value="2634"/><srcfiles value="17"/><srclines value="572"/></stats><data><all name="total"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="50% (1326/2634)"/><coverage type="line, %" value="53% (303/572)"/><package name="dog-and-duck.scratch.scratch"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (66/66)"/><coverage type="line, %" value="100% (17/17)"/></package><package name="clj-activitypub.internal.thread-cache"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="83% (105/126)"/><coverage type="line, %" value="88% (30/34)"/></package><package name="clj-activitypub.internal.crypto"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="19% (9/48)"/><coverage type="line, %" value="39% (9/23)"/></package><package name="dog-and-duck.quack.quack"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="47% (122/262)"/><coverage type="line, %" value="51% (25/49)"/></package><package name="clj-activitypub.webfinger"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="96% (107/112)"/><coverage type="line, %" value="89% (16/18)"/></package><package name="dog-and-duck.quack.picky"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="42% (169/406)"/><coverage type="line, %" value="59% (65/111)"/></package><package name="clj-activitypub.internal.http-util"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="74% (29/39)"/><coverage type="line, %" value="80% (12/15)"/></package><package name="dog-and-duck.quack.picky.collections"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="3% (4/133)"/><coverage type="line, %" value="17% (4/24)"/></package><package name="dog-and-duck.quack.picky.constants"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (73/73)"/><coverage type="line, %" value="100% (18/18)"/></package><package name="dog-and-duck.quack.picky.required-properties"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (1/1)"/><coverage type="line, %" value="100% (1/1)"/></package><package name="dog-and-duck.scratch.core"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="33% (2/6)"/><coverage type="line, %" value="67% (2/3)"/></package><package name="dog-and-duck.quack.picky.control-variables"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (5/5)"/><coverage type="line, %" value="100% (3/3)"/></package><package name="dog-and-duck.utils.process"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="89% (34/38)"/><coverage type="line, %" value="91% (10/11)"/></package><package name="dog-and-duck.quack.picky.utils"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="50% (479/959)"/><coverage type="line, %" value="39% (57/147)"/></package><package name="dog-and-duck.quack.picky.fault-messages"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (29/29)"/><coverage type="line, %" value="100% (3/3)"/></package><package name="dog-and-duck.scratch.parser"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="70% (21/30)"/><coverage type="line, %" value="78% (7/9)"/></package><package name="clj-activitypub.core"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="24% (71/301)"/><coverage type="line, %" value="28% (24/86)"/></package></all></data></report>
|
||||
<?xml version="1.0" encoding="UTF-8"?><report><stats><packages value="14"/><methods value="3905"/><srcfiles value="14"/><srclines value="793"/></stats><data><all name="total"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="61% (2375/3905)"/><coverage type="line, %" value="68% (538/793)"/><package name="dog-and-duck.scratch.scratch"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (3/3)"/><coverage type="line, %" value="100% (2/2)"/></package><package name="dog-and-duck.quack.picky.time"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="7% (10/135)"/><coverage type="line, %" value="22% (4/18)"/></package><package name="dog-and-duck.quack.quack"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="46% (121/262)"/><coverage type="line, %" value="49% (24/49)"/></package><package name="dog-and-duck.quack.picky"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="55% (225/406)"/><coverage type="line, %" value="66% (74/112)"/></package><package name="dog-and-duck.quack.picky.distribution"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="10% (2/20)"/><coverage type="line, %" value="33% (2/6)"/></package><package name="dog-and-duck.quack.picky.objects"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="81% (1220/1499)"/><coverage type="line, %" value="83% (278/333)"/></package><package name="dog-and-duck.quack.picky.collections"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (130/130)"/><coverage type="line, %" value="100% (25/25)"/></package><package name="dog-and-duck.quack.picky.constants"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (99/99)"/><coverage type="line, %" value="100% (23/23)"/></package><package name="dog-and-duck.quack.cli"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="12% (70/584)"/><coverage type="line, %" value="22% (20/93)"/></package><package name="dog-and-duck.quack.picky.control-variables"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (5/5)"/><coverage type="line, %" value="100% (3/3)"/></package><package name="dog-and-duck.utils.process"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="89% (34/38)"/><coverage type="line, %" value="91% (10/11)"/></package><package name="dog-and-duck.quack.picky.utils"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="63% (434/693)"/><coverage type="line, %" value="60% (65/108)"/></package><package name="dog-and-duck.quack.picky.scratch"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="100% (1/1)"/><coverage type="line, %" value="100% (1/1)"/></package><package name="dog-and-duck.scratch.parser"><coverage type="class, %" value="0% (0/1)"/><coverage type="method, %" value="0% (0/1)"/><coverage type="block, %" value="70% (21/30)"/><coverage type="line, %" value="78% (7/9)"/></package></all></data></report>
|
425
docs/cloverage/dog_and_duck/quack/cli.clj.html
Normal file
425
docs/cloverage/dog_and_duck/quack/cli.clj.html
Normal file
|
@ -0,0 +1,425 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../coverage.css"/> <title> dog_and_duck/quack/cli.clj </title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
001 (ns dog-and-duck.quack.cli
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 (:require [clojure.data.json :refer [read-str]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 [clojure.java.io :refer [resource]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 [clojure.pprint :refer [pprint]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 [clojure.string :refer [join]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 [clojure.tools.cli :refer [parse-opts]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 [clojure.walk :refer [keywordize-keys]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 [dog-and-duck.quack.picky.constants :refer [severity]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
009 [dog-and-duck.quack.picky.objects :refer [object-faults]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 [dog-and-duck.quack.picky.utils :refer [filter-severity]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 [hiccup.core :refer [html]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 [scot.weft.i18n.core :refer [get-message *config*]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
013 [trptr.java-wrapper.locale :as locale])
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
014 (:gen-class))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
015
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
016 (def ^:const stylesheet-url
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
017 ;; TODO: fix this to github pages before go live
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
018 "https://simon-brooke.github.io/dog-and-duck/style.css")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
019
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
020 (def cli-options
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021 ;; An option with a required argument
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
022 [["-i" "--input SOURCE" "The file or URL to validate"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
023 :default "standard input"]
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
024 ["-o" "--output DEST" "The file to write to, defaults to standard out"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
025 :default "standard output"]
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
026 ["-f" "--format FORMAT" "The format to output, one of `edn` `csv` `html`"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
027 :default :edn
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
028 :parse-fn #(keyword %)
|
||||
</span><br/>
|
||||
<span class="partial" title="3 out of 9 forms covered">
|
||||
029 :validate [#(#{:csv :edn :html} %) "Expect one of `edn` `csv` `html`"]]
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
030 ["-l" "--language LANG" "The ISO 639-1 code for the language to output"
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
031 :default (-> (locale/get-default) locale/to-language-tag)]
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
032 ["-s" "--severity LEVEL" "The minimum severity of faults to report"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
033 :default :info
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
034 :parse-fn #(keyword %)
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 8 forms covered">
|
||||
035 :validate [#(severity %) (join " "
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
036 (cons
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 "Expected one of"
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
038 (map name severity)))]]
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
039 ["-h" "--help"]])
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
040
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
041 (defn validate
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
042 [source]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 6 forms covered">
|
||||
043 (println (str "Reading " source))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 6 forms covered">
|
||||
044 (let [input (read-str (slurp source))]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 11 forms covered">
|
||||
045 (cond (map? input) (object-faults (keywordize-keys input))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
046 (and (coll? input)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
047 (every? map? input)) (map #(object-faults
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
048 (keywordize-keys %)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
049 input)))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
050
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
051 (defn output-csv
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
052 [faults]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 10 forms covered">
|
||||
053 (let [cols (set (reduce concat (map keys faults)))]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 15 forms covered">
|
||||
054 (with-out-str
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 9 forms covered">
|
||||
055 (println (join ", " (map name cols)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
056 (map
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 12 forms covered">
|
||||
057 #(println (join ", " (map (fn [p] (p %)) cols)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
058 faults))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
059
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
060 (defn html-header-row
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
061 [cols]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 16 forms covered">
|
||||
062 (apply vector (cons :tr (map #(vector :th (name %)) cols))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
063
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
064 (defn html-fault-row
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
065 [fault cols]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
066 (apply
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 14 forms covered">
|
||||
067 vector (cons :tr (map (fn [col] (vector :td (col fault))) cols))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
068
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
069 (defn- version-string []
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
070 (join
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
071 " "
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
072 ["dog-and-duck/quack"
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
073 (try
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 21 forms covered">
|
||||
074 (some->>
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
075 (resource "META-INF/maven/dog-and-duck/dog-and-duck/pom.properties")
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
076 slurp
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
077 (re-find #"version=(.*)")
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
078 second)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
079 (catch Exception _ nil))]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
080
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
081 (defn output-html
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
082 [faults opts]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 13 forms covered">
|
||||
083 (let [source-name (if (= (:input opts) *in*) "Standard input" (str (:input opts)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
084 title (join " " [(get-message :validation-report-for) source-name])
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 9 forms covered">
|
||||
085 cols (set (reduce concat (map keys faults)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
086 version (version-string)]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
087 (str
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
088 "<!DOCTYPE html>"
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 130 forms covered">
|
||||
089 (html
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
090 [:html
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
091 [:head
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
092 [:title title]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
093 [:meta {:name "generator" :content version}]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
094 [:link {:rel "stylesheet" :media "screen" :href stylesheet-url :type "text/css"}]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
095 [:body
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
096 [:h1 title]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 10 forms covered">
|
||||
097 [:p (join " " (remove nil? [(get-message :generated-on)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
098 (java.time.LocalDateTime/now)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
099 (get-message :by)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
100 version]))]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
101 (if-not
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
102 (empty? faults)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
103 (apply
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
104 vector
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
105 :table
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
106 (html-header-row cols)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
107 (map
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
108 #(html-fault-row % cols)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
109 faults))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
110 [:p (get-message :no-faults-found)])]]))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
111
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
112 (defn output
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
113 [content options]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 7 forms covered">
|
||||
114 (let [faults (filter-severity content (:severity options))]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
115 (spit (:output options)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
116 (case (:format options)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
117 :html (output-html faults options)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
118 :csv (output-csv faults)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 18 forms covered">
|
||||
119 (with-out-str (pprint faults))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
120
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
121 (defn -main [& args]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
122 (let [opts (parse-opts args cli-options)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 7 forms covered">
|
||||
123 options (assoc (:options opts)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
124 :input (if (= (:input (:options opts)) "standard input")
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
125 *in*
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
126 (:input (:options opts)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
127 :output (if (= (:output (:options opts)) "standard output")
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
128 *out*
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
129 (:output (:options opts))))]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
130 ;;(println options)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
131 (when (:help options)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
132 (println (:summary opts)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
133 (when (:errors opts)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
134 (println (:errors opts)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 13 forms covered">
|
||||
135 (when-not (or (:help options) (:errors options))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 16 forms covered">
|
||||
136 (binding [*config* (assoc *config* :default-language (:language options))]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
137 (output
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
138 (validate (:input options))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
139 options)))))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
|
@ -104,31 +104,31 @@
|
|||
033 [dog-and-duck.quack.picky.constants :refer [actor-types]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 [dog-and-duck.quack.picky.utils :refer [any-or-faults
|
||||
034 [dog-and-duck.quack.picky.objects :refer [coll-object-reference-or-fault
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
035 coll-object-reference-or-fault
|
||||
035 object-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
036 concat-non-empty
|
||||
036 object-reference-or-faults]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 has-activity-type?
|
||||
037 [dog-and-duck.quack.picky.utils :refer [any-or-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 has-actor-type? has-type?
|
||||
038 concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
039 has-type-or-fault
|
||||
039 has-activity-type?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
040 make-fault-object
|
||||
040 has-actor-type? has-type?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
041 object-faults
|
||||
041 has-type-or-fault
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
042 object-reference-or-faults
|
||||
042 make-fault-object
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
043 string-or-fault]])
|
||||
|
@ -628,134 +628,137 @@
|
|||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
208 [x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
209 (concat-non-empty (persistent-object-faults x)
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
209 (concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
210 (activity-type-faults x)
|
||||
210 (persistent-object-faults x)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
211 (activity-type-faults x)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
211 (list
|
||||
212 (list
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
212 (when-not
|
||||
213 (when-not
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
213 (has-activity-type? x)
|
||||
214 (has-activity-type? x)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
214 (make-fault-object :must :not-activity-type))
|
||||
215 (make-fault-object :must :not-activity-type))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 12 forms covered">
|
||||
215 (when-not (string? (:summary x)) (make-fault-object :should :no-summary)))))
|
||||
216 (when-not (string? (:summary x)) (make-fault-object :should :no-summary)))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
216
|
||||
217
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
217 (defn collection-faults
|
||||
218 (defn collection-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
218 "Return a list of faults found in the collection `x`; if `type` is also
|
||||
219 "Return a list of faults found in the collection `x`; if `type` is also
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
219 specified, it should be a string naming a specific collection type for
|
||||
220 specified, it should be a string naming a specific collection type for
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
220 which checks should be performed.
|
||||
221 which checks should be performed.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
221
|
||||
222
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
222 Every collection *should*(?) have a `totalItems` field (an integer).
|
||||
223 Every collection *should*(?) have a `totalItems` field (an integer).
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
223
|
||||
224
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
224 Beyond that, collections are either 'just collections' (in which case
|
||||
225 Beyond that, collections are either 'just collections' (in which case
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
225 they *should* have an `items` field (a sequence)), or else they're paged
|
||||
226 they *should* have an `items` field (a sequence)), or else they're paged
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
226 collections, in which case they *must*(?) have a `first` field which is
|
||||
227 collections, in which case they *must*(?) have a `first` field which is
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
227 a collection page or a URI pointing to a collection page, and *should*
|
||||
228 a collection page or a URI pointing to a collection page, and *should*
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
228 have a `last` field which is similar.
|
||||
229 have a `last` field which is similar.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
229
|
||||
230
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
230 The pages of collections *should* be collection pages; the pages of
|
||||
231 The pages of collections *should* be collection pages; the pages of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
231 ordered collections *should* be ordered collection pages."
|
||||
232 ordered collections *should* be ordered collection pages."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
232 ([x]
|
||||
233 ([x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
233 (collection-faults
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
234 (collection-faults
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
234 x
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
235 x
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
235 (first
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
236 (first
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
236 (remove nil?
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
237 (remove nil?
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 10 forms covered">
|
||||
237 (map #(when (has-type? x %) %)
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
238 (map #(when (has-type? x %) %)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
238 ["Collection"
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
239 ["Collection"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
239 "OrderedCollection"
|
||||
240 "OrderedCollection"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
240 "CollectionPage"
|
||||
241 "CollectionPage"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
241 "OrderedCollectionPage"])))))
|
||||
242 "OrderedCollectionPage"])))))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
242 ([x type]
|
||||
243 ([x type]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
243 ;; (log/info "collection-faults called with argumens " x ", " type)
|
||||
244 ;; (log/info "collection-faults called with argumens " x ", " type)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
244 (case type
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
245 (case type
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
245 ("Collection" "OrderedCollection") (any-or-faults
|
||||
<span class="partial" title="6 out of 8 forms covered">
|
||||
246 ("Collection" "OrderedCollection") (any-or-faults
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 12 forms covered">
|
||||
246 (list (simple-collection-faults x type)
|
||||
<span class="covered" title="12 out of 12 forms covered">
|
||||
247 (list (simple-collection-faults x type)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
247 (paged-collection-faults x type))
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
248 (paged-collection-faults x type))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
248 :must
|
||||
249 :must
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
249 :no-items)
|
||||
250 :no-items)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
250 ("CollectionPage" "OrderedCollectionPage") (collection-page-faults x type)
|
||||
<span class="partial" title="4 out of 8 forms covered">
|
||||
251 ("CollectionPage" "OrderedCollectionPage") (collection-page-faults x type)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 6 forms covered">
|
||||
251 (list (make-fault-object :critical :expected-collection)))))
|
||||
252 (list (make-fault-object :critical :expected-collection)))))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
001 (ns dog-and-duck.quack.picky.collections
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 (:require [dog-and-duck.quack.picky.utils :refer [concat-non-empty
|
||||
002 (:require [dog-and-duck.quack.picky.objects :refer [object-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 cond-make-fault-object
|
||||
003 object-reference-or-faults]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 object-faults
|
||||
004 [dog-and-duck.quack.picky.utils :refer [concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 object-reference-or-faults]]))
|
||||
005 cond-make-fault-object]]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
006
|
||||
|
@ -85,23 +85,23 @@
|
|||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
027 [x type]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
028 (concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
029 (object-faults x type)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
030 (list (object-reference-or-faults x type :critical :expected-collection)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 11 forms covered">
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
031 (cond-make-fault-object (integer? (:totalItems x)) :should :no-total-items)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
032 (object-reference-or-faults (:first x) nil :must :no-first-page)
|
||||
<span class="covered" title="11 out of 11 forms covered">
|
||||
032 (object-reference-or-faults (:first x) (str type "Page") :must :no-first-page)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
033 (object-reference-or-faults (:last x) nil :should :no-last-page))))
|
||||
<span class="covered" title="11 out of 11 forms covered">
|
||||
033 (object-reference-or-faults (:last x) (str type "Page") :should :no-last-page))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
034
|
||||
|
@ -118,62 +118,71 @@
|
|||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 [x type]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
039 (concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
040 (object-faults x type)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
041 (cons
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
041 (concat
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
042 (list (object-reference-or-faults x type :critical :expected-collection)
|
||||
<span class="covered" title="11 out of 11 forms covered">
|
||||
042 (list (cond-make-fault-object (integer? (:totalItems x)) :should :no-total-items)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 11 forms covered">
|
||||
043 (cond-make-fault-object (integer? (:totalItems x)) :should :no-total-items)
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
043 (cond-make-fault-object (coll? (:items x)) :must :no-items-collection))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 11 forms covered">
|
||||
044 (cond-make-fault-object (coll? (:items x)) :must :no-items-collection))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 12 forms covered">
|
||||
045 (map #(object-reference-or-faults % nil :must :not-object-reference) (:items x)))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
046
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
044 (reduce
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
047 (defn collection-page-faults
|
||||
045 concat
|
||||
</span><br/>
|
||||
<span class="covered" title="12 out of 12 forms covered">
|
||||
046 (map #(object-reference-or-faults % nil :must :not-object-reference) (:items x))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
047
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
048 (defn collection-page-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 [x type]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
049 (concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
050 (simple-collection-faults x type)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
051 (list
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 7 forms covered">
|
||||
052 (object-reference-or-faults (:partOf x)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 7 forms covered">
|
||||
053 (apply str (drop-last 4 type))
|
||||
049 "Return a list of faults found in `x` considered as a collection page
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
054 :should
|
||||
050 object of this sub-`type`, or `nil` if none are found."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
055 :n-part-of)
|
||||
051 [x type]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
056 (object-reference-or-faults (:next x) type :minor :no-next-page)
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
052 (concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
057 (object-reference-or-faults (:prev x) type :minor :no-prev-page))))
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
053 (simple-collection-faults x type)
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
054 (list
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
055 (object-reference-or-faults (:partOf x)
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
056 (apply str (drop-last 4 type))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057 :should
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
058 :n-part-of)
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
059 (object-reference-or-faults (:next x) type :minor :no-next-page)
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
060 (object-reference-or-faults (:prev x) type :minor :no-prev-page))))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -68,178 +68,289 @@
|
|||
021 "The URI of the context of an ActivityStreams object is expected to be this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 literal string."
|
||||
022 literal string.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
023 "https://www.w3.org/ns/activitystreams")
|
||||
023
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 **NOTE THAT** the URI actually used in the published suite of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
025 activitystreams-test-documents use this URI with 'http' rather than
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
026 'https' as the property part, but the spec itself specifies 'https'."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
027 "https://www.w3.org/ns/activitystreams")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
024
|
||||
028
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
025 (def ^:const actor-types
|
||||
029 (def ^:const actor-types
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
026 "The set of types we will accept as actors.
|
||||
030 "The set of types we will accept as actors.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
027
|
||||
031
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
028 There's an [explicit set of allowed actor types]
|
||||
032 There's an [explicit set of allowed actor types]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
029 (https://www.w3.org/TR/activitystreams-vocabulary/#actor-types)."
|
||||
033 (https://www.w3.org/TR/activitystreams-vocabulary/#actor-types)."
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
030 #{"Application"
|
||||
034 #{"Application"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 "Group"
|
||||
035 "Group"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
032 "Organization"
|
||||
036 "Organization"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
033 "Person"
|
||||
037 "Person"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 "Service"})
|
||||
038 "Service"})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
035
|
||||
039
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
036 (def ^:const context-key
|
||||
040 (def ^:const context-key
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 "The Clojure reader barfs on `:@context`, although it is in principle a valid
|
||||
041 "The Clojure reader barfs on `:@context`, although it is in principle a valid
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 keyword. So we'll make it once, here, to make the code more performant and
|
||||
042 keyword. So we'll make it once, here, to make the code more performant and
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
039 easier to read."
|
||||
043 easier to read."
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
040 (keyword "@context"))
|
||||
044 (keyword "@context"))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
041
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
042 (def ^:const severity
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
043 "Severity of faults found, as follows:
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
044
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
045 0. `:info` not actually a fault, but an issue noted during validation;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
046 1. `:minor` things which I consider to be faults, but which
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 don't actually breach the spec;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 2. `:should` instances where the spec says something SHOULD
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 be done, which isn't;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
050 3. `:must` instances where the spec says something MUST
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
051 be done, which isn't;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
052 4. `:critical` instances where I believe the fault means that
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053 the object cannot be meaningfully processed."
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
054 #{:info :minor :should :must :critical})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
055
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
056 (def ^:const severity-filters
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057 "Hack for implementing a severity hierarchy"
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
058 {:all #{}
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
059 :info #{}
|
||||
045
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
060 :minor #{:info}
|
||||
046 (def ^:const re-rfc5646
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
061 :should #{:info :minor}
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 "A regex which tests conformity to RFC 5646. Cribbed from
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
062 :must #{:info :minor :should}
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 https://newbedev.com/regex-to-detect-locales"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 #"^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
050
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
063 :critical severity})
|
||||
051 (def ^:const severity
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
052 "Severity of faults found, as follows:
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
054 0. `:info` not actually a fault, but an issue noted during validation;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
055 1. `:minor` things which I consider to be faults, but which
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
056 don't actually breach the spec;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057 2. `:should` instances where the spec says something SHOULD
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
058 be done, which isn't;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
059 3. `:must` instances where the spec says something MUST
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
060 be done, which isn't;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
061 4. `:critical` instances where I believe the fault means that
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
062 the object cannot be meaningfully processed."
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
063 #{:info :minor :should :must :critical})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
064
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
065 (def ^:const validation-fault-context-uri
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
065 (def ^:const severity-filters
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
066 "The URI of the context of a validation fault report object shall be this
|
||||
066 "Hack for implementing a severity hierarchy"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
067 literal string."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
068 "https://simon-brooke.github.io/dog-and-duck/codox/Validation_Faults.html")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
069
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
067 {:all #{}
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
070 (def ^:const verb-types
|
||||
068 :info #{}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
071 "The set of types we will accept as verbs.
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
069 :minor #{:info}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
072
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
070 :should #{:info :minor}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
073 There's an [explicit set of allowed verb types]
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
071 :must #{:info :minor :should}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
074 (https://www.w3.org/TR/activitystreams-vocabulary/#activity-types)."
|
||||
</span><br/>
|
||||
<span class="covered" title="29 out of 29 forms covered">
|
||||
075 #{"Accept" "Add" "Announce" "Arrive" "Block" "Create" "Delete" "Dislike"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
076 "Flag" "Follow" "Ignore" "Invite" "Join" "Leave" "Like" "Listen" "Move"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
077 "Offer" "Question" "Reject" "Read" "Remove" "TentativeAccept"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
078 "TentativeReject" "Travel" "Undo" "Update" "View"})
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
072 :critical #{:info :minor :should :must}})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
079
|
||||
073
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
074 (def ^:const validation-fault-context-uri
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
075 "The URI of the context of a validation fault report object shall be this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
076 literal string."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
077 "https://simon-brooke.github.io/dog-and-duck/codox/Validation_Faults.html")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
078
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
079 (def ^:const activity-types
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
080 "The set of types we will accept as activities.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
081
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
082 There's an [explicit set of allowed activity types]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
083 (https://www.w3.org/TR/activitystreams-vocabulary/#activity-types)."
|
||||
</span><br/>
|
||||
<span class="covered" title="29 out of 29 forms covered">
|
||||
084 #{"Accept" "Add" "Announce" "Arrive" "Block" "Create" "Delete" "Dislike"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
085 "Flag" "Follow" "Ignore" "Invite" "Join" "Leave" "Like" "Listen" "Move"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
086 "Offer" "Question" "Reject" "Read" "Remove" "TentativeAccept"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
087 "TentativeReject" "Travel" "Undo" "Update" "View"})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
088
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
089 (def ^:const noun-types
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
090 "The set of object types we will accept as nouns.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
091
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
092 There's an [explicit set of allowed 'object types']
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
093 (https://www.w3.org/TR/activitystreams-vocabulary/#object-types), but by
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
094 implication it is not exhaustive."
|
||||
</span><br/>
|
||||
<span class="covered" title="16 out of 16 forms covered">
|
||||
095 #{"Article"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
096 "Audio"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
097 "Document"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
098 "Event"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
099 "Image"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
100 "Link"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
101 "Mention"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
102 "Note"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
103 "Object"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
104 "Page"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
105 "Place"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
106 "Profile"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
107 "Relationsip"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
108 "Tombstone"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
109 "Video"})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
110
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
111 (def ^:const implicit-noun-types
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
112 "These types are not explicitly listed in [Section 3.3 of the spec]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
113 (https://www.w3.org/TR/activitystreams-vocabulary/#object-types), but are
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
114 mentioned in narrative"
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
115 #{"Link"})
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
116
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/distribution.clj </title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
001 (ns dog-and-duck.quack.picky.distribution)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
002
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 ;;; Copyright (C) Simon Brooke, 2022
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
004
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 ;;; This program is free software; you can redistribute it and/or
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 ;;; modify it under the terms of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 ;;; as published by the Free Software Foundation; either version 2
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 ;;; of the License, or (at your option) any later version.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
009
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 ;;; This program is distributed in the hope that it will be useful,
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
013 ;;; GNU General Public License for more details.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
014
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
015 ;;; You should have received a copy of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
016 ;;; along with this program; if not, write to the Free Software
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
017 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
018
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
019 (defn distribution
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
020 "Distribution of values of function `f` when applied to `vals`.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 I *know* there's a library function that does this, probably better, but I
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
023 don't remember what it's called!"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 [f vals]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
025 (loop [result {} values vals]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
026 (if (empty? values) result
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 9 forms covered">
|
||||
027 (let [r (apply f (list (first values)))]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
028 (recur
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
029 (assoc result r (if (result r) (inc (result r)) 1))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
030 (rest values))))))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
1574
docs/cloverage/dog_and_duck/quack/picky/objects.clj.html
Normal file
1574
docs/cloverage/dog_and_duck/quack/picky/objects.clj.html
Normal file
File diff suppressed because it is too large
Load diff
167
docs/cloverage/dog_and_duck/quack/picky/scratch.clj.html
Normal file
167
docs/cloverage/dog_and_duck/quack/picky/scratch.clj.html
Normal file
|
@ -0,0 +1,167 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/scratch.clj </title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
001 (ns dog-and-duck.quack.picky.scratch
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 "Development scratchpad"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 (:require [clojure.data.json :refer [read-str]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 [clojure.java.io :refer [file]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 [clojure.walk :refer [keywordize-keys]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 [dog-and-duck.quack.picky.distribution :refer [distribution]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 [dog-and-duck.quack.picky.objects :refer
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 [object-faults properties-faults]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
009 [dog-and-duck.quack.picky.utils :refer [concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 filter-severity]]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
011
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 ;; (def files (filter
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
013 ;; #(and (.isFile %) (.endsWith (.getName %) ".json"))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
014 ;; (file-seq (file "resources/activitystreams-test-documents"))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
015
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
016 ;; (def r
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
017 ;; (reduce
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
018 ;; concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
019 ;; (map
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
020 ;; #(try
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021 ;; (let [contents (read-str (slurp %))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 ;; faults (cond (map? contents) (filter-severity
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
023 ;; (object-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 ;; (keywordize-keys contents))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
025 ;; :should)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
026 ;; ;; (coll? contents) (apply
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
027 ;; ;; concat-non-empty
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
028 ;; ;; (map (fn [obj]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
029 ;; ;; (object-faults
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
030 ;; ;; (keywordize-keys obj)))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 ;; ;; contents))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
032 ;; )]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
033 ;; (map (fn [f] (assoc f :document (.getName %))) faults))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 ;; (catch Exception any
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
035 ;; [(.getName %) (str "Exception "
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
036 ;; (.getName (.getClass any))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 ;; ": "
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 ;; (.getMessage any))]))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
039 ;; (filter
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
040 ;; #(and (.isFile %) (.endsWith (.getName %) ".json"))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
041 ;; (file-seq (file "resources/activitystreams-test-documents"))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
042
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
043 ;; (count (filter-severity (object-faults (keywordize-keys (read-str (slurp "resources/activitystreams-test-documents/vocabulary-ex189-jsonld.json")))) :critical))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
044
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
045 ;; (count (filter
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
046 ;; #(and (.isFile %) (.endsWith (.getName %) ".json"))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 ;; (file-seq (file "resources/activitystreams-test-documents"))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
048
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 ;; (count r)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
050 ;; (last r)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
051 ;; (clojure.pprint/pprint (last r))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
052
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053 ;; (distribution :fault r)
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
206
docs/cloverage/dog_and_duck/quack/picky/time.clj.html
Normal file
206
docs/cloverage/dog_and_duck/quack/picky/time.clj.html
Normal file
|
@ -0,0 +1,206 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../../coverage.css"/> <title> dog_and_duck/quack/picky/time.clj </title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
001 (ns dog-and-duck.quack.picky.time
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 "Time, gentleman, please! Recognising and validating date time values."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 (:require [dog-and-duck.quack.picky.utils :refer [cond-make-fault-object
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 make-fault-object
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 truthy?]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 [scot.weft.i18n.core :refer [get-message]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 [taoensso.timbre :refer [warn error]])
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 (:import [java.time LocalDateTime]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
009 [java.time.format DateTimeFormatter DateTimeParseException]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 [javax.xml.datatype DatatypeFactory]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
011
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 ;;; Copyright (C) Simon Brooke, 2023
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
013
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
014 ;;; This program is free software; you can redistribute it and/or
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
015 ;;; modify it under the terms of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
016 ;;; as published by the Free Software Foundation; either version 2
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
017 ;;; of the License, or (at your option) any later version.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
018
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
019 ;;; This program is distributed in the hope that it will be useful,
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
020 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 ;;; GNU General Public License for more details.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
023
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 ;;; You should have received a copy of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
025 ;;; along with this program; if not, write to the Free Software
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
026 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
027
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
028 (defn xsd-date-time?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
029 "Return `true` if `value` matches the pattern for an
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
030 [xsd:dateTime](https://www.w3.org/TR/xmlschema11-2/#dateTime), else `false`"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 [^String value]
|
||||
</span><br/>
|
||||
<span class="partial" title="1 out of 3 forms covered">
|
||||
032 (try
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 6 forms covered">
|
||||
033 (if (LocalDateTime/from (.parse DateTimeFormatter/ISO_DATE_TIME value)) true false)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 (catch DateTimeParseException _
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 20 forms covered">
|
||||
035 (warn (get-message :bad-date-time) ":" value)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
036 false)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 (catch Exception e
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 18 forms covered">
|
||||
038 (error "Exception thrown while parsing date" value e)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
039 false)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
040
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
041 (defn xsd-duration?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
042 "Return `true` if `value` matches the pattern for an
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
043 [xsd:duration](https://www.w3.org/TR/xmlschema11-2/#duration), else `false`"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
044 [value]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
045 (truthy?
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 10 forms covered">
|
||||
046 (and (string? value)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
047 (try (.newDuration (DatatypeFactory/newInstance) value)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 (catch IllegalArgumentException _
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 20 forms covered">
|
||||
049 (warn (get-message :bad-duration) ":" value)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
050 false)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
051 (catch Exception e
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 18 forms covered">
|
||||
052 (error "Exception thrown while parsing duration" value e)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053 false)))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
054
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
055 (defn date-time-property-or-fault
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
056 "If the value of this `property` of object `x` is a valid xsd:dateTime
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057 value, return a fault object with this `token` and `severity`.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
058
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
059 If `required?` is false and there is no such property, no fault will be
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
060 returned."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
061 [x property severity token required?]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
062 (let [value (property x)]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 11 forms covered">
|
||||
063 (if (and required? (not (x property)))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
064 (make-fault-object severity token)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
065 (cond-make-fault-object
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 10 forms covered">
|
||||
066 (and value (xsd-date-time? value)) severity token))))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load diff
|
@ -62,460 +62,463 @@
|
|||
019 [dog-and-duck.quack.picky.control-variables :refer [*reject-severity*]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
020 [dog-and-duck.quack.picky.utils :refer [filter-severity object-faults]])
|
||||
020 [dog-and-duck.quack.picky.objects :refer [object-faults]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021 [dog-and-duck.quack.picky.utils :refer [filter-severity]])
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
021
|
||||
022
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 (:import [java.net URI URISyntaxException]))
|
||||
023 (:import [java.net URI URISyntaxException]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
023
|
||||
024
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 ;;; Copyright (C) Simon Brooke, 2022
|
||||
025 ;;; Copyright (C) Simon Brooke, 2022
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
025
|
||||
026
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
026 ;;; This program is free software; you can redistribute it and/or
|
||||
027 ;;; This program is free software; you can redistribute it and/or
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
027 ;;; modify it under the terms of the GNU General Public License
|
||||
028 ;;; modify it under the terms of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
028 ;;; as published by the Free Software Foundation; either version 2
|
||||
029 ;;; as published by the Free Software Foundation; either version 2
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
029 ;;; of the License, or (at your option) any later version.
|
||||
030 ;;; of the License, or (at your option) any later version.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
030
|
||||
031
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 ;;; This program is distributed in the hope that it will be useful,
|
||||
032 ;;; This program is distributed in the hope that it will be useful,
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
032 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
033 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
033 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
034 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 ;;; GNU General Public License for more details.
|
||||
035 ;;; GNU General Public License for more details.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
035
|
||||
036
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
036 ;;; You should have received a copy of the GNU General Public License
|
||||
037 ;;; You should have received a copy of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 ;;; along with this program; if not, write to the Free Software
|
||||
038 ;;; along with this program; if not, write to the Free Software
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
039 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
039
|
||||
040
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
040 (defn object?
|
||||
041 (defn object?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
041 "Returns `true` iff `x` is recognisably an ActivityStreams object.
|
||||
042 "Returns `true` iff `x` is recognisably an ActivityStreams object.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
042
|
||||
043
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
043 **NOTE THAT** The ActivityStreams spec
|
||||
044 **NOTE THAT** The ActivityStreams spec
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
044 [says](https://www.w3.org/TR/activitystreams-core/#object):
|
||||
045 [says](https://www.w3.org/TR/activitystreams-core/#object):
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
045
|
||||
046
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
046 > All properties are optional (including the id and type)
|
||||
047 > All properties are optional (including the id and type)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047
|
||||
048
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 But we are *just not having that*, because otherwise we're flying blind.
|
||||
049 But we are *just not having that*, because otherwise we're flying blind.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 We *shall* reject objects lacking at least `:type`. Missing `:id` keys are
|
||||
050 We *shall* reject objects lacking at least `:type`. Missing `:id` keys are
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
050 tolerable because they represent transient objects, which we expect to
|
||||
051 tolerable because they represent transient objects, which we expect to
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
051 handle.
|
||||
052 handle.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
052
|
||||
053
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053 **NOTE THAT** The ActivityPub spec [says](https://www.w3.org/TR/activitypub/#obj)
|
||||
054 **NOTE THAT** The ActivityPub spec [says](https://www.w3.org/TR/activitypub/#obj)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
054
|
||||
055
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
055 > Implementers SHOULD include the ActivityPub context in their object
|
||||
056 > Implementers SHOULD include the ActivityPub context in their object
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
056 > definitions
|
||||
057 > definitions
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057
|
||||
058
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
058 but in samples found in the wild they typically don't."
|
||||
059 but in samples found in the wild they typically don't."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
059 ([x]
|
||||
060 ([x]
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
060 (object? x *reject-severity*))
|
||||
061 (object? x *reject-severity*))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
061 ([x severity]
|
||||
062 ([x severity]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
062 (empty? (filter-severity (object-faults x) severity))))
|
||||
063 (empty? (filter-severity (object-faults x) severity))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
063
|
||||
064
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
064 (defn persistent-object?
|
||||
065 (defn persistent-object?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
065 "`true` iff `x` is a persistent object.
|
||||
066 "`true` iff `x` is a persistent object.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
066
|
||||
067
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
067 Transient objects in ActivityPub are not required to have an `id` key, but persistent
|
||||
068 Transient objects in ActivityPub are not required to have an `id` key, but persistent
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
068 ones must have a key, and it must be an IRI (but normally a URI)."
|
||||
069 ones must have a key, and it must be an IRI (but normally a URI)."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
069 ([x]
|
||||
070 ([x]
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
070 (persistent-object? x *reject-severity*))
|
||||
071 (persistent-object? x *reject-severity*))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
071 ([x severity]
|
||||
072 ([x severity]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
072 (empty? (filter-severity (persistent-object-faults x) severity))))
|
||||
<span class="partial" title="7 out of 8 forms covered">
|
||||
073 (empty? (filter-severity (persistent-object-faults x) severity))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
073
|
||||
074
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
074 (defn actor?
|
||||
075 (defn actor?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
075 "Returns `true` if `x` quacks like an actor, else false."
|
||||
076 "Returns `true` if `x` quacks like an actor, else false."
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
076 ([x] (actor? x *reject-severity*))
|
||||
077 ([x] (actor? x *reject-severity*))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
077 ([x severity]
|
||||
078 ([x severity]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
078 (empty? (filter-severity (actor-faults x) severity))))
|
||||
079 (empty? (filter-severity (actor-faults x) severity))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
079
|
||||
080
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
080 (defn actor-or-uri?
|
||||
081 (defn actor-or-uri?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
081 "`true` if `x` is either a URI or an actor.
|
||||
082 "`true` if `x` is either a URI or an actor.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
082
|
||||
083
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
083 **TODO**: I need to decide about whether to reify referenced objects
|
||||
084 **TODO**: I need to decide about whether to reify referenced objects
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
084 before validation or after. After reification, every reference to an actor
|
||||
085 before validation or after. After reification, every reference to an actor
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
085 *must be* to an actor object, but before, may only be to a URI pointing to
|
||||
086 *must be* to an actor object, but before, may only be to a URI pointing to
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
086 one."
|
||||
087 one."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
087 [x]
|
||||
088 [x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
088 (try
|
||||
089 (try
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
089 (and
|
||||
090 (and
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 9 forms covered">
|
||||
090 (cond (string? x) (uri? (URI. x))
|
||||
091 (cond (string? x) (uri? (URI. x))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
091 :else (actor? x))
|
||||
092 :else (actor? x))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
092 true)
|
||||
093 true)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
093 (catch URISyntaxException _ false)
|
||||
094 (catch URISyntaxException _ false)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
094 (catch NullPointerException _ false)))
|
||||
095 (catch NullPointerException _ false)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
095
|
||||
096
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
096 (defn activity?
|
||||
097 (defn activity?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
097 "`true` iff `x` quacks like an activity, else false."
|
||||
098 "`true` iff `x` quacks like an activity, else false."
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
098 ([x] (activity? x *reject-severity*))
|
||||
099 ([x] (activity? x *reject-severity*))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
099 ([x severity]
|
||||
100 ([x severity]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
100 (empty? (filter-severity (activity-faults x) severity))))
|
||||
101 (empty? (filter-severity (activity-faults x) severity))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
101
|
||||
102
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
102 (defn link?
|
||||
103 (defn link?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
103 "`true` iff `x` quacks like a link, else false."
|
||||
104 "`true` iff `x` quacks like a link, else false."
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
104 ([x] (link? x *reject-severity*))
|
||||
105 ([x] (link? x *reject-severity*))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
105 ([x severity]
|
||||
106 ([x severity]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
106 (empty? (filter-severity (link-faults x) severity))))
|
||||
107 (empty? (filter-severity (link-faults x) severity))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
107
|
||||
108
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
108 (defn link-or-uri?
|
||||
109 (defn link-or-uri?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
109 "`true` iff `x` is either a URI or a link, else false.
|
||||
110 "`true` iff `x` is either a URI or a link, else false.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
110
|
||||
111
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
111 There are several points in the specification where e.g. the `:image`
|
||||
112 There are several points in the specification where e.g. the `:image`
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
112 property (if present) may be either a link or a URI."
|
||||
113 property (if present) may be either a link or a URI."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
113 [x]
|
||||
114 [x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
114 (and
|
||||
115 (and
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 9 forms covered">
|
||||
115 (cond (string? x) (uri? (URI. x))
|
||||
116 (cond (string? x) (uri? (URI. x))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
116 :else (link? x))
|
||||
117 :else (link? x))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
117 true))
|
||||
118 true))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
118
|
||||
119
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
119 (defn collection?
|
||||
120 (defn collection?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
120 "`true` iff `x` quacks like a collection of type `object-type`, else `false`.
|
||||
121 "`true` iff `x` quacks like a collection of type `object-type`, else `false`.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
121
|
||||
122
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
122 With one argument, will recognise plain collections and ordered collections,
|
||||
123 With one argument, will recognise plain collections and ordered collections,
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
123 but (currently) not collection pages."
|
||||
124 but (currently) not collection pages."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
124 ([x ^String object-type]
|
||||
125 ([x ^String object-type]
|
||||
</span><br/>
|
||||
<span class="partial" title="10 out of 11 forms covered">
|
||||
125 (let [items (or (:items x) (:orderedItems x))]
|
||||
126 (let [items (or (:items x) (:orderedItems x))]
|
||||
</span><br/>
|
||||
<span class="partial" title="14 out of 17 forms covered">
|
||||
126 (and
|
||||
127 (and
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 6 forms covered">
|
||||
127 (cond
|
||||
128 (cond
|
||||
</span><br/>
|
||||
<span class="partial" title="3 out of 8 forms covered">
|
||||
128 (:items x) (nil? (:orderedItems x))
|
||||
129 (:items x) (nil? (:orderedItems x))
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
129 (:orderedItems x) (nil? (:items x)) ;; can't have both properties
|
||||
130 (:orderedItems x) (nil? (:items x)) ;; can't have both properties
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
130 (integer? (:totalItems x)) true ;; can have neither, provided it has totalItems.
|
||||
131 (integer? (:totalItems x)) true ;; can have neither, provided it has totalItems.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
131 :else false)
|
||||
132 :else false)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
132 (object? x)
|
||||
133 (object? x)
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
133 (= (:type x) object-type)
|
||||
134 (= (:type x) object-type)
|
||||
</span><br/>
|
||||
<span class="partial" title="2 out of 3 forms covered">
|
||||
134 (if items
|
||||
135 (if items
|
||||
</span><br/>
|
||||
<span class="partial" title="10 out of 12 forms covered">
|
||||
135 (and (coll? items)
|
||||
136 (and (coll? items)
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
136 (every? object? items) ;; if there are items, they must form a
|
||||
137 (every? object? items) ;; if there are items, they must form a
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
137 ;; collection of objects.
|
||||
138 ;; collection of objects.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
138 true)
|
||||
139 true)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
139 true) ;; but it's OK if there aren't.
|
||||
140 true) ;; but it's OK if there aren't.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
140 true)
|
||||
141 true)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
141 ;; test for totalItems not done here, because collection pages don't
|
||||
142 ;; test for totalItems not done here, because collection pages don't
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
142 ;; have it.
|
||||
143 ;; have it.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
143 ))
|
||||
144 ))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
144 ([x]
|
||||
145 ([x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 9 forms covered">
|
||||
145 (and
|
||||
146 (and
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 10 forms covered">
|
||||
146 (or (collection? x "Collection")
|
||||
147 (or (collection? x "Collection")
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
147 (collection? x "OrderedCollection"))
|
||||
148 (collection? x "OrderedCollection"))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
148 (integer? (:totalItems x))
|
||||
149 (integer? (:totalItems x))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
149 true)))
|
||||
150 true)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
150
|
||||
151
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
151 (defn unordered-collection?
|
||||
152 (defn unordered-collection?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
152 "`true` iff `x` quacks like an unordered collection, else `false`."
|
||||
153 "`true` iff `x` quacks like an unordered collection, else `false`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
153 [x]
|
||||
154 [x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 18 forms covered">
|
||||
154 (and (collection? x "Collection") (integer? (:totalItems x)) true))
|
||||
155 (and (collection? x "Collection") (integer? (:totalItems x)) true))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
155
|
||||
156
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
156 (defn ordered-collection?
|
||||
157 (defn ordered-collection?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
157 "`true` iff `x` quacks like an ordered collection, else `false`."
|
||||
158 "`true` iff `x` quacks like an ordered collection, else `false`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
158 [x]
|
||||
159 [x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 18 forms covered">
|
||||
159 (and (collection? x "OrderedCollection") (integer? (:totalItems x)) true))
|
||||
160 (and (collection? x "OrderedCollection") (integer? (:totalItems x)) true))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
160
|
||||
161
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
161 (defn collection-page?
|
||||
162 (defn collection-page?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
162 "`true` iff `x` quacks like a page in a paged collection, else `false`."
|
||||
163 "`true` iff `x` quacks like a page in a paged collection, else `false`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
163 [x]
|
||||
164 [x]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
164 (collection? x "CollectionPage"))
|
||||
165 (collection? x "CollectionPage"))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
165
|
||||
166
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
166 (defn ordered-collection-page?
|
||||
167 (defn ordered-collection-page?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
167 "`true` iff `x` quacks like a page in an ordered paged collection, else `false`."
|
||||
168 "`true` iff `x` quacks like a page in an ordered paged collection, else `false`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
168 [x]
|
||||
169 [x]
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
169 (collection? x "OrderedCollectionPage"))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
170
|
||||
170 (collection? x "OrderedCollectionPage"))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
171
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
172
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -17,163 +17,190 @@
|
|||
004 [clj-activitypub.webfinger :as webfinger]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 [clj-pgp.generate :as pgp-gen]
|
||||
005 [clj-activitypub.net :as activitypub-net]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 [clojure.walk :refer [keywordize-keys]]))
|
||||
006 [clj-pgp.generate :as pgp-gen]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 [clojure.walk :refer [keywordize-keys]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 [clojure.pprint :refer [pprint]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
009 [clojure.data.json :as json]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
007
|
||||
010
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 ;;; Copyright (C) Simon Brooke, 2022
|
||||
011 ;;; Copyright (C) Simon Brooke, 2022
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
009
|
||||
012
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 ;;; This program is free software; you can redistribute it and/or
|
||||
013 ;;; This program is free software; you can redistribute it and/or
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 ;;; modify it under the terms of the GNU General Public License
|
||||
014 ;;; modify it under the terms of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 ;;; as published by the Free Software Foundation; either version 2
|
||||
015 ;;; as published by the Free Software Foundation; either version 2
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
013 ;;; of the License, or (at your option) any later version.
|
||||
016 ;;; of the License, or (at your option) any later version.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
014
|
||||
017
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
015 ;;; This program is distributed in the hope that it will be useful,
|
||||
018 ;;; This program is distributed in the hope that it will be useful,
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
016 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
019 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
017 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
020 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
018 ;;; GNU General Public License for more details.
|
||||
021 ;;; GNU General Public License for more details.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
019
|
||||
022
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
020 ;;; You should have received a copy of the GNU General Public License
|
||||
023 ;;; You should have received a copy of the GNU General Public License
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021 ;;; along with this program; if not, write to the Free Software
|
||||
024 ;;; along with this program; if not, write to the Free Software
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
023
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 ;;; Use any ActivityPub account handle you like - for example, your own
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
025 (def account-handle "@simon_brooke@mastodon.scot")
|
||||
025 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
026
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
027 (def handle (activitypub/parse-account account-handle))
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
028 (webfinger/fetch-user-id "mastodon.scot" "simon_brooke")
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
029 (apply webfinger/fetch-user-id (map handle [:domain :username]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
030
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 ;;; Retrieve the account details from its home server
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
032 ;;; (`keywordize-keys` is not necessary here but produces a more idiomatic clojure
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
033 ;;; data structure)
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
034 (def account
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
035 "Fetch my account to mess with"
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
036 (let [handle (activitypub/parse-account account-handle)]
|
||||
027 ;;; Use any ActivityPub account handle you like - for example, your own
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
037 (keywordize-keys
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
038 (activitypub/fetch-user
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
039 (apply webfinger/fetch-user-id (map handle [:domain :username]))))))
|
||||
028 (def account-handle "@simon_brooke@mastodon.scot")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
040
|
||||
029
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
041 ;;; examine what you got back!
|
||||
030 ;;(def handle (activitypub/parse-account account-handle))
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
042 (:inbox account)
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 ;;(webfinger/fetch-user-id "mastodon.scot" "simon_brooke")
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
032 ;;(apply webfinger/fetch-user-id (map handle [:domain :username]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
033
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 ;;; Retrieve the account details from its home server
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
035 ;;; (`keywordize-keys` is not necessary here but produces a more idiomatic clojure
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
036 ;;; data structure)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
037 ;; (def account
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 ;; (-> account-handle
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
039 ;; (webfinger/parse-handle)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
040 ;; (webfinger/fetch-user-id!)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
041 ;; (activitypub-net/fetch-user!)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
042 ;; (select-keys [:name :preferredUsername :inbox :summary])))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
043
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
044 ;; (def rsa (pgp-gen/rsa-keypair-generator 2048))
|
||||
044 ;; ;;; examine what you got back!
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
045 ;; (def kp (pgp-gen/generate-keypair rsa :rsa-general))
|
||||
045 ;; (:inbox account)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
046
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 ;; how we make a public/private key pair. But this key pair is not the one
|
||||
047 ;; (-> account
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 ;; known to mastodon.scot as my key pair, so that doesn't get us very far...
|
||||
048 ;; :inbox
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 ;; I think.
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
050 (let [rsa (pgp-gen/rsa-keypair-generator 2048)
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
051 kp (pgp-gen/generate-keypair rsa :rsa-general)
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
052 public (-> kp .getPublicKey .getEncoded)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
053 private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)]
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
054 (println (str "Public key: " public))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
055 (println (str "Private key: " private))
|
||||
049 ;; slurp
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
056 )
|
||||
050 ;; json/read-str
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
051 ;; pprint) ;; => 80
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
057
|
||||
052
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053 ;; (def rsa (pgp-gen/rsa-keypair-generator 2048))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
054 ;; (def kp (pgp-gen/generate-keypair rsa :rsa-general))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
055
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
056 ;; how we make a public/private key pair. But this key pair is not the one
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057 ;; known to mastodon.scot as my key pair, so that doesn't get us very far...
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
058 ;; I think.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
059 ;; (let [rsa (pgp-gen/rsa-keypair-generator 2048)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
060 ;; kp (pgp-gen/generate-keypair rsa :rsa-general)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
061 ;; public (-> kp .getPublicKey .getEncoded)
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
062 ;; private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
063 ;; (println (str "Public key: " public))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
064 ;; (println (str "Private key: " private))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
065 ;; )
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
066
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -15,126 +15,60 @@
|
|||
<td class="with-number">Total</td><td class="with-number">Blank</td><td class="with-number">Instrumented</td>
|
||||
</tr></thead>
|
||||
<tr>
|
||||
<td><a href="clj_activitypub/core.clj.html">clj-activitypub.core</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:23.588039867109636%;
|
||||
float:left;"> 71 </div><div class="not-covered"
|
||||
style="width:76.41196013289037%;
|
||||
float:left;"> 230 </div></td>
|
||||
<td class="with-number">23.59 %</td>
|
||||
<td><a href="dog_and_duck/quack/cli.clj.html">dog-and-duck.quack.cli</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:11.986301369863014%;
|
||||
float:left;"> 70 </div><div class="not-covered"
|
||||
style="width:88.01369863013699%;
|
||||
float:left;"> 514 </div></td>
|
||||
<td class="with-number">11.99 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:27.906976744186046%;
|
||||
float:left;"> 24 </div><div class="partial"
|
||||
style="width:2.3255813953488373%;
|
||||
style="width:21.50537634408602%;
|
||||
float:left;"> 20 </div><div class="partial"
|
||||
style="width:2.150537634408602%;
|
||||
float:left;"> 2 </div><div class="not-covered"
|
||||
style="width:69.76744186046511%;
|
||||
float:left;"> 60 </div></td>
|
||||
<td class="with-number">30.23 %</td>
|
||||
<td class="with-number">150</td><td class="with-number">14</td><td class="with-number">86</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="clj_activitypub/internal/crypto.clj.html">clj-activitypub.internal.crypto</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:18.75%;
|
||||
float:left;"> 9 </div><div class="not-covered"
|
||||
style="width:81.25%;
|
||||
float:left;"> 39 </div></td>
|
||||
<td class="with-number">18.75 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:39.130434782608695%;
|
||||
float:left;"> 9 </div><div class="not-covered"
|
||||
style="width:60.869565217391305%;
|
||||
float:left;"> 14 </div></td>
|
||||
<td class="with-number">39.13 %</td>
|
||||
<td class="with-number">39</td><td class="with-number">8</td><td class="with-number">23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="clj_activitypub/internal/http_util.clj.html">clj-activitypub.internal.http-util</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:74.35897435897436%;
|
||||
float:left;"> 29 </div><div class="not-covered"
|
||||
style="width:25.641025641025642%;
|
||||
float:left;"> 10 </div></td>
|
||||
<td class="with-number">74.36 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:80.0%;
|
||||
float:left;"> 12 </div><div class="not-covered"
|
||||
style="width:20.0%;
|
||||
float:left;"> 3 </div></td>
|
||||
<td class="with-number">80.00 %</td>
|
||||
<td class="with-number">28</td><td class="with-number">3</td><td class="with-number">15</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="clj_activitypub/internal/thread_cache.clj.html">clj-activitypub.internal.thread-cache</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:83.33333333333333%;
|
||||
float:left;"> 105 </div><div class="not-covered"
|
||||
style="width:16.666666666666668%;
|
||||
float:left;"> 21 </div></td>
|
||||
<td class="with-number">83.33 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:88.23529411764706%;
|
||||
float:left;"> 30 </div><div class="partial"
|
||||
style="width:2.9411764705882355%;
|
||||
float:left;"> 1 </div><div class="not-covered"
|
||||
style="width:8.823529411764707%;
|
||||
float:left;"> 3 </div></td>
|
||||
<td class="with-number">91.18 %</td>
|
||||
<td class="with-number">47</td><td class="with-number">3</td><td class="with-number">34</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="clj_activitypub/webfinger.clj.html">clj-activitypub.webfinger</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:95.53571428571429%;
|
||||
float:left;"> 107 </div><div class="not-covered"
|
||||
style="width:4.464285714285714%;
|
||||
float:left;"> 5 </div></td>
|
||||
<td class="with-number">95.54 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:88.88888888888889%;
|
||||
float:left;"> 16 </div><div class="partial"
|
||||
style="width:11.11111111111111%;
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">35</td><td class="with-number">5</td><td class="with-number">18</td>
|
||||
style="width:76.34408602150538%;
|
||||
float:left;"> 71 </div></td>
|
||||
<td class="with-number">23.66 %</td>
|
||||
<td class="with-number">139</td><td class="with-number">10</td><td class="with-number">93</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky.clj.html">dog-and-duck.quack.picky</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:41.6256157635468%;
|
||||
float:left;"> 169 </div><div class="not-covered"
|
||||
style="width:58.3743842364532%;
|
||||
float:left;"> 237 </div></td>
|
||||
<td class="with-number">41.63 %</td>
|
||||
style="width:55.41871921182266%;
|
||||
float:left;"> 225 </div><div class="not-covered"
|
||||
style="width:44.58128078817734%;
|
||||
float:left;"> 181 </div></td>
|
||||
<td class="with-number">55.42 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:58.55855855855856%;
|
||||
float:left;"> 65 </div><div class="partial"
|
||||
style="width:2.7027027027027026%;
|
||||
float:left;"> 3 </div><div class="not-covered"
|
||||
style="width:38.73873873873874%;
|
||||
float:left;"> 43 </div></td>
|
||||
<td class="with-number">61.26 %</td>
|
||||
<td class="with-number">251</td><td class="with-number">15</td><td class="with-number">111</td>
|
||||
style="width:66.07142857142857%;
|
||||
float:left;"> 74 </div><div class="partial"
|
||||
style="width:4.464285714285714%;
|
||||
float:left;"> 5 </div><div class="not-covered"
|
||||
style="width:29.464285714285715%;
|
||||
float:left;"> 33 </div></td>
|
||||
<td class="with-number">70.54 %</td>
|
||||
<td class="with-number">252</td><td class="with-number">15</td><td class="with-number">112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/collections.clj.html">dog-and-duck.quack.picky.collections</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:3.007518796992481%;
|
||||
float:left;"> 4 </div><div class="not-covered"
|
||||
style="width:96.99248120300751%;
|
||||
float:left;"> 129 </div></td>
|
||||
<td class="with-number">3.01 %</td>
|
||||
style="width:100.0%;
|
||||
float:left;"> 130 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:16.666666666666668%;
|
||||
float:left;"> 4 </div><div class="not-covered"
|
||||
style="width:83.33333333333333%;
|
||||
float:left;"> 20 </div></td>
|
||||
<td class="with-number">16.67 %</td>
|
||||
<td class="with-number">57</td><td class="with-number">8</td><td class="with-number">24</td>
|
||||
style="width:100.0%;
|
||||
float:left;"> 25 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">60</td><td class="with-number">8</td><td class="with-number">25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/constants.clj.html">dog-and-duck.quack.picky.constants</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 73 </div></td>
|
||||
float:left;"> 99 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 18 </div></td>
|
||||
float:left;"> 23 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">79</td><td class="with-number">12</td><td class="with-number">18</td>
|
||||
<td class="with-number">116</td><td class="with-number">15</td><td class="with-number">23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/control_variables.clj.html">dog-and-duck.quack.picky.control-variables</a></td><td class="with-bar"><div class="covered"
|
||||
|
@ -148,75 +82,98 @@
|
|||
<td class="with-number">49</td><td class="with-number">6</td><td class="with-number">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/fault_messages.clj.html">dog-and-duck.quack.picky.fault-messages</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 29 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 3 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">35</td><td class="with-number">5</td><td class="with-number">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/required_properties.clj.html">dog-and-duck.quack.picky.required-properties</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 1 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 1 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">1</td><td class="with-number">0</td><td class="with-number">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/utils.clj.html">dog-and-duck.quack.picky.utils</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:49.94786235662148%;
|
||||
float:left;"> 479 </div><div class="not-covered"
|
||||
style="width:50.05213764337852%;
|
||||
float:left;"> 480 </div></td>
|
||||
<td class="with-number">49.95 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:38.775510204081634%;
|
||||
float:left;"> 57 </div><div class="partial"
|
||||
style="width:6.122448979591836%;
|
||||
float:left;"> 9 </div><div class="not-covered"
|
||||
style="width:55.10204081632653%;
|
||||
float:left;"> 81 </div></td>
|
||||
<td class="with-number">44.90 %</td>
|
||||
<td class="with-number">319</td><td class="with-number">30</td><td class="with-number">147</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/quack.clj.html">dog-and-duck.quack.quack</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:46.56488549618321%;
|
||||
float:left;"> 122 </div><div class="not-covered"
|
||||
style="width:53.43511450381679%;
|
||||
float:left;"> 140 </div></td>
|
||||
<td class="with-number">46.56 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:51.02040816326531%;
|
||||
float:left;"> 25 </div><div class="partial"
|
||||
style="width:12.244897959183673%;
|
||||
float:left;"> 6 </div><div class="not-covered"
|
||||
style="width:36.734693877551024%;
|
||||
<td><a href="dog_and_duck/quack/picky/distribution.clj.html">dog-and-duck.quack.picky.distribution</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:10.0%;
|
||||
float:left;"> 2 </div><div class="not-covered"
|
||||
style="width:90.0%;
|
||||
float:left;"> 18 </div></td>
|
||||
<td class="with-number">63.27 %</td>
|
||||
<td class="with-number">171</td><td class="with-number">21</td><td class="with-number">49</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/scratch/core.clj.html">dog-and-duck.scratch.core</a></td><td class="with-bar"><div class="covered"
|
||||
<td class="with-number">10.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:33.333333333333336%;
|
||||
float:left;"> 2 </div><div class="not-covered"
|
||||
style="width:66.66666666666667%;
|
||||
float:left;"> 4 </div></td>
|
||||
<td class="with-number">33.33 %</td>
|
||||
<td class="with-number">30</td><td class="with-number">5</td><td class="with-number">6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/objects.clj.html">dog-and-duck.quack.picky.objects</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:81.38759172781855%;
|
||||
float:left;"> 1220 </div><div class="not-covered"
|
||||
style="width:18.612408272181455%;
|
||||
float:left;"> 279 </div></td>
|
||||
<td class="with-number">81.39 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:66.66666666666667%;
|
||||
float:left;"> 2 </div><div class="not-covered"
|
||||
style="width:33.333333333333336%;
|
||||
style="width:83.48348348348348%;
|
||||
float:left;"> 278 </div><div class="partial"
|
||||
style="width:7.5075075075075075%;
|
||||
float:left;"> 25 </div><div class="not-covered"
|
||||
style="width:9.00900900900901%;
|
||||
float:left;"> 30 </div></td>
|
||||
<td class="with-number">90.99 %</td>
|
||||
<td class="with-number">522</td><td class="with-number">16</td><td class="with-number">333</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/scratch.clj.html">dog-and-duck.quack.picky.scratch</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 1 </div></td>
|
||||
<td class="with-number">66.67 %</td>
|
||||
<td class="with-number">22</td><td class="with-number">5</td><td class="with-number">3</td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 1 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">53</td><td class="with-number">6</td><td class="with-number">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/time.clj.html">dog-and-duck.quack.picky.time</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:7.407407407407407%;
|
||||
float:left;"> 10 </div><div class="not-covered"
|
||||
style="width:92.5925925925926%;
|
||||
float:left;"> 125 </div></td>
|
||||
<td class="with-number">7.41 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:22.22222222222222%;
|
||||
float:left;"> 4 </div><div class="partial"
|
||||
style="width:11.11111111111111%;
|
||||
float:left;"> 2 </div><div class="not-covered"
|
||||
style="width:66.66666666666667%;
|
||||
float:left;"> 12 </div></td>
|
||||
<td class="with-number">33.33 %</td>
|
||||
<td class="with-number">66</td><td class="with-number">7</td><td class="with-number">18</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/picky/utils.clj.html">dog-and-duck.quack.picky.utils</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:62.62626262626262%;
|
||||
float:left;"> 434 </div><div class="not-covered"
|
||||
style="width:37.37373737373738%;
|
||||
float:left;"> 259 </div></td>
|
||||
<td class="with-number">62.63 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:60.18518518518518%;
|
||||
float:left;"> 65 </div><div class="partial"
|
||||
style="width:16.666666666666668%;
|
||||
float:left;"> 18 </div><div class="not-covered"
|
||||
style="width:23.14814814814815%;
|
||||
float:left;"> 25 </div></td>
|
||||
<td class="with-number">76.85 %</td>
|
||||
<td class="with-number">253</td><td class="with-number">26</td><td class="with-number">108</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/quack/quack.clj.html">dog-and-duck.quack.quack</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:46.18320610687023%;
|
||||
float:left;"> 121 </div><div class="not-covered"
|
||||
style="width:53.81679389312977%;
|
||||
float:left;"> 141 </div></td>
|
||||
<td class="with-number">46.18 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:48.97959183673469%;
|
||||
float:left;"> 24 </div><div class="partial"
|
||||
style="width:14.285714285714286%;
|
||||
float:left;"> 7 </div><div class="not-covered"
|
||||
style="width:36.734693877551024%;
|
||||
float:left;"> 18 </div></td>
|
||||
<td class="with-number">63.27 %</td>
|
||||
<td class="with-number">172</td><td class="with-number">21</td><td class="with-number">49</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/scratch/parser.clj.html">dog-and-duck.scratch.parser</a></td><td class="with-bar"><div class="covered"
|
||||
|
@ -238,13 +195,13 @@
|
|||
<tr>
|
||||
<td><a href="dog_and_duck/scratch/scratch.clj.html">dog-and-duck.scratch.scratch</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 66 </div></td>
|
||||
float:left;"> 3 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 17 </div></td>
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">57</td><td class="with-number">9</td><td class="with-number">17</td>
|
||||
<td class="with-number">66</td><td class="with-number">10</td><td class="with-number">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="dog_and_duck/utils/process.clj.html">dog-and-duck.utils.process</a></td><td class="with-bar"><div class="covered"
|
||||
|
@ -263,9 +220,9 @@
|
|||
</tr>
|
||||
<tr><td>Totals:</td>
|
||||
<td class="with-bar"></td>
|
||||
<td class="with-number">50.34 %</td>
|
||||
<td class="with-number">60.82 %</td>
|
||||
<td class="with-bar"></td>
|
||||
<td class="with-number">57.34 %</td>
|
||||
<td class="with-number">75.54 %</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
docs/codox/dog-and-duck.quack.cli.html
Normal file
3
docs/codox/dog-and-duck.quack.cli.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
docs/codox/dog-and-duck.quack.picky.distribution.html
Normal file
4
docs/codox/dog-and-duck.quack.picky.distribution.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
27
docs/codox/dog-and-duck.quack.picky.objects.html
Normal file
27
docs/codox/dog-and-duck.quack.picky.objects.html
Normal file
File diff suppressed because one or more lines are too long
3
docs/codox/dog-and-duck.quack.picky.scratch.html
Normal file
3
docs/codox/dog-and-duck.quack.picky.scratch.html
Normal file
File diff suppressed because one or more lines are too long
4
docs/codox/dog-and-duck.quack.picky.time.html
Normal file
4
docs/codox/dog-and-duck.quack.picky.time.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -56,11 +56,11 @@
|
|||
;; how we make a public/private key pair. But this key pair is not the one
|
||||
;; known to mastodon.scot as my key pair, so that doesn't get us very far...
|
||||
;; I think.
|
||||
(let [rsa (pgp-gen/rsa-keypair-generator 2048)
|
||||
kp (pgp-gen/generate-keypair rsa :rsa-general)
|
||||
public (-> kp .getPublicKey .getEncoded)
|
||||
private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)]
|
||||
(println (str "Public key: " public))
|
||||
(println (str "Private key: " private))
|
||||
)
|
||||
;; (let [rsa (pgp-gen/rsa-keypair-generator 2048)
|
||||
;; kp (pgp-gen/generate-keypair rsa :rsa-general)
|
||||
;; public (-> kp .getPublicKey .getEncoded)
|
||||
;; private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)]
|
||||
;; (println (str "Public key: " public))
|
||||
;; (println (str "Private key: " private))
|
||||
;; )
|
||||
|
||||
|
|
Loading…
Reference in a new issue