Commit graph

6 commits

Author SHA1 Message Date
phg
1b57be2cbf Implement HostsManager for managing hosts file edits with permission handling
- Added PermissionManager class for managing sudo permissions.
- Introduced HostsManager class for high-level operations on hosts file.
- Implemented methods for entering/exiting edit mode, toggling entries, moving entries, updating entries, saving the hosts file, and restoring backups.
- Integrated permission validation and backup creation during edit operations.
- Enhanced main application to support edit mode and associated actions.
- Added tests for PermissionManager and HostsManager to ensure functionality and error handling.
2025-07-29 22:43:01 +02:00
phg
fa7e7718c9 Update project documentation to reflect Phase 2 completion and enhanced features, including configuration management, advanced sorting, and improved visual design. 2025-07-29 21:27:35 +02:00
phg
0051932014 Add comprehensive tests for configuration management and main TUI components 2025-07-29 21:14:29 +02:00
phg
a4ffaebb2a Update project documentation to reflect Phase 1 completion and outline Phase 2 priorities 2025-07-29 15:52:30 +02:00
phg
2decad8047 Add unit tests for HostEntry and HostsFile models, and implement HostsParser tests
- Created comprehensive unit tests for HostEntry class, covering creation, validation, and conversion to/from hosts file lines.
- Developed unit tests for HostsFile class, including entry management, sorting, and retrieval of active/inactive entries.
- Implemented tests for HostsParser class, validating parsing and serialization of hosts files, handling comments, and file operations.
- Ensured coverage for edge cases such as empty files, invalid entries, and file permission checks.
2025-07-29 14:52:31 +02:00
phg
40a1e67949 initial commit 2025-07-29 13:50:55 +02:00