Gem: ruby_api_pack_core
Owner: PHCDevworks
Primary implementation agent: Claude Code
This repository is a Ruby gem providing the shared HTTP client foundation used
by every ruby_api_pack_* gem (ActiveCampaign, Cloudways, WordPress, and any
future vendor pack). It owns the connection wrapper's HTTParty/Oj plumbing,
the response-shape validator, and the configure/configuration singleton
pattern, so each vendor-specific gem only implements its own authentication
headers, Configuration fields, and resource endpoint classes. This file is
the implementation guide for Claude Code. Read AGENTS.md first for shared
agent boundaries.
This gem has no vendor-specific knowledge of any kind — no API tokens, no
endpoint paths, no resource classes. If a change requires knowing which
third-party API is being called, it belongs in the consuming
ruby_api_pack_* gem, not here.
Claude Code does not create commits in this repository unless explicitly asked. Prepare changes, run validation, and leave commit, tag, push, and release authority to the human maintainer.
Run bundle install, then the validation gate described in
AGENTS.md.
The public behavior surface is:
lib/ruby_api_pack_core.rblib/ruby_api_pack_core/configurable.rblib/ruby_api_pack_core/connection/base.rblib/ruby_api_pack_core/handlers/response_validator.rbREADME.md
Connection, validator, configurable, and response behavior changes require
matching specs and a changelog entry, because every downstream
ruby_api_pack_* gem inherits this behavior directly.
- Keep this gem free of vendor-specific knowledge — no API tokens, endpoint paths, resource classes, or third-party response shapes.
RubyApiPackCore::Connection::Baseis a template-method base class. Subclasses in consuming gems must only override#auth_headers; do not add vendor-specific public methods toBaseitself.- Preserve the public method names on
Connection::Base(api_get/api_post/api_put/api_delete) andHandlers::ResponseValidator(validate_response) unless the change is intentionally breaking — everyruby_api_pack_*gem depends on this surface staying stable. - Any breaking change here requires a coordinated migration plan across
ruby_api_pack_active_campaign,ruby_api_pack_cloudways, andruby_api_pack_wordpressbefore or alongside the release — do not publish a breakingruby_api_pack_coreversion without updating consumers. - Avoid broad refactors unless they directly support the requested change.
- Do not expose credentials, tokens, or vendor response bodies in logs, fixtures, docs, or test output — this gem's specs use synthetic fixtures only, never real API traffic.
Connection::Basechanges need GET, POST, PUT, DELETE, parsing, and failure specs, exercised against a dummy subclass (seespec/ruby_api_pack_core/connection/base_spec.rb).Handlers::ResponseValidatorchanges need specs for everyexpected_typebranch plus the Rails/non-Rails logging paths.Configurablechanges need specs covering memoization and multipleconfigurecalls.- Security-sensitive changes should include both success and failure coverage.
Update:
README.mdfor public installation, usage, or contract changes.CHANGELOG.mdfor every behavior-impacting change.SECURITY.mdwhen security reporting or guidance changes.- AI docs when agent workflows or authority boundaries change.
- The consuming gems' own
CLAUDE.md/README.mdif this gem's contract changes in a way that affects how they subclass or extend it.
- Update
lib/ruby_api_pack_core/version.rb. - Move changelog notes from
[Unreleased]into a dated version section. - Run the validation gate described in AGENTS.md.
- Confirm
ruby_api_pack_active_campaign,ruby_api_pack_cloudways, andruby_api_pack_wordpressstill pass their own validation gates against the new version before publishing, if the change is anything other than additive. - Build and publish only when the maintainer explicitly approves.