Release 0.1.2
openai:gpt-4.1
────────────────────────────────────────────────────────────────────────────────────────────────────
Release Notes
Overview
This release brings significant improvements to rcm, focusing on enhanced reliability, expanded reso
urce management capabilities, and a smoother user experience. It introduces new features for managin
g directories and files, improves error handling, and refines the internal architecture for better m
aintainability. The documentation and examples have also been expanded to help users get started qui
ckly.
Features
Directory Resource Support
- What: Added support for managing directories as first-class resources.
- Why: Users can now create, backup, purge, and modify directories directly within rcm, making i
t easier to manage complex file structures.
File Backup Enhancements
- What: Files and directories are now backed up before changes are applied, with backups only cr
eated when actual changes occur. - Why: This ensures user data safety and avoids unnecessary backups, providing peace of mind dur
ing configuration changes.
Touch File Resource
- What: Introduced a
touchresource to create or update the timestamp of files. - Why: Useful for workflows that depend on file modification times or require placeholder files.
Chained Resource Definitions
- What: Added support for chaining resource definitions.
- Why: Enables more concise and readable configuration files, improving developer productivity.
Improvements
Enhanced Error Handling
- What: Improved error handling in package management and configuration loading, including grace
ful handling of missing dependencies (e.g., missingtomlgem). - Why: Prevents crashes and provides clearer feedback to users, making troubleshooting easier.
Refined DSL and Internal Architecture
- What: Refactored the DSL to reduce duplication, improve keyword registration, and streamline r
esource management. - Why: Results in a more maintainable codebase and a more consistent user experience.
Dry-Run Mode Improvements
- What: Fixed issues where dry-run mode would crash if parent directories did not exist.
- Why: Users can now safely preview changes without side effects, even in incomplete environment
s.
Explicit Options and Config Loading
- What: Deferred options parsing and config loading, requiring explicit calls.
- Why: Gives users and developers more control over when and how configuration is loaded, improv
ing flexibility.
Documentation and Examples
- What: Added comprehensive README, quickstart examples, and usage instructions for different en
vironments (CLI, gem, rake, plain Ruby). - Why: Makes it easier for new users to get started and for existing users to explore advanced f
eatures.
Bug Fixes
- Shell Command Execution: Replaced shell interpolation with safer
system()calls in package m
anagement, reducing security risks. - Backup Logic: Fixed typo and logic errors in recursive backup functions, ensuring reliable bac
kups. - Resource Duplication: Added detection for duplicate resources and invalid resource names, prev
enting configuration errors. - Dependency Loops: Improved detection of dependency loops, helping users avoid misconfiguration
s. - File Deletion and Purging: Added support for deleting files and purging directories, ensuring
resources can be fully removed as needed.
Breaking Changes & Migration
- Explicit Config and Options Loading: If you previously relied on automatic config or options p
arsing, you may need to update your scripts to callOptions.parse!andConfig.load!explicitly. - DSL Changes: Some internal DSL methods and resource interfaces have been refined. Review your
custom resources or extensions for compatibility. - File and Directory Resource Refactoring: If you used internal classes directly, note that file
-related logic has been split into per-class files.
Getting Started
- Review the updated README and new example directories for usage
instructions. - Use the provided Justfiles for quick testing of examples.
- For gem users, rcm can now be used from any directory, with improved fallback logic for missing de
pendencies.
Thank you for using rcm! Your feedback and contributions help make it better with every release.