Stable snapshots
Read exact, frozen bytes with a filesystem signature checked before and after the read. A changing file is retried or rejected.
Xamidimura reads a stable file snapshot and gives Ruby applications a SHA-256 fingerprint to compare before they save.
require "xamidimura"
snapshot = Xamidimura::SourceRevision
.read("notes.md")
current = Xamidimura::SourceRevision
.file_digest("notes.md")
if current != snapshot.digest
# Handle the external change.
end
Revision primitives for editors and other apps that read files people may change elsewhere.
Read exact, frozen bytes with a filesystem signature checked before and after the read. A changing file is retried or rejected.
Hash in-memory bytes or a file on disk, then compare fingerprints when it is time to decide whether to save.
The gem observes revisions; it does not reload, merge, or write the file. The application stays in control.
Requires Ruby 3.2 or newer. No runtime gem dependencies.
gem install xamidimura