All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Tweaked --api output to show brief info
- Include machine-name when logging
-
New methods:
-
statebot_current_state_of()
- Get the current state of another machine -
statebot_persisted_event_of()
- Get the persisted event of another machine -
statebot_delete()
- Delete the record of a machine from the database
-
- Cloud Connect :: Permit use of 'export' to allow override of defaults in _config.sh
- Tests now cleanup after themselves using
statebot_delete
statebot_init()
will source~/.statebot-rc
if it exists.
There is one use-case I know of for this: My own state-machines generally only implement perform_transitions()
, but sometimes I want to do something else after transitions, but without modifying the original script.
So I define on_transitions()
in ~/.statebot-rc
and use STATEBOT_NAME to know which Statebot sourced it.
- Installation helper
- Cloud Connect :: Ability to reset
- Small code police
- Cloud Connect :: A few more debugging messages
- Changed license from ISC to the legally identical MIT, since it's more recognisable
- Cloud Connect :: Refactored with a bent towards easier config
- Cloud Connect :: Update README with a Quick Start
- Cloud Connect :: BT-Wifi plugin now tested
- Rerun :: Small refactor for readability
- Cloud Connect :: FON plugin now defunct
- Cloud Connect :: Added 3 other plugins for BTWi-fi
- Cloud Connect :: Allow 'export' overrides
- Cloud Connect :: 'rebooting' state
- Cloud Connect :: Add credits
- Code-style tweaks
- Remove superfluous dump() function
- 'statebot_inspect' was showing all transitions, but not all states in a chart. The first one was being lopped-off, and white-space could sneak-in too
- Regression test for the above
- Cloud Connect :: bt-fon plugin required tweaking
- Cloud Connect :: Remove superfluous imports after refactor
- Cloud Connect :: Break-out bt-fon helpers + api
- Cloud Connect :: Use the above for new bt-openzone plugin (untested!)
- Fix for some THEN-callbacks not passing all arguments in all shells
- Broke perform_transitions() THEN-callback on last commit
- Test for the above issue
- Update version number
- perform_transitions() THEN-callbacks not running in some shells
- Improve portability of Rerun example
- More styling/linting
- Styling/linting
- Test for statebot_emit persist option
- Update shebang back to
#!/bin/sh
with the help of shellcheck. Still not completely POSIX thanks to the use oflocal
, but that doesn't seem to be a huge deal...?
- Invert exit-codes of case_statebot to permit direct usage in if-statements without confusion. Anything using case_statebot will need to be updated, so this is a breaking-change
- case_statebot tests
- statebot_reset updates CURRENT_STATE for cases where you want to continue execution after calling it. Previously it only updated the CSV database entry
- statebot_enter won't fire THEN-callbacks if unnecessary
- Linting tweaks via ShellCheck
- Tweak demo.sh, put it in /examples
- New example: Rerun!
- Some basic tests
- Update shebang:
#!/bin/bash
is more portable that#!/bin/sh
- Statebot-sh :)