feat: Add comprehensive Ruby support#5
Open
gabriel-dehan wants to merge 1 commit into
Open
Conversation
- Add tree-sitter-ruby dependency to pyproject.toml and requirements.txt - Extend ASTChunkBuilder to support Ruby language parsing with tree-sitter-ruby - Update ASTChunk to recognize Ruby-specific node types: * class (Ruby class definitions) * module (Ruby module definitions) * method (Ruby instance methods) * singleton_method (Ruby singleton methods) * singleton_class (Ruby singleton classes) - Create comprehensive Ruby calculator example with: * Modules and nested modules * Classes with inheritance * Instance, class, and singleton methods * Rails-style concerns and patterns * Ruby metaprogramming constructs - Update README.md to include Ruby in supported languages table - Add Ruby usage examples and documentation - Create comprehensive test suite (tests/test_ruby_support.py) with 15+ test cases: * Basic Ruby class and module chunking * Rails-style controllers and models * Ruby singleton methods and metaprogramming * Complex inheritance patterns * Error handling and edge cases - Add Ruby demonstration script (examples/ruby_demo.py) - Verify no regressions in existing language support (Python, Java, C#, TypeScript) - Maintain full backward compatibility and consistent metadata structure Ruby support is now production-ready with comprehensive test coverage. ASTChunk now supports 5 languages: Python, Java, C#, TypeScript, and Ruby.
gabriel-dehan
marked this pull request as ready for review
August 16, 2025 02:35
8 tasks
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.
Adds comprehensive Ruby support.
Summary
Changes Made
Core Implementation
tree-sitter-ruby>=0.20.0dependency topyproject.tomlandrequirements.txtASTChunkBuilderto support Ruby language parsingASTChunkto recognize Ruby-specific AST node types:class(Ruby class definitions)module(Ruby module definitions)method(Ruby instance methods)singleton_method(Ruby singleton methods)singleton_class(Ruby singleton classes)Documentation
Usage Example