diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-01 18:38:49 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-01 18:38:49 +0200 |
| commit | 08129b43792eeec92eacb9f47ce3f879489aa03c (patch) | |
| tree | f527ba7c71c58536fa68b0acaef41dcd56a3cfc6 /lib/dslkeywords/given.rb | |
| parent | 861e526d9ad9228f2b740dbcf00cf39d8fe652f2 (diff) | |
make rcm usable as a gem from any directory, fix bugs and tests
- Add lib/rcm.rb entry point and bin/rcm CLI executable
- Update gemspec: v0.1.0, proper files list, executables, runtime deps
- Support standalone arg parsing and --hosts filtering in options
- Fix inverted logic and typo in FileBackup#different? (== vs !=, cecksum_b)
- Fix unqualified File.directory? resolving to RCM::File in Directory
- Fix test_chown assertions running before evaluate! creates files
- Add setup to file tests to prevent order-dependent failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'lib/dslkeywords/given.rb')
| -rw-r--r-- | lib/dslkeywords/given.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dslkeywords/given.rb b/lib/dslkeywords/given.rb index fa14e68..ba61703 100644 --- a/lib/dslkeywords/given.rb +++ b/lib/dslkeywords/given.rb @@ -17,6 +17,10 @@ module RCM def met? return false if @conds.key?(:hostname) && Socket.gethostname != @conds[:hostname].to_s + # When --hosts is specified, only run on the listed hosts + hosts = option(:hosts) + return false if hosts.any? && !hosts.include?(Socket.gethostname) + true end end |
