summaryrefslogtreecommitdiff
path: root/lib/dslkeywords/resource.rb
AgeCommit message (Collapse)Author
2026-03-14Use active DSL registry for Resource.findPaul Buetow
2026-03-01refactor: replace ObjectSpace scan with inherited-hook registryPaul Buetow
ResourceDependencies#initialize iterated every live object in the Ruby heap (ObjectSpace.each_object(Class)) to discover Resource subclasses, which is O(heap), non-deterministic, and load-order-dependent (subclasses loaded after an instance was created were invisible to it). Add Resource.inherited + @@subclass_names so each subclass self-registers at load time. ResourceDependencies#initialize now just assigns the shared (frozen) registry reference instead of scanning ObjectSpace. Benefits: - O(1) constructor path instead of O(heap) - Load-order safe: new subclasses are visible to all instances immediately - Deterministic: set is built in require order, not GC-dependent order Also fix the "recource" typo in the ResourceDependencies comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01refactor: extract do? into DryRun concern module in resource.rbPaul Buetow
do? (dry-run-aware block execution) was sitting inside ResourceDependencies, which is responsible for dependency tracking — an SRP violation. Move it into its own DryRun module and include that in Resource alongside the existing concerns. No logic changed; all 29 tests continue to pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2025-02-26already donePaul Buetow
2025-02-26rename dry? to do?Paul Buetow
2025-02-19adding dryPaul Buetow
2025-02-19fixPaul Buetow
2025-02-19more on thisPaul Buetow
2025-02-19nicerPaul Buetow
2025-02-18refactorPaul Buetow
2025-02-18backupping file when changePaul Buetow
2025-02-17cache the resource objsPaul Buetow
2025-02-17use a setPaul Buetow
2025-02-17sugarPaul Buetow
2025-02-17can detect dependency loopPaul Buetow
2025-02-16can find resource objsPaul Buetow
2025-02-16sugarPaul Buetow
2025-02-16change foo[...] to foo(...) syntax for depsPaul Buetow
test deps
2025-02-15betterPaul Buetow
2025-02-15can detect invalid resource namesPaul Buetow
2025-02-15add depends_on syntaxPaul Buetow