Before making any code suggestions, consult .ai/guidelines.md for comprehensive Faraday-specific conventions and patterns.
Faraday is a Ruby HTTP client library that provides:
- A middleware-based architecture (similar to Rack)
- A common interface over various HTTP adapters (Net::HTTP, HTTPClient, etc.)
- Extensible request/response processing pipeline
As GitHub Copilot working on Faraday, you must:
- Read & Follow: Always reference
.ai/guidelines.mdfor all Faraday conventions and implementation details - Stay Current: Suggest updates to
.ai/guidelines.mdwhen you notice:- New patterns not yet documented
- Changes to existing conventions
- Discrepancies between guidelines and actual code
- Focus on Faraday: Provide Faraday-specific guidance, not generic Ruby/RSpec tips
- New middleware and adapters should be separate gems, NOT added to the base Faraday repository
- Only middleware expected to be used by the vast majority of projects can be considered for the base repo
- See faraday-net_http as an example of an adapter in its own repository
- Consult
.ai/guidelines.mdfor detailed implementation patterns
- Follow RuboCop style guide (
.rubocop.yml) - Run tests:
bundle exec rspec - Check style:
bundle exec rubocop - Use inclusive language (see
.github/CONTRIBUTING.md)
Keep .ai/guidelines.md accurate and current. When you identify code patterns not reflected in guidelines, convention changes, or better practices, propose updates to maintain alignment with the actual codebase.
.ai/guidelines.md- Complete conventions and patterns (PRIMARY REFERENCE).github/CONTRIBUTING.md- Contribution process and workflowlib/faraday/middleware.rb- Middleware base classlib/faraday/request/json.rb- Example middleware implementation.rubocop.yml- Code style guide
Remember: The guidelines in .ai/guidelines.md are the source of truth for Faraday conventions. Keep them current and refer to them consistently.