|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## [v0.5.0] - 2025-10-04 |
| 4 | + |
| 5 | +### 🔧 Refactoring |
| 6 | + |
| 7 | +- Split CLI definition into a dedicated `cli.rs` module |
| 8 | +- Added a new `commands.rs` module to handle subcommand actions (`config init`, `file init`, `cache clear`) |
| 9 | +- Extracted configuration logic from `utils.rs` into a new `config.rs` module |
| 10 | +- Simplified `main.rs` to only parse CLI input and dispatch commands |
| 11 | + |
| 12 | +### ✨ CLI Improvements |
| 13 | + |
| 14 | +- Introduced subcommands: |
| 15 | + - `config init` → initialize the configuration file |
| 16 | + - `file init` → create a sample default fortune file (`rfortune.dat`) |
| 17 | + - `cache clear` → clear the cache directory |
| 18 | +- Enhanced `--help` output with a detailed `long_about` description and usage examples |
| 19 | + |
| 20 | +### ✅ Misc |
| 21 | + |
| 22 | +- Clearer module boundaries (`cli`, `commands`, `config`, `utils`, `loader`) |
| 23 | +- Improved maintainability and readability of the codebase |
| 24 | + |
| 25 | +--- |
| 26 | + |
3 | 27 | ## [v0.3.0] - 2025-07-30 |
4 | 28 |
|
5 | 29 | ### 🔧 Refactoring |
| 30 | + |
6 | 31 | - Removed `fortune.rs` and consolidated logic into new `utils.rs` |
7 | 32 | - Updated `main.rs` and `lib.rs` to use `rfortune` crate structure consistently |
8 | 33 |
|
9 | 34 | ### 🧪 Unit Testing |
| 35 | + |
10 | 36 | - Added unit tests for `loader` module (parsing `.dat` files) |
11 | 37 | - Added unit tests for `utils` module, including `random_quote` and `print_random` |
12 | 38 | - Fixed the signature of `print_random()` to accept file path for cache handling |
13 | 39 |
|
14 | 40 | ### 💾 Cache Support |
| 41 | + |
15 | 42 | - Implemented cache system to avoid repeating the same fortune twice |
16 | 43 | - Cache is stored in user-specific system path (`$XDG_DATA_HOME/rfortune/cache/` or `%APPDATA%\rfortune\cache\`) |
17 | 44 | - Added tests for reading/writing cache and ensuring uniqueness of quotes |
18 | 45 | - Introduced `--clear-cache` flag to manually delete the entire cache directory |
19 | 46 |
|
20 | 47 | ### ✅ Misc |
| 48 | + |
21 | 49 | - Ensured full cross-platform compatibility (Linux, macOS, Windows) |
22 | 50 | - Cleaned up unused code and improved module boundaries |
23 | 51 |
|
|
26 | 54 | ## [v0.2.2] - 2025-07-29 |
27 | 55 |
|
28 | 56 | ### Changed |
| 57 | + |
29 | 58 | - Updated the `README.md` in the `homebrew-rfortune` tap repository to include installation instructions via Homebrew. |
30 | 59 |
|
31 | 60 | ### Notes |
| 61 | + |
32 | 62 | - No changes to the binary or functionality of `rfortune` itself. |
33 | 63 |
|
34 | 64 | --- |
35 | 65 |
|
36 | 66 | ## [v0.2.1] - 2025-07-29 |
37 | 67 |
|
38 | 68 | ### Added |
| 69 | + |
39 | 70 | - Support for publishing `rfortune` to [crates.io](https://crates.io/crates/rfortune) |
40 | 71 | - Updated `Cargo.toml` with metadata required by crates.io: |
41 | | - - Package description, authors, license, keywords, categories |
42 | | - - Repository and homepage URLs |
43 | | - - Included files for packaging |
| 72 | + - Package description, authors, license, keywords, categories |
| 73 | + - Repository and homepage URLs |
| 74 | + - Included files for packaging |
44 | 75 |
|
45 | 76 | ### Notes |
| 77 | + |
46 | 78 | - This version does not introduce new features or changes to functionality. |
47 | 79 | - Users can now install `rfortune` directly via: |
48 | 80 | ```bash |
49 | 81 | cargo install rfortune |
50 | 82 | ``` |
51 | | - |
| 83 | + |
52 | 84 | --- |
53 | 85 |
|
54 | 86 | ## [v0.2.0] - 2025-07-27 |
|
0 commit comments