-
Notifications
You must be signed in to change notification settings - Fork 0
Add rake task to generate YARD docs #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a rake task for generating YARD documentation for support table model helper methods and establishes a configurable default data directory for Rails applications.
Key Changes
- Introduces
support_table_data:add_yard_docsrake task that automatically generates YARD documentation comments for named instance helper methods - Sets the default data directory to
db/support_tablesvia a configurable Rails option (config.support_table_data_directory) - Refactors test models from inline definitions to separate files using autoload for better organization
Reviewed changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
lib/support_table_data/documentation/yard_doc.rb |
Generates YARD documentation strings for named instance methods, predicates, and attribute helpers |
lib/support_table_data/documentation/source_file.rb |
Manages source file reading/writing and intelligently inserts/updates YARD docs with marker comments |
lib/support_table_data/documentation.rb |
Module entry point that requires documentation components |
lib/tasks/support_table_data.rake |
Adds new add_yard_docs task and refactors eager loading logic |
lib/tasks/utils.rb |
Utility methods for Rails eager loading and finding support table models with their file paths |
lib/support_table_data/railtie.rb |
Configures default data directory via Rails config initializer |
spec/support_table_data/documentation/yard_doc_spec.rb |
Comprehensive tests for YARD documentation generation |
spec/support_table_data/documentation/source_file_spec.rb |
Tests for source file manipulation and YARD doc insertion/updating |
spec/models/*.rb |
Refactored model definitions into separate files |
spec/models.rb |
Converted to use autoload for lazy loading test models |
test_app/ |
Complete test Rails application to validate rake task functionality |
README.md |
Documents the new YARD documentation feature and config option |
CHANGELOG.md |
Records changes for version 1.4.1 |
.github/workflows/continuous_integration.yml |
Adds ActiveRecord 8.1 compatibility testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ta into yard-generation
Added
db/support_tables. This can also be overridden by setting theconfig.support_table_data_directoryconfiguration option in the Rails application.support_table_data:add_yard_docsfor Rails applications that will add YARD documentation to support table models for the named instance helpers.