Project

prospectus

0.0
No release in over 3 years
Low commit activity in last 3 years
Tool and DSL for checking expected vs actual state
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.1.1
~> 2.3.0
~> 0.7.0
~> 12.3.0
~> 3.8.0
~> 0.67.2

Runtime

~> 0.1.3
~> 0.3.4
 Project Readme

prospectus

GitHub Workflow Status GitHub release MIT Licensed

Tool to check for changes in expected vs. actual state

Usage

Check specification

Checks must implement responses for the following commands:

load

The load command accepts a hash with a single key, the directory being checked, and returns an array of checks with optional metadata.

Input: {"dir": "/path/to/main/dir"} Output: [{"name": "check_N", "metadata": {"foo": "bar"}}, ...]

execute

The execute command accepts a hash representing the check object. Metadata provided during the load call is included. The return value must be a Result object for the given check.

Input: {"dir": "/path/to/main/dir", "file": "/path/to/main/dir/.prospectus.d/checkfile", "name": "check_N", "metadata": {"foo": "bar"}} Output: {"actual": "unhappy", "expected": {"type": "string", "data": {"expected": "happy"}}}

fix

The fix command can attempt to fix a failed check automatically. It accepts a hash representing the failed result, which includes the originating check. The return value must be a Result object for the given check.

Note: The check must respond to the fix command, but if it does not support automatic fixes, it can respond by emiting the same result object it was given.

Input: {"actual": "unhappy", "expected": {"type": "string", "data": {"expected": "happy"}}, "check": {"dir": "/path/to/main/dir", "file": "/path/to/main/dir/.prospectus.d/checkfile", "name": "check_N", "metadata": {"foo": "bar"}}} Output: {"actual": "happy", "expected": {"type": "string", "data": {"expected": "happy"}}}

Installation

License

prospectus is released under the MIT License. See the bundled LICENSE file for details.