opal-rails is a Rails engine that integrates the Opal Ruby-to-JavaScript compiler into the Rails asset pipeline. It provides a build-based workflow where Opal entrypoints (Ruby files) are compiled into JavaScript assets via Rake tasks (`opal:build`, `opal:watch`, `opal:clobber`), replacing the older Sprockets request-time compilation. The gem includes generators for initial setup and asset scaffolding, a template handler for `.js.opal` views with optional controller assigns, and Haml/Slim filters for inline Opal code. It hooks into Rails' `assets:precompile` and test preparation tasks to ensure Opal assets are built automatically. The architecture is centered around a `BuilderRunner` that wraps `Opal::Builder`, an `OutputsManifest` that tracks built files, and a `WatchRunner` that uses the `listen` gem for incremental rebuilds during development. The codebase is well-structured with clear separation of concerns, dependency injection, and comprehensive test coverage, making it a solid example of a Rails engine that extends the asset pipeline.
Quickdraw is a Ruby test framework designed to leverage multi-core systems for faster test execution. It provides its own test DSL while also offering adapters for Minitest and RSpec. The framework uses process forking to distribute tests across multiple CPU cores, with special optimizations for M-series Macs that can utilize performance or efficiency cores. Key features include watch mode for automatic test re-running, lazy error message computation to avoid slowing down tests, and scoped execution to prevent top-level method/constant collisions. The architecture consists of a CLI entry point, test runner with worker processes, assertion libraries, and platform-specific optimizations.