Skip to content

Commit ede46c8

Browse files
committed
Add bin/ci script and AGENTS.md for ChatGPT Codex support
1 parent 8254958 commit ede46c8

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

AGENTS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AGENTS.md
2+
3+
## Project
4+
- Ruby: 3.4.4 (installed via rbenv in setup)
5+
- Rails: 7.1
6+
- Node: 20
7+
- DB: PostgreSQL + PostGIS
8+
- Search: Elasticsearch 7.17.23
9+
- Test app: `spec/dummy`
10+
11+
## Setup
12+
- Environment runs a setup script that installs Ruby 3.4.4, Node 20, Postgres + PostGIS, and ES7, then prepares databases.
13+
- Databases:
14+
- development: `community_engine_development`
15+
- test: `community_engine_test`
16+
- Use `DATABASE_URL` to connect (overrides fallback host in database.yml).
17+
18+
## Commands
19+
- Run tests: `bin/ci`
20+
(Equivalent: `cd spec/dummy && bundle exec rspec`)
21+
- Lint: `bundle exec rubocop`
22+
- Security: `bundle exec brakeman -q -w2` and `bundle exec bundler-audit --update`
23+
24+
## Conventions
25+
- Make incremental changes with passing tests.
26+
- Avoid introducing new external services in tests; stub where possible.
27+
28+
## Code Style
29+
- Always run `bin/codex_style_guard` before proposing a patch.
30+
- If RuboCop reports offenses after autocorrect, update the changes until it passes.

bin/ci

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
export RAILS_ENV="${RAILS_ENV:-test}"
5+
export NODE_ENV="${NODE_ENV:-test}"
6+
export DISABLE_SPRING=1
7+
8+
# Ensure DB is ready (uses DATABASE_URL)
9+
cd spec/dummy
10+
bundle exec rails db:prepare
11+
12+
# Optional: assets if your specs need them
13+
# bundle exec rails assets:precompile || true
14+
15+
# Run specs from dummy
16+
bundle exec rspec --format documentation

0 commit comments

Comments
 (0)