class SafeDb::State

Querying the state of the safe on the current machine is what this command facilitates.

Strategy re Safe Events and Commits

Touched Use Cases

This event tracking strategy requires changes in roughly 10 use cases.

  1. safe prune - as well as pruning branches with unrecognized bootup IDs we also prune old events files

  2. safe state - prints the table of branch, book name, book ID, last state event and the event time

  3. safe state - a column titled S has an asterix (*) if edits occur without being followed by a commit or logout

  4. safe state - the branch column states “this one” if branch ID matches current branch ID

  5. safe state - the table is ordered by the time the branch/books are written in SO THAT the rows do not jump about

  6. safe logout - trashes branches and marks the event (branch/book) row so that it is displayed by safe state

  7. safe login - changes to trashes branches and marks the event (branch/book) row so that it is displayed by safe state

  8. safe destroy <<book>>: - only enact this if the book is not logged in (since boot time) or has been logged out

  9. safe destroy <<book>>: - trash branches, master indices and crypts and referencing rows in the event tracker file

  10. safe rename <<book>>: - only change section header in INI indices to rename the book

  11. safe password - Only allow when no other branch is logged in (its fine if they subsequently logged out)

Limit Occurrences of Book ID

Do not write book ID everywhere because renaming and destroying books change will cascade. Book IDs should not be used to name directories or files or crypt headers - (use a reference instead)

Public Instance Methods

execute() click to toggle source
# File lib/controller/db/state.rb, line 51
def execute()


  return


end