Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
da7880b
Allow a list of schemas when switching using schemas
marksiemers Apr 13, 2021
b3937d6
Remove unnecessary rubocop disable directive
marksiemers Apr 13, 2021
af01032
Fixed rubocop version and fixed reported violations
rpbaltazar May 1, 2021
2a8c359
added ruby version and reviewdog
rpbaltazar May 1, 2021
9f838ae
removed rubocop from circleci
rpbaltazar May 1, 2021
f79ec20
update rubocop local config and fix remaining broken rules
rpbaltazar May 3, 2021
0ed15c8
Add Ruby 3 to build matrix
marcelolx May 25, 2021
8031e44
moved dependency to development depenedncy
rpbaltazar May 6, 2021
c79245b
moved gems to development dependencies
rpbaltazar May 6, 2021
b0622b9
trying to specify rubocop version so it does not default to latest
rpbaltazar May 6, 2021
5793f38
do not skip any file
rpbaltazar May 6, 2021
6dd1e6d
specify version
rpbaltazar May 6, 2021
0a10581
removed rubocop performance rails and rspec
rpbaltazar May 6, 2021
8001d57
addressed rubocop gems out of order
rpbaltazar May 6, 2021
82c3579
specify rubocop extensions versions
rpbaltazar Jun 25, 2021
8d41888
string with all extensions
rpbaltazar Jun 25, 2021
8312f13
put back the extensions in rubocop yml
rpbaltazar Jun 25, 2021
5483c59
commented capybara references
rpbaltazar Jun 25, 2021
85e6472
removed unused capybara
rpbaltazar Jun 25, 2021
d8334e5
added rubocop extensions versions to development dependencies
rpbaltazar Jun 25, 2021
8d934b0
exclude rake environment from rakefile
rpbaltazar Jun 25, 2021
3b3f9d5
disabled application record cop because apartment is an engine.
rpbaltazar Jun 25, 2021
24e2803
fixed filepath rule
rpbaltazar Jun 25, 2021
0067ee8
replace it_should_behave_like with it_behaves_like
rpbaltazar Jun 25, 2021
794f527
cleanup spacings in gemspec
rpbaltazar Jun 25, 2021
adfa41f
addressed Performance/RedundantBlockCall
rpbaltazar Jun 26, 2021
3fdd298
addressed Performance/RedundantEqualityComparisonBlock
rpbaltazar Jun 26, 2021
05ad40d
disabled rake environment from rubocop
rpbaltazar Jun 26, 2021
b4d5015
address a bunch of breaking rules
rpbaltazar Jun 26, 2021
2fb4b1b
use logger info instead of puts
rpbaltazar Jun 26, 2021
c0fbc94
addressed Performance/StringReplacement
rpbaltazar Jun 26, 2021
d6a2de6
Updated rubocop todo
rpbaltazar Jun 26, 2021
c9a3618
addressed Performance/TimesMap
rpbaltazar Jun 26, 2021
3a96167
addressed Rails/FilePath
rpbaltazar Jun 26, 2021
7e0c06d
addressed RSpec/EmptyLineAfterHook
rpbaltazar Jun 26, 2021
8f32e78
addressed Lint/NonDeterministicRequireOrder
rpbaltazar Jun 26, 2021
08e1041
allow puts instead of logger
rpbaltazar Jun 26, 2021
c733f35
Fix create schema between different versions of DB
oleksii-leonov Apr 28, 2021
049198c
added junit formatter, output and save the spec results
rpbaltazar Sep 12, 2021
0938d58
alphabetical sorting of gem
rpbaltazar Sep 12, 2021
06ad2d6
cache key breaks when receiving a belongs to reflection
rpbaltazar Sep 11, 2021
1929f5f
version bump
rpbaltazar Sep 13, 2021
ff02612
[#151] removed reloader and console overwrite of reload method
rpbaltazar Sep 14, 2021
5183128
Show previous error message
lunks Oct 19, 2021
cbaed21
Show underlying error message and class if we cannot set search path …
lunks Oct 22, 2021
35b11fe
Add rails 7 support
StefSchenkelaars Dec 16, 2021
6ec0813
Update README.md
guillaumebriday Dec 23, 2021
b580421
copied fsateler solution from the draft pr to this
rpbaltazar Feb 1, 2022
226d112
added some tests
rpbaltazar Feb 2, 2022
f5100f0
if current seq name does not match current tenant, fix it
rpbaltazar Feb 2, 2022
e43272d
dont create two different addapters
rpbaltazar Feb 2, 2022
d9a7ece
removed complex logic and fixed failed checks
rpbaltazar Feb 2, 2022
eb379d6
assure company is always part of the excluded models
rpbaltazar Feb 2, 2022
12f81a4
using adapter in subject
rpbaltazar Feb 2, 2022
114f65b
using adapter for subject
rpbaltazar Feb 2, 2022
4cbcbaa
ignore rubocop inline
rpbaltazar Feb 2, 2022
cd6c199
reverse negative evaluation and skipping sub if not needed
rpbaltazar Feb 2, 2022
56f63fd
fix conditional sub
rpbaltazar Feb 2, 2022
b67bc7a
only require apartment PostgreSQLAdapter if were using postgres
rpbaltazar Feb 3, 2022
0922157
move require of postgresql adapter patch to postgresql adapter
rpbaltazar Feb 3, 2022
19f1e17
cleanup default sequence name
rpbaltazar Feb 3, 2022
2d034f0
version bump
rpbaltazar Feb 7, 2022
023d008
follow lograge unsubscribe implementation
rpbaltazar Feb 5, 2022
1c6311f
simplify unsuscribe logic
rpbaltazar Feb 6, 2022
9c45b85
[#152] use current_database method existing in both adapter
rpbaltazar Feb 7, 2022
ce74baf
[#152] updated logic for fetching db name
rpbaltazar Feb 7, 2022
d197370
[#152] refactor logic to support mysql
rpbaltazar Feb 7, 2022
34f6cfc
Remove deprecated `database:` keyword from connection handling monkey…
calmyournerves Feb 13, 2022
f107467
Only include the connection handling monkey patch for ActiveRecord >= 6
calmyournerves Feb 13, 2022
8825447
Add specs for the connection handling monkey patch
calmyournerves Feb 13, 2022
7d626d1
Simplify & make rubocop happy
calmyournerves Feb 16, 2022
48e100f
Bump public_suffix version range
kfriend Oct 19, 2022
4f7d353
Update README.md
harmdewit Jan 16, 2023
6ed353a
update circleci workflow
jespersandnielsen Apr 12, 2023
e3f24bf
Correct links in README
okuramasafumi Aug 23, 2023
898c101
Merge pull request #221 from jespersandnielsen/development
riggleg Feb 24, 2024
76d7746
Support Rails 7.1, drop Ruby 2.x and Rails < 6.1
eraffel-MDSol Feb 21, 2024
55e07cf
Merge pull request #229 from okuramasafumi/okuramasafumi-patch-1
mnovelo Mar 27, 2024
836be34
Merge pull request #212 from harmdewit/patch-1
mnovelo Mar 27, 2024
784fbe4
Merge pull request #207 from kfriend/patch-1
mnovelo Mar 27, 2024
4f95aa2
Merge pull request #243 from eraffel-MDSol/development
mnovelo Mar 27, 2024
4c49d87
Updates bold attribute to named attribute
rgp Apr 2, 2024
1de1f1b
Merge pull request #246 from rgp/update/update-logger-rails72
mnovelo Apr 2, 2024
e3593db
Move CI to Github Actions
mrpasquini May 7, 2024
588a67d
Cache bundle, upgrade Rubocop and move to own workflow
mrpasquini May 7, 2024
ce445e0
Full test matrix with jruby
mrpasquini May 10, 2024
7fed110
Fix Failing jruby mysql test
mrpasquini May 13, 2024
e5bc396
Possible jruby postgres fix
mrpasquini May 13, 2024
0f4c823
Merge pull request #251 from mrpasquini/github_actions
IanMcNelly May 14, 2024
d9627b1
Allow rack 3 to be used
npezza93 May 9, 2024
12d4ff8
fix methods signatures for rails less or equal to 6.2
rpbaltazar Feb 21, 2022
2e1d6cd
Merge pull request #254 from mrpasquini/fix_method_sigs
mnovelo May 14, 2024
35719cb
Add trilogy adapter
npezza93 Dec 12, 2023
0362e98
Add spec
npezza93 May 9, 2024
ced3747
add version constraint
npezza93 May 14, 2024
d6f1677
Fix cops
npezza93 May 14, 2024
231a567
Wrap JDBC specific fix in postgres adapter
mrpasquini May 15, 2024
666be90
Merge pull request #255 from mrpasquini/move_postgres_fix
mnovelo May 15, 2024
011cf3b
Remove Travis CI build status badge
cmayor May 15, 2024
d544c43
Link the gem version badge to the correct gem
cmayor May 15, 2024
6d26bd7
Merge pull request #256 from cmayor/remove_build_status
mnovelo May 16, 2024
b7ecd14
Remove Changelog Action and build on Development branch
mrpasquini May 16, 2024
c03b1ce
Update .github/workflows/main.yml
mrpasquini May 17, 2024
8c1afe1
Merge pull request #257 from mrpasquini/remove_changelog_workflow
mnovelo May 17, 2024
2185f5f
Add workflow to publish gem
mnovelo May 23, 2024
630c17a
Rubocop fixes
mnovelo May 23, 2024
d6ccbca
Merge pull request #258 from rails-on-services/man/gem-publish-workflow
mnovelo May 23, 2024
1750c40
Merge pull request #259 from rails-on-services/development
mnovelo May 23, 2024
b1115aa
Update version to avoid tag conflicts
mnovelo May 23, 2024
2f4ba72
Merge pull request #260 from rails-on-services/man/3.0.1
mnovelo May 23, 2024
5212fe1
Merge branch 'main' into development
mnovelo May 23, 2024
906d6d0
Merge pull request #261 from rails-on-services/development
mnovelo May 23, 2024
26732b1
chore: Update Ruby and SQLite dependencies (#262)
mnovelo May 24, 2024
a63cb30
Merge branch 'main' into development
mnovelo May 24, 2024
55c7ca6
chore: Update Ruby and SQLite dependencies (#262) (#263)
mnovelo May 24, 2024
5b15dfb
Merge branch 'main' into development
mnovelo May 24, 2024
7fc490a
Update Appraisals and gem versions (#264)
mnovelo May 24, 2024
43444d1
Update Ruby and SQLite dependencies (#265)
mnovelo May 24, 2024
1ed4673
Merge branch 'main' into development
mnovelo May 24, 2024
6cdef59
Fix Ruby 3.0 support (#266)
shkm May 24, 2024
17d43a1
Explicitly state Ruby version constraints in gemspec (#267)
mnovelo May 24, 2024
d672a0e
Merge pull request #268 from rails-on-services/development
mnovelo May 24, 2024
6096b74
Bump version
mnovelo May 24, 2024
89ba8e5
Bump version
mnovelo May 24, 2024
fac1dd8
Merge branch 'main' into development
mnovelo May 24, 2024
6476f32
Merge pull request #269 from rails-on-services/development
mnovelo May 24, 2024
1335814
Bump version
mnovelo May 24, 2024
3e381b4
Merge remote-tracking branch 'origin/main' into development
mnovelo May 24, 2024
8578ccf
Merge pull request #270 from rails-on-services/development
mnovelo May 24, 2024
499fc80
Merge branch 'main' into development
mnovelo May 24, 2024
fcbcc24
Merge branch 'development' into trilogy
npezza93 May 26, 2024
feb598a
FIx cops
npezza93 May 26, 2024
d06a0af
fix text
npezza93 May 26, 2024
21a761a
Fix ruby_version of 3.0
znz May 27, 2024
c8170dc
Merge pull request #271 from znz/patch-1
mnovelo May 28, 2024
7e966e1
Merge pull request #252 from workingnotworking/trilogy
mnovelo May 28, 2024
9c175de
Bump version
mnovelo May 28, 2024
9c0fe72
Merge pull request #273 from rails-on-services/development
mnovelo May 28, 2024
608c29d
Support rails 7.2 (#278)
npezza93 Aug 14, 2024
973828f
Update .ruby-version (#279)
ferdinandrosario Aug 14, 2024
87247aa
Properly reset sequence if switching with multiple schemas (#203)
ryanswood Aug 14, 2024
81ae1f1
Support public_suffix major version 6 (#281)
tangposmarvin Aug 20, 2024
44ee01b
squash (#287)
m-zielinski Sep 27, 2024
0c0faf1
Prevent Rails 7.1 create_schema from being added to db/schema.rb (#276)
patbenatar Sep 27, 2024
ce37f62
fix: Deprecation cannot find version error (#291)
lit-poks Oct 9, 2024
d2f1d21
Fix: ActiveRecord monkeypatch breaking Solid Cache (#290)
JustinGranof Oct 9, 2024
2aae992
fix: ignore transaction_timeout statement added in postgresql 17 (#289)
martinbarilik Oct 24, 2024
ddd0c1d
Exclude the default tenant table if it exists in the procedure (#184)
zakky21 Oct 24, 2024
3780a5f
Use `Rails.application.executor.wrap` in Threads (#288)
jordan-brough Oct 24, 2024
b3810fb
Split specs according to db version (#292)
mnovelo Oct 28, 2024
b665252
Fix mysql specs and add codecov (#295)
mnovelo Oct 28, 2024
de7662b
Only track lib files for code coverage (#296)
mnovelo Oct 28, 2024
4a58bb3
Filter out spec coverage (#297)
mnovelo Oct 28, 2024
ec5a9bc
Also match custom default tenant on PSQL_DUMP_BLACKLISTED_STATEMENTS …
rbngzlv Oct 30, 2024
261a797
Remove upper bound for Ruby version (#307)
swiknaba Jan 7, 2025
9d95388
Update Ruby and Apartment versions for Rails 8.0 support (#309)
mnovelo Jan 9, 2025
2fb25d4
Merge pull request #310 from rails-on-services/development
mnovelo Jan 9, 2025
8fe2d3d
Merge pull request #311 from rails-on-services/main
mnovelo Jan 9, 2025
739d391
Relax `public_suffix` dependency from `<= 6.0.1` to `< 7`
oleksii-leonov Jun 20, 2025
755a9a9
Merge pull request #320 from oleksii-leonov/patch-2
mnovelo Jun 21, 2025
08eddbb
Update ActiveRecord and ActiveSupport dependencies for Rails 8.2 comp…
moskvin Nov 23, 2025
f7945b5
Add comprehensive documentation for Apartment v3 (#330)
mnovelo Nov 24, 2025
2f23537
Merge pull request #331 from rails-on-services/development
mnovelo Nov 24, 2025
98fabd7
Add platform-aware parallel migrations with advisory lock management …
mnovelo Dec 16, 2025
e88e7f3
Merge pull request #335 from rails-on-services/development
mnovelo Dec 16, 2025
6f09684
Add RELEASING.md documenting the gem release process (#336)
mnovelo Dec 16, 2025
d1e6c75
Fix multi-database rake tasks and connection pool isolation (v3.4.1) …
mnovelo Dec 22, 2025
b003d15
Unify AI tools config: plugins and MCP servers
mnovelo Mar 17, 2026
f0fdace
Add .vscode/* to .gitignore to match www repo convention
mnovelo Mar 18, 2026
ddd694f
Merge pull request #344 from rails-on-services/unify-ai-tools-config
mnovelo Mar 18, 2026
54c5303
Add Apartment v4 design spec
mnovelo Mar 18, 2026
c1ac1a1
Move design spec to docs/designs/, add .firecrawl to .gitignore
mnovelo Mar 18, 2026
7251fc0
Merge pull request #345 from rails-on-services/man/v4-design-spec
mnovelo Mar 18, 2026
496f7d3
Add v4 implementation plans and worktree tooling (#346)
mnovelo Mar 19, 2026
6ea2f0b
Apartment v4 Phase 1: Foundation (config, current, pool management) (…
mnovelo Mar 20, 2026
e6e8079
Add Phase 2 implementation plan: Adapters & Tenant API (#348)
mnovelo Mar 21, 2026
fb06295
Apartment v4 Phase 2.1: Tenant API, AbstractAdapter, Adapter Factory …
mnovelo Mar 26, 2026
ed1408b
Rewrite README and improve CLAUDE.md files (#350)
mnovelo Mar 26, 2026
17f64e7
Fix ambiguous wording in v4 rationale (#351)
mnovelo Mar 26, 2026
64d77e0
Apartment v4 Phase 2.2: Concrete database adapters (#352)
mnovelo Mar 29, 2026
5a2a5bf
Apartment v4 Phase 2.3: Connection Handling & Pool Wiring (#353)
mnovelo Mar 29, 2026
da69807
Apartment v4 Phase 2.4: Excluded Models, Integration Tests & Stress T…
mnovelo Mar 29, 2026
83ab82c
v4 Railtie, tenant name validation, and test infrastructure (#355)
mnovelo Mar 30, 2026
245c074
Phase 2.5: Delete v3 files, rename to Zeitwerk conventions (#356)
mnovelo Mar 30, 2026
3168450
Phase 3: v4 Elevators (#357)
mnovelo Mar 30, 2026
3e6796e
Phase 4: v4 Migrator, Schema Dumper Patch, Rake Integration (#358)
mnovelo Apr 1, 2026
e23edab
Phase 5: Role-Aware Connections, RBAC Grants, Schema Cache (#359)
mnovelo Apr 1, 2026
5ab9db5
Phase 5.2: RBAC Integration Tests (#360)
mnovelo Apr 2, 2026
b299008
Phase 5.3: Database-per-tenant callable app_role + MySQL test tighten…
mnovelo Apr 4, 2026
c52f216
Phase 5.4: Environmentify length validation + MySQL grant quoting (#362)
mnovelo Apr 4, 2026
299f96d
Phase 6: Thor CLI, Rake Refactor, Generator Rewrite (#363)
mnovelo Apr 4, 2026
69bba42
Phase 7: Integration & Stress Tests (#364)
mnovelo Apr 4, 2026
477cb53
Phase 7.1: Excluded Models Fix + Apartment::Model Concern (#365)
mnovelo Apr 4, 2026
268b0ca
Phase 8: Documentation, Upgrade Guide & Branch Strategy (#366)
mnovelo Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 0 additions & 78 deletions .circleci/config.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"enabledPlugins": {
"ruby-lsp@claude-plugins-official": true,
"superpowers@claude-plugins-official": true,
"context7@claude-plugins-official": true,
"code-review@claude-plugins-official": true,
"commit-commands@claude-plugins-official": true,
"pr-review-toolkit@claude-plugins-official": true,
"claude-md-management@claude-plugins-official": true,
"feature-dev@claude-plugins-official": true,
"code-simplifier@claude-plugins-official": true,
"sentry@claude-plugins-official": true,
"github@claude-plugins-official": true,
"security-guidance@claude-plugins-official": true,
"firecrawl@claude-plugins-official": true,
"skill-creator@claude-plugins-official": true
}
}
119 changes: 119 additions & 0 deletions .claude/skills/manage-worktree/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
name: manage-worktree
description: >
Create, move, or remove a git worktree.
Use when the user asks to create a worktree, start a new branch in a worktree,
move a branch to a worktree, work on something in parallel, remove/delete a worktree,
or says "/manage-worktree <name>". Handles stashing, branch management, setup, and cleanup.
argument-hint: [branch-name]
allowed-tools: Bash(git worktree *), Bash(bin/dev/setup-worktree *), Bash(bin/dev/remove-worktree *), Bash(git branch *), Bash(git stash *), Bash(git checkout *), Bash(git switch *)
---

# Manage Worktree

## Path Resolution

**Always resolve the worktree base from the main repo** — relative paths like `../apartment-worktrees/`
break when invoked from inside an existing worktree.

```bash
MAIN_REPO=$(git worktree list --porcelain | head -1 | sed 's/^worktree //')
WORKTREE_BASE="$(dirname "$MAIN_REPO")/apartment-worktrees"
```

Use `$WORKTREE_BASE/<name>` for all worktree paths in the steps below.

## Conventions

- Path: `$WORKTREE_BASE/<name>` (sibling to main repo)
- Branch: `<dev-prefix>/<name>` (e.g., `man/v4-foundation`, `jb/fix-auth`)
- Base: current branch (confirm if it's a feature branch rather than `development`)
- **Always** run `bin/dev/setup-worktree` after `git worktree add`
- Remove with: `bin/dev/remove-worktree <name> --delete-branch`

## Mode Detection

Determine the mode from the argument and user intent:

1. **Remove mode** — if the user says "remove", "delete", "clean up", or "tear down" a worktree
2. **Move mode** — if `$ARGUMENTS` matches an existing local branch (`git branch --list "$ARGUMENTS"`), or the user says "move this branch to a worktree"
3. **Create mode** — otherwise (new branch + worktree)

## Create Mode (new branch)

1. **Detect developer prefix** from remote branches:
```bash
git branch -r | sed 's|^ *origin/||' | grep -E '^[a-z]{2,4}/' | cut -d/ -f1 | sort | uniq -c | sort -rn
```
Known prefixes: `man`. Exclude automated prefixes (`seer/`, `fix/`, `feat/`, `docs/`). Ask if unclear.

2. **Stash** uncommitted changes (if dirty): `git stash push -u -m "pre-worktree: $ARGUMENTS"`

3. **Get base branch**: `git branch --show-current`

4. **Create worktree**:
```bash
mkdir -p "$WORKTREE_BASE"
git worktree add "$WORKTREE_BASE/$ARGUMENTS" -b <prefix>/$ARGUMENTS <base-branch>
```

5. **Run setup** (copies `.claude`, `.bundle`, `.vscode`, sets Peacock color):
```bash
bin/dev/setup-worktree "$WORKTREE_BASE/$ARGUMENTS"
```

6. **Pop stash** in the **original** worktree (not the new one) if stashed in step 2.

7. **Report**: worktree path, branch name, base branch, any issues.

## Move Mode (existing branch → worktree)

Moves the current or specified branch out of the main repo into a dedicated worktree.
The main repo switches back to a base branch (`development` by default).

1. **Identify the branch to move**: `$ARGUMENTS` or `git branch --show-current`

2. **Derive worktree name** from the branch name (strip the dev prefix):
- `man/v4-foundation` → worktree name: `v4-foundation`
- Already unprefixed → use as-is

3. **Stash** uncommitted changes (if dirty): `git stash push -u -m "pre-worktree-move: <branch>"`

4. **Determine return branch**: default is `development`.

5. **Switch main repo** to the return branch: `git switch <return-branch>`

6. **Create worktree** with the existing branch (no `-b`):
```bash
mkdir -p "$WORKTREE_BASE"
git worktree add "$WORKTREE_BASE/<worktree-name>" <branch>
```

7. **Run setup**:
```bash
bin/dev/setup-worktree "$WORKTREE_BASE/<worktree-name>"
```

8. **Pop stash** in the **new worktree** (that's where the work continues):
```bash
cd "$WORKTREE_BASE/<worktree-name>" && git stash pop
```

9. **Report**: worktree path, branch name, return branch in main repo, any issues.

## Remove Mode (delete worktree)

1. **Resolve worktree name** from `$ARGUMENTS`

2. **Verify it exists**:
```bash
ls "$WORKTREE_BASE/<name>" 2>/dev/null
```

3. **Run removal**:
```bash
bin/dev/remove-worktree <name> --delete-branch --confirm
```
Omit `--confirm` if the user hasn't explicitly confirmed.

4. **Report**: confirm removal, branch deletion, any issues.
63 changes: 0 additions & 63 deletions .github/workflows/changelog.yml

This file was deleted.

Loading