Skip to content

Conversation

@bougyman
Copy link
Member

  • feat: adds main lib and errors classes
  • chore: Adds group to Gemfile
  • feat: Adds basic message wrapper
  • feat: Basic api server using message wrapper
  • test: Adds test for message wrapper
  • test: Adds tests for nats_api_server

This adds the NatsApiServer module, which provides a
basic API server with a message wrapper that runs
the message through middleware chain.

@bougyman bougyman added the help wanted Extra attention is needed label Jul 29, 2025
@bougyman bougyman changed the title Basic functionality for serving apis feat: Basic functionality for serving apis Jul 29, 2025
@bougyman bougyman requested a review from BryceARich July 29, 2025 19:06
@bougyman bougyman self-assigned this Jul 29, 2025
@bougyman bougyman marked this pull request as draft July 29, 2025 19:25
@bougyman bougyman marked this pull request as ready for review July 31, 2025 14:21
Copilot AI review requested due to automatic review settings July 31, 2025 14:21
Copy link
Contributor

Copilot AI left a 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

@bougyman bougyman merged commit 9ff0942 into main Jul 31, 2025
4 checks passed
@bougyman bougyman deleted the filling-in-functionality branch July 31, 2025 16:53
This was referenced Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants