Commit Graph

7 Commits

Author SHA1 Message Date
Jeremiah Russell
825f2de316 🐛 fix(client_config): print config for debugging
- add log to print config for debugging
2025-10-22 17:35:43 +01:00
Jeremiah Russell
07d01aa61e 🎨 style(client_config): apply rustfmt formatting standards
- Apply cargo fmt to ensure consistent code formatting
- Fix line wrapping for long assertions and method chains
- Optimize whitespace and indentation
- All clippy checks pass with no warnings
- Documentation generates without warnings on nightly with -Dwarnings
2025-10-20 14:59:32 +01:00
Jeremiah Russell
5f7b180a75 🧪 test(client_config): add comprehensive unit test coverage
- Add 20 unit tests covering all public API functionality
- Test builder pattern with direct OAuth2 parameters and credential files
- Test configuration loading from Config objects with error conditions
- Test path resolution schemes (home, root, current directory)
- Test configuration priority (direct params vs credential file)
- Test error conditions with proper panic expectations
- Test edge cases: Unicode strings, multiple redirect URIs, optional fields
- Cover accessor methods and method chaining functionality
- Include temporary file testing for credential file loading
2025-10-20 14:59:32 +01:00
Jeremiah Russell
7920106306 📝 docs(client_config): add comprehensive module and API documentation
- Add detailed module-level documentation with security considerations
- Document all public structs, methods, and their usage patterns
- Include practical examples for builder pattern and configuration loading
- Fix typo in default auth_uri (https;:// -> https://)
- Add security notes for sensitive credential handling
- Document path resolution schemes and configuration directory structure
2025-10-20 14:59:32 +01:00
Jeremiah Russell
368e78b1cc feat(config): implement config builder pattern for ClientConfig
- introduce ConfigBuilder struct for constructing ClientConfig instances
- add methods to ConfigBuilder for setting various configuration parameters
- implement a build method to create the ClientConfig instance
- add a default implementation for ConfigBuilder
- enhance ClientConfig with persist_path for token persistence
- update ClientConfig::new_from_configuration to use config_root.full_path()
- add ClientConfig::persist_path() to report the full path to the file to persist tokens
2025-10-16 15:37:01 +01:00
Jeremiah Russell
1ae34efb93 🐛 fix(config): resolve credential file path issue
- fix the problem of reading credential file in the production environment
- use config_root to find credential file
2025-10-16 11:21:40 +01:00
Jeremiah Russell
dd1fe356a2 feat(config): introduce client configuration
- adds `ClientConfig` struct for managing Gmail client settings
- supports loading credentials from environment variables or a JSON file
- provides methods to access the application secret and configuration root
2025-10-16 11:21:40 +01:00