-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Basic functionality for serving apis #4
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
feat: Adds settings to module fix: Corrects gemname in publish-gem.sh
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 introduces the NatsApiServer module for Rubyists::Leopard, providing a framework for building concurrent NATS Service API workers with middleware support and declarative endpoint definitions.
- Adds core infrastructure including settings, error classes, and message wrapper functionality
- Implements NatsApiServer module with endpoint registration, middleware chain, and concurrent worker management
- Provides comprehensive test coverage for all new components
Reviewed Changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/leopard.rb | Main entry point with Pathname extension and SemanticLogger setup |
| lib/leopard/settings.rb | Configuration module using Dry::Configurable for libroot, root, and logger settings |
| lib/leopard/errors.rb | Base error classes for the framework |
| lib/leopard/message_wrapper.rb | JSON-aware wrapper for NATS messages with response helpers |
| lib/leopard/nats_api_server.rb | Core server module with endpoint registration, middleware support, and worker management |
| test/ | Comprehensive test suite covering all new functionality |
| examples/echo_endpoint.rb | Simple usage example demonstrating endpoint definition |
| Gemfile | Groups development/test dependencies |
| Readme.adoc | Complete documentation with usage examples |
This adds the NatsApiServer module, which provides a
basic API server with a message wrapper that runs
the message through middleware chain.