Skip to main content

Module hook_settings

Module hook_settings 

Source
Expand description

Hook registrations inside a harness’s settings file.

This is the one piece of adapter logic that is genuinely per-harness, and until it lived here every adapter crate carried its own copy of it. The copies drifted: a dedupe bug had to be fixed four times at once (tuff#83), and each crate spelled the same validation error a little differently. What actually differs between harnesses is the shape of the file, captured by HookSettingsShape; the merge and the removal are the same algorithm over either shape.

Enums§

HookSettingsShape
How a harness lays out the hook registrations in its settings file.

Functions§

extend_hook_groups
Append hook groups that this event does not already register.
remove_registrations
Take Tuff’s registrations back out of the harness’s settings file, leaving everything else in it alone.
without_registrations
remove_registrations on a settings file’s bytes: the bytes it should hold without the registrations, or None when it has no hooks object to take them from.