Conversation
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.