Skip to content

Commit 499789f

Browse files
committed
Megabump dependencies
1 parent d5faf26 commit 499789f

47 files changed

Lines changed: 1652 additions & 2912 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ PORT=3000
5555
# Feature Flags (Optional)
5656
# ============================================
5757

58-
# These can also be managed via Flipper UI at /admin/feature_flags
58+
# These can also be managed via Flipper UI at /admin/flipper
5959
# ENABLE_ANALYTICS=false
6060
# ENABLE_BULK_IMPORT=false
6161
# ENABLE_EXPORT=false

.eslintrc.json

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ on:
55
branches: [ main ]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
packages: write
11+
812
env:
9-
RUBY_VERSION: '3.3.6'
10-
NODE_VERSION: '20'
11-
POSTGRES_VERSION: '17'
12-
REDIS_VERSION: '7'
13+
RUBY_VERSION: '4.0.1'
14+
NODE_VERSION: '24'
15+
POSTGRES_VERSION: '18'
16+
REDIS_VERSION: '8'
17+
REGISTRY: ghcr.io
1318

1419
jobs:
1520
test:
@@ -18,7 +23,7 @@ jobs:
1823

1924
services:
2025
postgres:
21-
image: postgres:17
26+
image: postgres:${{ env.POSTGRES_VERSION }}
2227
env:
2328
POSTGRES_PASSWORD: postgres
2429
POSTGRES_DB: streamsource_test
@@ -31,7 +36,7 @@ jobs:
3136
- 5432:5432
3237

3338
redis:
34-
image: redis:7
39+
image: redis:${{ env.REDIS_VERSION }}
3540
options: >-
3641
--health-cmd "redis-cli ping"
3742
--health-interval 10s
@@ -141,6 +146,40 @@ jobs:
141146
steps:
142147
- name: Checkout code
143148
uses: actions/checkout@v4
149+
150+
- name: Set image name
151+
id: image
152+
run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
153+
154+
- name: Set up QEMU
155+
uses: docker/setup-qemu-action@v3
156+
157+
- name: Set up Docker Buildx
158+
uses: docker/setup-buildx-action@v3
159+
160+
- name: Log in to GHCR
161+
uses: docker/login-action@v3
162+
with:
163+
registry: ${{ env.REGISTRY }}
164+
username: ${{ github.actor }}
165+
password: ${{ secrets.GITHUB_TOKEN }}
166+
167+
- name: Extract Docker metadata
168+
id: meta
169+
uses: docker/metadata-action@v5
170+
with:
171+
images: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}
172+
tags: |
173+
type=sha,format=long
174+
type=raw,value=latest
175+
176+
- name: Build and push image
177+
uses: docker/build-push-action@v6
178+
with:
179+
context: .
180+
push: true
181+
tags: ${{ steps.meta.outputs.tags }}
182+
labels: ${{ steps.meta.outputs.labels }}
144183

145184
- name: Deploy to DigitalOcean
146185
id: deploy
@@ -153,16 +192,12 @@ jobs:
153192
script: |
154193
set -e
155194
cd /var/www/streamsource
195+
export STREAMSOURCE_IMAGE="${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:sha-${{ github.sha }}"
196+
export STREAMSOURCE_ENV_FILE="/var/www/streamsource/.env.production"
156197
157-
# Set environment variables for deployment
158-
export GITHUB_REPOSITORY="${{ github.repository }}"
159-
export GITHUB_SHA="${{ github.sha }}"
160-
export GITHUB_REF="${{ github.ref }}"
161-
162-
# Run deployment with error handling
163-
echo "🚀 Starting deployment..."
164-
./deploy/github-deploy.sh
165-
198+
echo "🚀 Pulling image ${STREAMSOURCE_IMAGE}..."
199+
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull web
200+
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d web
166201
echo "✅ Deployment completed successfully"
167202
168203
- name: Comprehensive health check
@@ -244,4 +279,4 @@ jobs:
244279
"auto_merge": false
245280
}' || echo "Failed to record deployment"
246281
247-
echo "✅ Deployment metrics recorded"
282+
echo "✅ Deployment metrics recorded"

.github/workflows/pr-validation.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
branches: [ main, develop ]
77

88
env:
9-
RUBY_VERSION: '3.3.6'
10-
NODE_VERSION: '20'
11-
POSTGRES_VERSION: '17'
12-
REDIS_VERSION: '7'
9+
RUBY_VERSION: '4.0.1'
10+
NODE_VERSION: '24'
11+
POSTGRES_VERSION: '18'
12+
REDIS_VERSION: '8'
1313

1414
jobs:
1515
# Parallel job for different test types
@@ -25,7 +25,7 @@ jobs:
2525

2626
services:
2727
postgres:
28-
image: postgres:17
28+
image: postgres:${{ env.POSTGRES_VERSION }}
2929
env:
3030
POSTGRES_PASSWORD: postgres
3131
POSTGRES_DB: streamsource_test
@@ -38,7 +38,7 @@ jobs:
3838
- 5432:5432
3939

4040
redis:
41-
image: redis:7
41+
image: redis:${{ env.REDIS_VERSION }}
4242
options: >-
4343
--health-cmd "redis-cli ping"
4444
--health-interval 10s
@@ -471,4 +471,4 @@ jobs:
471471
issue_number: context.issue.number,
472472
body: summary
473473
});
474-
}
474+
}

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.6
1+
4.0.1

AGENTS.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `app/`: Rails application code (controllers, models, views, policies).
5+
- `app/javascript/`: Stimulus controllers and JS entrypoints; compiled into `app/assets/builds/`.
6+
- `app/assets/`: Tailwind entry CSS and built assets.
7+
- `config/`: Rails configuration (routes, initializers, environments).
8+
- `db/`: migrations, schema, and seeds.
9+
- `spec/`: RSpec tests, factories, and support helpers.
10+
- `docs/` + `swagger/`: API documentation and Swagger spec.
11+
- `deploy/`: deployment scripts and infrastructure configs.
12+
13+
## Build, Test, and Development Commands
14+
This repo is Docker-only; do not use system Ruby/Bundler.
15+
- Start/stop: `make up`, `make down`, logs with `make logs`.
16+
- Rails console: `make shell` or `docker compose exec web bin/rails console`.
17+
- Migrations: `make migrate`.
18+
- Tests: `make test` or `docker compose exec web bin/test [path]`.
19+
- Lint/security: `docker compose exec web bundle exec rubocop`, `docker compose exec web bundle exec brakeman -q -w2`.
20+
- JS/CSS build: `docker compose exec web yarn build` and `docker compose exec web yarn build:css`.
21+
22+
## Coding Style & Naming Conventions
23+
- Indentation: 2 spaces (EditorConfig).
24+
- Ruby: RuboCop (Rails/RSpec), line length 120, prefer double quotes.
25+
- JavaScript: ESLint Standard; single quotes, no semicolons, 2-space indent.
26+
- Naming: specs use `*_spec.rb`; factories live in `spec/factories/`.
27+
28+
## Testing Guidelines
29+
- Framework: RSpec with FactoryBot; avoid fixtures.
30+
- Run a single spec: `docker compose exec web bin/test spec/models/user_spec.rb`.
31+
- Coverage target is >90% (see `docs/LINTING.md`); add edge-case coverage for controllers and services.
32+
33+
## Commit & Pull Request Guidelines
34+
- Commit messages are short, imperative, and lowercase (e.g., “simplify makefile”).
35+
- Branch naming: `feature/...`, `fix/...`, `docs/...`.
36+
- PRs should include a brief summary, tests run, and doc updates. If API changes, update `docs/API.md` and `swagger/v1/swagger.yaml`.

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ StreamSource is a Rails 8 application providing both a RESTful API and a real-ti
3535

3636
### Core Technologies
3737
- **Rails 8.0.x** - Main framework
38-
- **Ruby 3.3.6** - Programming language
39-
- **PostgreSQL 17** - Primary database
40-
- **Redis 7** - Caching, ActionCable, sessions
38+
- **Ruby 4.0.1** - Programming language
39+
- **PostgreSQL 18** - Primary database
40+
- **Redis 8** - Caching, ActionCable, sessions
4141
- **Puma** - Web server with multi-worker support
4242
- **Docker** - Containerization (mandatory)
4343

0 commit comments

Comments
 (0)