| Age | Commit message (Collapse) | Author |
|
Fix CommitIndex to respect force=false by checking os.Stat before writing,
mirroring the Data.Commit behaviour and keeping index/data pairs consistent.
Skip .git directory in WalkIndexes via filepath.SkipDir to avoid spurious
errors or false matches inside the git metadata tree.
Make ShredAllExported continue past individual shred errors and return the
last error, matching Ruby's best-effort shredding behaviour.
Accept io.Reader in Store.Remove instead of hardwiring os.Stdin, enabling
deterministic testing via strings.NewReader injection.
Fix runFzf comment to state that any non-zero fzf exit is treated as no
selection (not only exit 130).
Document ImportRecursive divergence from Ruby basename-flattening behaviour.
Add 14 new tests: Search, SearchActionCat, SearchActionCatBinarySkip,
ShredAllExported, SearchActionExport, ImportRecursive, ReimportAfterExport,
RemoveInteractive, RemoveInteractiveDecline, CommitIndexSkipsExisting,
LoadIndexMissingFile, LoadIndexCorrupted, LoadDataMissingFile,
LoadDataCorrupted, DataExportUnwritable, HashPathEdgeCases,
ImportMissingSourceFile, WalkIndexesInvalidRegex.
Improve TestIndexSort to call sort.Sort and assert final order.
Remove orphaned section-header comment from store_test.go.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Adds internal/store with Index, Data, and Store types that mirror the Ruby
Index, GeheimData, and Geheim classes. All 22 tests pass including
AddAndSearch, Import, Export, Remove, HashPath, IsBinary, and sort interface.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
Add internal/crypto/crypto.go with byte-identical AES-256-CBC encryption
and decryption matching the Ruby OpenSSL reference in geheim.rb, including
key doubling (enforceKeyLength), IV derivation (buildIV), PKCS7 pad/unpad,
and NewCipher/Encrypt/Decrypt. Add internal/crypto/crypto_test.go with
table-driven golden tests (6 vectors from Ruby), roundtrip tests (8 cases),
enforceKeyLength/buildIV/PKCS7 unit tests, and error-path coverage (22 total).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Replaces the stub in internal/shell/shell.go with a full implementation
backed by github.com/ergochat/readline. The Shell struct wraps a readline
instance configured with vi mode, a 500-entry in-memory history limit, and
a custom prefixCompleter that delegates tab expansion to a caller-supplied
function — mirroring the Ruby CLI#setup_readline / Readline.completion_proc
pattern. History deduplication (skip empty lines and consecutive duplicate
entries) matches the Ruby shell_loop behaviour by disabling auto-save and
calling SaveToHistory only for non-empty, non-duplicate lines. A package-
level ReadPassword helper handles PIN entry before the Shell is created.
Tests skip gracefully when stdin is not a TTY.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
- internal/version: bump Version constant to v0.4.0
- internal/config: full Config struct with JSON snake_case fields matching
Ruby Config::DEFAULTS; Load() merges ~/.config/geheim.json over defaults,
tilde-expands path fields, and warns on stderr for parse errors
- internal/config: table-driven tests covering defaults, overrides,
tilde expansion, invalid JSON warning, and silent missing-file behaviour
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
gitignore, go 1.24 (task 352)
|
|
|
|
- go.mod with module codeberg.org/snonux/geheim (go 1.22, mage dep)
- Magefile.go with Build, Test, Install, Uninstall targets
- cmd/geheim/main.go delegating to internal/cli
- Stub packages: cli, version, config, crypto, git, store, clipboard, shell
- go.sum generated; binary confirmed to build via mage build
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Amp-Thread-ID: https://ampcode.com/threads/T-9aec59d6-cd27-4607-ac11-baac5f2ca758
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Add frozen_string_literal and modernize path handling
- Fix Config method_missing and respond_to_missing? signatures
- Modernize OpenSSL usage (remove deprecated Cipher::Cipher)
- Use Dir.chdir blocks for safer directory handling
- Improve Log module output logic
- Fix Clipboard IO pipe handling
- Use File.write instead of File.open blocks
- Extract COMMANDS constant and use squiggly heredoc
- DRY CLI case statement with SEARCH_ACTIONS mapping
- Add readline support with vi editing mode
- Add tab completion for commands and entries
- Add command history support
Amp-Thread-ID: https://ampcode.com/threads/T-9aec59d6-cd27-4607-ac11-baac5f2ca758
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
Amp-Thread-ID: https://ampcode.com/threads/T-9aec59d6-cd27-4607-ac11-baac5f2ca758
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID: https://ampcode.com/threads/T-9aec59d6-cd27-4607-ac11-baac5f2ca758
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|