feat(adapter): implement JSON file storage adapter for issue #9 #22
Reference in New Issue
Block a user
Delete Branch "feat/issue-9-json-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement JSON file storage adapter that implements RoomStorage and TrackingStorage ports.
Changes
adapters/__init__.pyandadapters/storage/__init__.pyadapters/storage/json_file.pywith:JsonFileRoomStorage- stores room data at~/.jigaido/data/<room_id>.jsonJsonFileTrackingStorage- stores tracking data at~/.jigaido/tracking/<room_id>_<user_id>.jsontests/test_json_file_adapter.pyImplementation
Both adapters implement the protocols defined in
core/ports.py:RoomStorage: load, save, add_bounty, update_bounty, delete_bounty, get_bountyTrackingStorage: load, save, track_bounty, untrack_bountyTesting
All 18 tests pass:
Fixes #9
Pull request closed