ruby_api_pack_core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.all-contributorsrc +23 -0
- data/.circleci/config.yml +44 -0
- data/.claude/settings.json +36 -0
- data/.claude/settings.local.json +36 -0
- data/.coderabbit.yaml +75 -0
- data/.codex/README.md +31 -0
- data/.codex/change-watch.md +19 -0
- data/.codex/release-readiness.md +35 -0
- data/.editorconfig +22 -0
- data/.rspec +3 -0
- data/.rubocop.yml +70 -0
- data/AGENTS.md +117 -0
- data/CHANGELOG.md +48 -0
- data/CLAUDE.md +105 -0
- data/CODEX.md +66 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/CONTRIBUTING.md +111 -0
- data/COPILOT.md +30 -0
- data/JULES.md +34 -0
- data/MIT-LICENSE +21 -0
- data/README.md +281 -0
- data/ROADMAP.md +42 -0
- data/Rakefile +12 -0
- data/SECURITY.md +46 -0
- data/TODO.md +32 -0
- data/lib/ruby_api_pack_core/configurable.rb +25 -0
- data/lib/ruby_api_pack_core/connection/base.rb +94 -0
- data/lib/ruby_api_pack_core/handlers/response_validator.rb +31 -0
- data/lib/ruby_api_pack_core/version.rb +5 -0
- data/lib/ruby_api_pack_core.rb +12 -0
- data/ruby_api_pack_core.code-workspace +8 -0
- metadata +111 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f91aba38a51e699485d82617f5bc8178fe6719f716c1a0c496430a48a4de901b
|
|
4
|
+
data.tar.gz: 60bb0993675f97b91fda9e0eb95baf2b6030d22c64a7fbbe80e146ec9722c2e4
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b4642e964ce9097c32f90fcb5a584fd9cc4ed3cdf3ab9105c1a7382fe6c52ff07c1508675e83cac4f78ff823e3fe556987c7335435612862fdd755b27e14e56c
|
|
7
|
+
data.tar.gz: b7d660cfb7a646bc97af006c66251a6a70a3262fcd48bef6ba48a6fbd05f4e7cd3a81486982afe9e14edacb68ce88f9a396f3b6ec92cd56587a5de699b721f0c
|
data/.all-contributorsrc
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectName": "ruby_api_pack_core",
|
|
3
|
+
"projectOwner": "phcdevworks",
|
|
4
|
+
"repoType": "github",
|
|
5
|
+
"repoHost": "https://github.com",
|
|
6
|
+
"files": [
|
|
7
|
+
"README.md"
|
|
8
|
+
],
|
|
9
|
+
"imageSize": 100,
|
|
10
|
+
"commit": true,
|
|
11
|
+
"contributors": [
|
|
12
|
+
{
|
|
13
|
+
"login": "BradPotts",
|
|
14
|
+
"name": "Brad Potts",
|
|
15
|
+
"avatar_url": "https://avatars.githubusercontent.com/BradPotts",
|
|
16
|
+
"profile": "https://github.com/BradPotts",
|
|
17
|
+
"contributions": [
|
|
18
|
+
"code"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"commitConvention": null
|
|
23
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
orbs:
|
|
4
|
+
codecov: codecov/codecov@6.0.0
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
test:
|
|
8
|
+
parameters:
|
|
9
|
+
ruby-version:
|
|
10
|
+
type: string
|
|
11
|
+
docker:
|
|
12
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
|
13
|
+
steps:
|
|
14
|
+
- checkout
|
|
15
|
+
- restore_cache:
|
|
16
|
+
keys:
|
|
17
|
+
- bundle-<< parameters.ruby-version >>-{{ checksum "Gemfile.lock" }}
|
|
18
|
+
- run: bundle config set --local path 'vendor/bundle'
|
|
19
|
+
- run: bundle install
|
|
20
|
+
- save_cache:
|
|
21
|
+
key: bundle-<< parameters.ruby-version >>-{{ checksum "Gemfile.lock" }}
|
|
22
|
+
paths:
|
|
23
|
+
- vendor/bundle
|
|
24
|
+
- run:
|
|
25
|
+
name: bundle exec rspec
|
|
26
|
+
command: |
|
|
27
|
+
mkdir -p tmp/test-results
|
|
28
|
+
bundle exec rspec --format progress --format RspecJunitFormatter --out tmp/test-results/rspec.xml
|
|
29
|
+
- store_test_results:
|
|
30
|
+
path: tmp/test-results
|
|
31
|
+
- run: bundle exec rubocop
|
|
32
|
+
- codecov/upload:
|
|
33
|
+
files: coverage/.resultset.json
|
|
34
|
+
- codecov/upload:
|
|
35
|
+
files: tmp/test-results/rspec.xml
|
|
36
|
+
report_type: test_results
|
|
37
|
+
|
|
38
|
+
workflows:
|
|
39
|
+
test:
|
|
40
|
+
jobs:
|
|
41
|
+
- test:
|
|
42
|
+
matrix:
|
|
43
|
+
parameters:
|
|
44
|
+
ruby-version: ['3.3.4', '3.4']
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(bundle install*)",
|
|
5
|
+
"Bash(bundle exec rspec*)",
|
|
6
|
+
"Bash(bundle exec rubocop*)",
|
|
7
|
+
"Bash(gem build*)",
|
|
8
|
+
"Bash(git status)",
|
|
9
|
+
"Bash(git diff*)",
|
|
10
|
+
"Bash(git log*)"
|
|
11
|
+
],
|
|
12
|
+
"deny": [
|
|
13
|
+
"Bash(rm -rf*)",
|
|
14
|
+
"Bash(rm -fr*)",
|
|
15
|
+
"Bash(git commit*)",
|
|
16
|
+
"Bash(gh repo delete*)",
|
|
17
|
+
"Bash(gh repo archive*)",
|
|
18
|
+
"Bash(git push --force*)",
|
|
19
|
+
"Bash(git push -f*)",
|
|
20
|
+
"Bash(git reset --hard*)",
|
|
21
|
+
"Bash(git clean -f*)",
|
|
22
|
+
"Bash(git clean -d*)",
|
|
23
|
+
"Bash(git clean -x*)",
|
|
24
|
+
"Bash(git branch -D*)",
|
|
25
|
+
"Bash(git branch -d*)",
|
|
26
|
+
"Bash(git tag -d*)",
|
|
27
|
+
"Bash(git filter-branch*)",
|
|
28
|
+
"Bash(git filter-repo*)",
|
|
29
|
+
"Bash(git gc --prune*)",
|
|
30
|
+
"Bash(git rebase*)",
|
|
31
|
+
"Bash(gem yank*)",
|
|
32
|
+
"Bash(dd *)",
|
|
33
|
+
"Bash(mkfs*)"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(bundle install*)",
|
|
5
|
+
"Bash(bundle exec rspec*)",
|
|
6
|
+
"Bash(bundle exec rubocop*)",
|
|
7
|
+
"Bash(gem build*)",
|
|
8
|
+
"Bash(git status)",
|
|
9
|
+
"Bash(git diff*)",
|
|
10
|
+
"Bash(git log*)"
|
|
11
|
+
],
|
|
12
|
+
"deny": [
|
|
13
|
+
"Bash(rm -rf*)",
|
|
14
|
+
"Bash(rm -fr*)",
|
|
15
|
+
"Bash(git commit*)",
|
|
16
|
+
"Bash(gh repo delete*)",
|
|
17
|
+
"Bash(gh repo archive*)",
|
|
18
|
+
"Bash(git push --force*)",
|
|
19
|
+
"Bash(git push -f*)",
|
|
20
|
+
"Bash(git reset --hard*)",
|
|
21
|
+
"Bash(git clean -f*)",
|
|
22
|
+
"Bash(git clean -d*)",
|
|
23
|
+
"Bash(git clean -x*)",
|
|
24
|
+
"Bash(git branch -D*)",
|
|
25
|
+
"Bash(git branch -d*)",
|
|
26
|
+
"Bash(git tag -d*)",
|
|
27
|
+
"Bash(git filter-branch*)",
|
|
28
|
+
"Bash(git filter-repo*)",
|
|
29
|
+
"Bash(git gc --prune*)",
|
|
30
|
+
"Bash(git rebase*)",
|
|
31
|
+
"Bash(gem yank*)",
|
|
32
|
+
"Bash(dd *)",
|
|
33
|
+
"Bash(mkfs*)"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
data/.coderabbit.yaml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
|
|
2
|
+
language: "en-US"
|
|
3
|
+
early_access: false
|
|
4
|
+
reviews:
|
|
5
|
+
profile: "assertive"
|
|
6
|
+
request_changes_workflow: false
|
|
7
|
+
high_level_summary: true
|
|
8
|
+
high_level_summary_placeholder: "@coderabbitai summary"
|
|
9
|
+
auto_title_placeholder: "@coderabbitai"
|
|
10
|
+
review_status: true
|
|
11
|
+
commit_status: true
|
|
12
|
+
collapse_walkthrough: false
|
|
13
|
+
changed_files_summary: true
|
|
14
|
+
sequence_diagrams: true
|
|
15
|
+
assess_linked_issues: true
|
|
16
|
+
related_issues: true
|
|
17
|
+
related_prs: true
|
|
18
|
+
suggested_labels: true
|
|
19
|
+
auto_apply_labels: false
|
|
20
|
+
suggested_reviewers: false
|
|
21
|
+
poem: false
|
|
22
|
+
abort_on_close: true
|
|
23
|
+
auto_review:
|
|
24
|
+
enabled: true
|
|
25
|
+
auto_incremental_review: true
|
|
26
|
+
drafts: false
|
|
27
|
+
finishing_touches:
|
|
28
|
+
docstrings:
|
|
29
|
+
enabled: true
|
|
30
|
+
tools:
|
|
31
|
+
rubocop:
|
|
32
|
+
enabled: true
|
|
33
|
+
markdownlint:
|
|
34
|
+
enabled: true
|
|
35
|
+
gitleaks:
|
|
36
|
+
enabled: true
|
|
37
|
+
github-checks:
|
|
38
|
+
enabled: true
|
|
39
|
+
timeout_ms: 90000
|
|
40
|
+
yamllint:
|
|
41
|
+
enabled: true
|
|
42
|
+
languagetool:
|
|
43
|
+
enabled: true
|
|
44
|
+
level: default
|
|
45
|
+
actionlint:
|
|
46
|
+
enabled: true
|
|
47
|
+
semgrep:
|
|
48
|
+
enabled: true
|
|
49
|
+
path_instructions:
|
|
50
|
+
- path: "**/*.rb"
|
|
51
|
+
instructions: "Apply Ruby best practices. Flag: missing frozen_string_literal: true magic comment; unhandled HTTParty response error paths; Law of Demeter violations. This gem must stay free of vendor-specific knowledge (API tokens, endpoint paths, resource classes) -- flag any such addition as out of scope."
|
|
52
|
+
- path: "lib/ruby_api_pack_core/connection/base.rb"
|
|
53
|
+
instructions: "This is the shared template-method connection class every ruby_api_pack_* gem subclasses. Verify it stays vendor-agnostic (no hardcoded auth scheme beyond the #auth_headers abstract hook), JSON parsing failures are handled distinctly from non-2xx responses, and no request or response body is logged directly. Flag any public method name change as breaking -- every consuming gem depends on api_get/api_post/api_put/api_delete."
|
|
54
|
+
- path: "lib/ruby_api_pack_core/handlers/response_validator.rb"
|
|
55
|
+
instructions: "Verify validate_response's expected_type contract (:any/:array/:hash) stays stable, since every ruby_api_pack_* gem's resource classes call it directly. Flag any signature change as breaking."
|
|
56
|
+
- path: "lib/ruby_api_pack_core/configurable.rb"
|
|
57
|
+
instructions: "Verify the configure/configuration singleton pattern stays consistent with how RubyApiPackActiveCampaign, RubyApiPackCloudways, and RubyApiPackWordpress already use it. Flag any signature change as breaking."
|
|
58
|
+
- path: "spec/**"
|
|
59
|
+
instructions: "Enforce RSpec best practices: descriptive describe/context/it blocks, let over instance variables, and expectations that verify behavior rather than internal state. All specs must exercise a dummy subclass or dummy module -- never a real vendor API. Flag any fixture containing realistic-looking API tokens or credentials."
|
|
60
|
+
- path: "Gemfile"
|
|
61
|
+
instructions: "Flag overly permissive version constraints (>= x with no upper bound). Ensure test and development gems are in the correct group. Verify no gems with known CVEs are being introduced."
|
|
62
|
+
- path: "*.gemspec"
|
|
63
|
+
instructions: "Verify required_ruby_version is set, runtime dependencies are actually used in lib/ (no orphaned dependencies), summary and description are informative, and version follows semver."
|
|
64
|
+
- path: "CHANGELOG.md"
|
|
65
|
+
instructions: "Verify entries follow Keep a Changelog format with correct categorization (Added/Changed/Fixed/Removed) and link to a version tag. Breaking changes must note the required follow-up in the three consuming gems."
|
|
66
|
+
chat:
|
|
67
|
+
auto_reply: true
|
|
68
|
+
knowledge_base:
|
|
69
|
+
opt_out: false
|
|
70
|
+
learnings:
|
|
71
|
+
scope: auto
|
|
72
|
+
issues:
|
|
73
|
+
scope: auto
|
|
74
|
+
pull_requests:
|
|
75
|
+
scope: auto
|
data/.codex/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Codex Workspace Notes
|
|
2
|
+
|
|
3
|
+
This folder keeps Codex-facing operational notes for `ruby_api_pack_core`.
|
|
4
|
+
|
|
5
|
+
## Default Checks
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bundle exec rspec
|
|
9
|
+
bundle exec rubocop
|
|
10
|
+
gem build ruby_api_pack_core.gemspec
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Documentation Standard
|
|
14
|
+
|
|
15
|
+
Keep these files synchronized:
|
|
16
|
+
|
|
17
|
+
- `README.md`
|
|
18
|
+
- `CONTRIBUTING.md`
|
|
19
|
+
- `SECURITY.md`
|
|
20
|
+
- `CHANGELOG.md`
|
|
21
|
+
- `ROADMAP.md`
|
|
22
|
+
- `TODO.md`
|
|
23
|
+
- `AGENTS.md`
|
|
24
|
+
- `CLAUDE.md`, `CODEX.md`, `COPILOT.md`, `JULES.md`
|
|
25
|
+
- `.github/codex-instructions.md`, `.github/copilot-instructions.md`
|
|
26
|
+
|
|
27
|
+
## Security Reminder
|
|
28
|
+
|
|
29
|
+
Do not include real API tokens, credentials, or vendor response bodies in
|
|
30
|
+
docs, specs, logs, or examples. This gem carries no vendor credentials of its
|
|
31
|
+
own by design.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Change Watch
|
|
2
|
+
|
|
3
|
+
Use this file as a lightweight review log when preparing a documentation,
|
|
4
|
+
release, or stabilization handoff.
|
|
5
|
+
|
|
6
|
+
## Current Watch Points
|
|
7
|
+
|
|
8
|
+
- Any change to `Connection::Base`, `Handlers::ResponseValidator`, or
|
|
9
|
+
`Configurable` public method names is breaking for every consuming gem —
|
|
10
|
+
check for downstream coordination before merging.
|
|
11
|
+
- Vendor-specific knowledge (API tokens, endpoint paths, resource classes)
|
|
12
|
+
showing up in this gem is a scope violation, not a feature.
|
|
13
|
+
- Release changes should keep `VERSION`, `CHANGELOG.md`, gem build output, and
|
|
14
|
+
RubyGems publishing state aligned.
|
|
15
|
+
|
|
16
|
+
## Validation Notes
|
|
17
|
+
|
|
18
|
+
Record command results here only when useful for a release or PR handoff. Do
|
|
19
|
+
not paste secrets or live vendor response payloads.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Release Readiness
|
|
2
|
+
|
|
3
|
+
Use this checklist before a maintainer publishes `ruby_api_pack_core`.
|
|
4
|
+
|
|
5
|
+
## Validation
|
|
6
|
+
|
|
7
|
+
- [ ] `bundle exec rspec` passes.
|
|
8
|
+
- [ ] `bundle exec rubocop` passes.
|
|
9
|
+
- [ ] `gem build ruby_api_pack_core.gemspec` succeeds.
|
|
10
|
+
|
|
11
|
+
## Release Records
|
|
12
|
+
|
|
13
|
+
- [ ] `lib/ruby_api_pack_core/version.rb` has the intended version.
|
|
14
|
+
- [ ] `CHANGELOG.md` has a dated entry for the intended version.
|
|
15
|
+
- [ ] README usage reflects the current public contract.
|
|
16
|
+
- [ ] Security guidance is current.
|
|
17
|
+
|
|
18
|
+
## Downstream Coordination
|
|
19
|
+
|
|
20
|
+
- [ ] If the change is anything other than additive, confirm
|
|
21
|
+
`ruby_api_pack_active_campaign`, `ruby_api_pack_cloudways`, and
|
|
22
|
+
`ruby_api_pack_wordpress` still pass their own validation gates against
|
|
23
|
+
this version.
|
|
24
|
+
|
|
25
|
+
## Safety
|
|
26
|
+
|
|
27
|
+
- [ ] No real API tokens or credentials are present in source, docs, logs,
|
|
28
|
+
examples, or fixtures.
|
|
29
|
+
- [ ] No vendor response bodies are committed.
|
|
30
|
+
|
|
31
|
+
## Handoff
|
|
32
|
+
|
|
33
|
+
- [ ] Summarize change classification.
|
|
34
|
+
- [ ] Include validation results.
|
|
35
|
+
- [ ] Note any known release risks or skipped checks.
|
data/.editorconfig
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.md]
|
|
12
|
+
max_line_length = 88
|
|
13
|
+
trim_trailing_whitespace = true
|
|
14
|
+
|
|
15
|
+
[*.rb]
|
|
16
|
+
indent_size = 2
|
|
17
|
+
|
|
18
|
+
[*.gemspec]
|
|
19
|
+
indent_size = 2
|
|
20
|
+
|
|
21
|
+
[Makefile]
|
|
22
|
+
indent_style = tab
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-performance
|
|
3
|
+
- rubocop-rake
|
|
4
|
+
- rubocop-rspec
|
|
5
|
+
|
|
6
|
+
AllCops:
|
|
7
|
+
NewCops: enable
|
|
8
|
+
Exclude:
|
|
9
|
+
- "db/schema.rb"
|
|
10
|
+
- "db/migrate/**/*"
|
|
11
|
+
- "bin/**/*"
|
|
12
|
+
- "node_modules/**/*"
|
|
13
|
+
- "tmp/**/*"
|
|
14
|
+
- "vendor/**/*"
|
|
15
|
+
SuggestExtensions: false
|
|
16
|
+
|
|
17
|
+
Lint/RedundantCopDisableDirective:
|
|
18
|
+
Enabled: true
|
|
19
|
+
|
|
20
|
+
Metrics/BlockLength:
|
|
21
|
+
Exclude:
|
|
22
|
+
- "spec/**/*"
|
|
23
|
+
|
|
24
|
+
Style/Documentation:
|
|
25
|
+
Enabled: false
|
|
26
|
+
|
|
27
|
+
Naming/FileName:
|
|
28
|
+
Exclude:
|
|
29
|
+
- "db/schema.rb"
|
|
30
|
+
- "db/migrate/**/*"
|
|
31
|
+
- "Gemfile"
|
|
32
|
+
- "Guardfile"
|
|
33
|
+
- "Rakefile"
|
|
34
|
+
- "config.ru"
|
|
35
|
+
- "package.json"
|
|
36
|
+
- "*.yml"
|
|
37
|
+
- "*.md"
|
|
38
|
+
|
|
39
|
+
Layout/EndOfLine:
|
|
40
|
+
EnforcedStyle: lf
|
|
41
|
+
AutoCorrect: true
|
|
42
|
+
|
|
43
|
+
Layout/LineLength:
|
|
44
|
+
Max: 130
|
|
45
|
+
AllowHeredoc: true
|
|
46
|
+
AllowURI: true
|
|
47
|
+
|
|
48
|
+
Layout/TrailingEmptyLines:
|
|
49
|
+
Enabled: true
|
|
50
|
+
|
|
51
|
+
Metrics/MethodLength:
|
|
52
|
+
Max: 20
|
|
53
|
+
|
|
54
|
+
Metrics/AbcSize:
|
|
55
|
+
Max: 20
|
|
56
|
+
|
|
57
|
+
Metrics/ClassLength:
|
|
58
|
+
Max: 150
|
|
59
|
+
|
|
60
|
+
Naming/VariableNumber:
|
|
61
|
+
Enabled: false
|
|
62
|
+
|
|
63
|
+
RSpec/MultipleExpectations:
|
|
64
|
+
Max: 10
|
|
65
|
+
|
|
66
|
+
RSpec/MultipleMemoizedHelpers:
|
|
67
|
+
Max: 15
|
|
68
|
+
|
|
69
|
+
RSpec/ExampleLength:
|
|
70
|
+
Max: 15
|
data/AGENTS.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Ruby API Pack Core Agent Guide
|
|
2
|
+
|
|
3
|
+
## Repository Snapshot
|
|
4
|
+
|
|
5
|
+
| Field | Value |
|
|
6
|
+
|-------|-------|
|
|
7
|
+
| Project team | `project-ruby` |
|
|
8
|
+
| Repository role | Shared HTTP client foundation for all `ruby_api_pack_*` gems |
|
|
9
|
+
| Package/artifact | `ruby_api_pack_core` |
|
|
10
|
+
| Validation gate | `bundle exec rspec` + `bundle exec rubocop` + `gem build ruby_api_pack_core.gemspec` |
|
|
11
|
+
|
|
12
|
+
## Standard Authority Model
|
|
13
|
+
|
|
14
|
+
| Agent | Role | Authority |
|
|
15
|
+
|-------|------|-----------|
|
|
16
|
+
| Claude Code | Lead implementation and validation | [CLAUDE.md](CLAUDE.md) |
|
|
17
|
+
| OpenAI Codex | Documentation, release readiness, stabilization, and repo hygiene | [CODEX.md](CODEX.md) |
|
|
18
|
+
| ChatGPT | Strategy, coordination, prompt design, and external review | Support only |
|
|
19
|
+
| GitHub Copilot | Development assistance | [COPILOT.md](COPILOT.md) |
|
|
20
|
+
| Google Jules | Bounded automated maintenance | [JULES.md](JULES.md) |
|
|
21
|
+
|
|
22
|
+
Bradley Potts holds final authority for commits, merges, tags, publishing, and
|
|
23
|
+
releases.
|
|
24
|
+
|
|
25
|
+
## Standard Handoff
|
|
26
|
+
|
|
27
|
+
Every AI-prepared change should report files changed, validation performed,
|
|
28
|
+
public behavior or contract impact, and unresolved risks. Do not edit generated
|
|
29
|
+
outputs directly. Do not update [CHANGELOG.md](CHANGELOG.md) unless the change
|
|
30
|
+
is release-relevant.
|
|
31
|
+
|
|
32
|
+
This repository is maintained by PHCDevworks and contains the
|
|
33
|
+
`ruby_api_pack_core` Ruby gem: the shared connection wrapper, response
|
|
34
|
+
validator, and configuration pattern consumed by every other
|
|
35
|
+
`ruby_api_pack_*` gem in this project team.
|
|
36
|
+
|
|
37
|
+
## Upstream Requests and Roadmap Self-Expansion
|
|
38
|
+
|
|
39
|
+
Full directive: project-team [AGENTS.md](../AGENTS.md) "Upstream Requests and
|
|
40
|
+
Roadmap Self-Expansion." Applied to this repo:
|
|
41
|
+
|
|
42
|
+
- This gem is **upstream** of `ruby_api_pack_active_campaign`,
|
|
43
|
+
`ruby_api_pack_cloudways`, and `ruby_api_pack_wordpress` — those gems depend
|
|
44
|
+
on this one. This repo has no dependency on any other repo in this
|
|
45
|
+
workspace.
|
|
46
|
+
- Any breaking change to `Connection::Base`, `Handlers::ResponseValidator`, or
|
|
47
|
+
`Configurable`'s public method names must be coordinated with those three
|
|
48
|
+
consuming gems before or alongside release. Do not treat a breaking change
|
|
49
|
+
here as "docs/config only" — it has real downstream blast radius.
|
|
50
|
+
- If a consuming gem requests new shared behavior (e.g. a new HTTP verb, a new
|
|
51
|
+
validator mode), record it in this repo's own `TODO.md` under `## Requested
|
|
52
|
+
by Downstream`, kept visible and separate from self-planned work.
|
|
53
|
+
- This repo's own `ROADMAP.md` may be proactively expanded with new or
|
|
54
|
+
reordered phases by the agent's own analysis — but never mark a phase
|
|
55
|
+
delivered without `bundle exec rspec`, `bundle exec rubocop`, and
|
|
56
|
+
`gem build ruby_api_pack_core.gemspec` all passing.
|
|
57
|
+
- Surface any new TODO request or roadmap expansion in the handoff for Bradley
|
|
58
|
+
Potts in the same change it was made, and reflect cross-repo-relevant
|
|
59
|
+
changes in the project-team's own ROADMAP.md/TODO.md.
|
|
60
|
+
|
|
61
|
+
## Shared Source Rules
|
|
62
|
+
|
|
63
|
+
| Path | Status | Notes |
|
|
64
|
+
| --- | --- | --- |
|
|
65
|
+
| `lib/ruby_api_pack_core.rb` | May edit carefully | Public gem entry point |
|
|
66
|
+
| `lib/ruby_api_pack_core/configurable.rb` | May edit carefully | Shared configure/configuration mixin used by every consuming gem |
|
|
67
|
+
| `lib/ruby_api_pack_core/connection/base.rb` | May edit carefully | Shared HTTParty/Oj connection template — every consuming gem subclasses this |
|
|
68
|
+
| `lib/ruby_api_pack_core/handlers/response_validator.rb` | May edit carefully | Shared response-shape validator used by every consuming gem |
|
|
69
|
+
| `lib/ruby_api_pack_core/version.rb` | May edit for releases | Gem version authority |
|
|
70
|
+
| `spec/` | May edit | Required for behavior changes |
|
|
71
|
+
| `README.md`, `CHANGELOG.md`, docs | May edit | Keep public guidance synchronized |
|
|
72
|
+
| Credentials, secrets, tokens | Never commit | This gem has no vendor credentials of its own; keep it that way |
|
|
73
|
+
|
|
74
|
+
Full validation command:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bundle exec rspec
|
|
78
|
+
bundle exec rubocop
|
|
79
|
+
gem build ruby_api_pack_core.gemspec
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Core Rules
|
|
83
|
+
|
|
84
|
+
1. Treat `Connection::Base`, `Handlers::ResponseValidator`, `Configurable`,
|
|
85
|
+
and specs as the public behavior contract — every `ruby_api_pack_*` gem
|
|
86
|
+
depends on this surface staying stable.
|
|
87
|
+
2. Keep this gem free of any vendor-specific knowledge (API tokens, endpoint
|
|
88
|
+
paths, resource classes). If a change needs to know which third-party API
|
|
89
|
+
is being called, it belongs in a consuming gem instead.
|
|
90
|
+
3. `Connection::Base` subclasses in consuming gems should only need to
|
|
91
|
+
override `#auth_headers` — do not grow vendor-specific public methods on
|
|
92
|
+
`Base` itself.
|
|
93
|
+
4. Do not log or document real API tokens, response bodies, or credentials —
|
|
94
|
+
this gem's specs use synthetic fixtures only.
|
|
95
|
+
5. Update README and changelog when public usage changes.
|
|
96
|
+
6. Add focused tests for changed connection, validator, or configurable
|
|
97
|
+
behavior.
|
|
98
|
+
7. Preserve unrelated local changes.
|
|
99
|
+
|
|
100
|
+
## Agent-Specific Guides
|
|
101
|
+
|
|
102
|
+
- `CLAUDE.md` - primary implementation workflow.
|
|
103
|
+
- `CODEX.md` - documentation, release readiness, and stabilization workflow.
|
|
104
|
+
- `COPILOT.md` and `.github/copilot-instructions.md` - IDE support workflow.
|
|
105
|
+
- `JULES.md` - bounded automated maintenance workflow.
|
|
106
|
+
|
|
107
|
+
## Pull Request Creation
|
|
108
|
+
|
|
109
|
+
Every agent that opens a PR must populate every section of the repository PR
|
|
110
|
+
template:
|
|
111
|
+
|
|
112
|
+
- Linked issue - issue number (`#N`) or `N/A`
|
|
113
|
+
- Summary of changes - one or two bullets
|
|
114
|
+
- Change type - additive, behavior change, breaking, or docs/config only
|
|
115
|
+
- Checklist - completed items checked; blocked items left unchecked with a note
|
|
116
|
+
|
|
117
|
+
Never submit a PR with an empty body or only template headings.
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the versioning
|
|
5
|
+
reflects gem releases published to RubyGems.
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-07-11 — Phase 0 - Shared Foundations
|
|
8
|
+
|
|
9
|
+
Change type: additive (initial extraction)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Initial extraction of `ruby_api_pack_core` from the shared architecture
|
|
14
|
+
already converged on by `ruby_api_pack_active_campaign`,
|
|
15
|
+
`ruby_api_pack_cloudways`, and `ruby_api_pack_wordpress`:
|
|
16
|
+
- `RubyApiPackCore::Connection::Base`, a template-method HTTParty/Oj
|
|
17
|
+
connection wrapper providing `api_get`/`api_post`/`api_put`/`api_delete`,
|
|
18
|
+
shared URL building, `200..299` status handling, content-type-checked
|
|
19
|
+
JSON parsing, and descriptive error messages. Subclasses implement only
|
|
20
|
+
`#auth_headers`.
|
|
21
|
+
- `RubyApiPackCore::Handlers::ResponseValidator`, a generic response-shape
|
|
22
|
+
validator (`expected_type: :array`/`:hash`) with Rails-aware error
|
|
23
|
+
logging, matching the validator already used by
|
|
24
|
+
`ruby_api_pack_active_campaign` and `ruby_api_pack_wordpress`.
|
|
25
|
+
- `RubyApiPackCore::Configurable`, a mixin extracted from the
|
|
26
|
+
`configure`/`configuration` singleton pattern duplicated across all
|
|
27
|
+
three existing gems.
|
|
28
|
+
- Full RSpec coverage (19 examples, 100% line coverage) for the connection
|
|
29
|
+
base class, response validator, and configurable mixin, exercised against
|
|
30
|
+
synthetic dummy subclasses/modules.
|
|
31
|
+
- Standard PHCDevworks documentation scaffold: `README.md`, `AGENTS.md`,
|
|
32
|
+
`CLAUDE.md`, `CODEX.md`, `COPILOT.md`, `JULES.md`, `CONTRIBUTING.md`,
|
|
33
|
+
`SECURITY.md`, `CODE_OF_CONDUCT.md`, `MIT-LICENSE`, `ROADMAP.md`,
|
|
34
|
+
`TODO.md`, GitHub issue/PR templates, CI workflows, and `.coderabbit.yaml`.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Bumped `httparty` to `~> 0.24.0` (from `~> 0.22.0`) and `rubocop-rake` to
|
|
39
|
+
`~> 0.7.0` (from `~> 0.6.0`) to track current RubyGems releases.
|
|
40
|
+
- Reverted an attempted development `bundler` bump to `~> 4.0`; kept `~> 2.5`
|
|
41
|
+
after CI failed to resolve/install the newer major version.
|
|
42
|
+
- Raised `required_ruby_version` to `>= 3.3.0` (from `>= 3.1.0`), matching
|
|
43
|
+
Rails 8's own Ruby floor. `httparty` and `rubocop` both carry unbounded
|
|
44
|
+
transitive dependencies (`multi_xml`, `parallel`) whose newer majors
|
|
45
|
+
require Ruby >= 3.2 and >= 3.3 respectively; rather than pin those
|
|
46
|
+
transitive deps indefinitely, dropped support for Ruby versions below what
|
|
47
|
+
Rails 8 itself requires. Updated the CI matrix to `['3.3.4', '3.4']`
|
|
48
|
+
accordingly.
|