Releases: rails-on-services/apartment
v3.4.1
v3.4.0
v3.3.0
Release v3.3.0
This release brings comprehensive documentation, Rails 8.0/8.1/8.2 support, PostgreSQL 17/18 support, RuboCop compliance, improved test coverage, and multiple bug fixes.
What's Changed
- Relax
public_suffixdependency from<= 6.0.1to< 7by @oleksii-leonov in #320 - Update ActiveRecord and ActiveSupport dependencies for Rails 8.2 comp… by @moskvin in #329
- Add comprehensive documentation for Apartment v3 by @mnovelo in #330
- Release v3.3.0 by @mnovelo in #331
New Contributors
📦 Version Bump
3.1.0 → 3.3.0
⚠️ Breaking Changes
Rails 6.1 Support Dropped
- Removed Rails 6.1 test configurations and Appraisal gemfiles
- Minimum supported Rails version remains 6.1.0 in gemspec, but no longer actively tested
- Rails 7.0+ is now the recommended minimum version
📚 Major Improvements
Documentation (#330)
- Added comprehensive CLAUDE.md documentation files throughout codebase
- New
docs/architecture.md- Core design decisions and rationale - New
docs/adapters.md- Database strategy trade-offs - New
docs/elevators.md- Middleware design patterns - Added
CODE_OF_CONDUCT.md - Renamed
CHANGELOG.mdtolegacy_CHANGELOG.md
Rails Support
- ✅ Rails 8.0 support (#309)
- ✅ Rails 8.1 support (via Appraisals)
- ✅ Rails 8.2 compatibility (#329)
- ✅ Rails 7.2 support (#278)
- ❌ Rails 6.1 no longer tested (removed from CI/Appraisals)
PostgreSQL Support
- ✅ PostgreSQL 17 support (#289) - transaction_timeout statement handling
- ✅ PostgreSQL 18 support (GitHub Actions workflow added)
- Fixed PostgreSQL 17.6+ meta-commands (
\restrict,\unrestrict) via catch-all pattern (#330)
Code Quality
- ✅ Complete RuboCop compliance - removed
.rubocop_todo.yml(#330) - ✅ Enhanced
.rubocop.ymlwith proper cops configuration - ✅ All rake tasks fixed with
:environmentdependency (#315 via #330) - ✅ Frozen string literals enforced throughout
- ✅ Consistent method call parentheses
Testing & CI/CD
- Split specs by database version (#292)
- MySQL specs fixed and CodeCov added (#295)
- Improved coverage tracking (#296, #297)
- Split GitHub Actions workflows by PostgreSQL version (14, 15, 16, 17, 18)
- Split workflows by MySQL version (8.0)
- Simplified gem publishing workflow (#330)
- Removed stale issue bot (#330)
🐛 Bug Fixes
- #315: Rake tasks now properly load Rails environment (fixes
tenant_namesdynamic queries) - #290: Fixed ActiveRecord monkeypatch breaking Solid Cache
- #291: Fixed "Deprecation cannot find version" error
- #289: Ignore
transaction_timeoutstatement in PostgreSQL 17 - #293: Match custom default tenant on
PSQL_DUMP_BLACKLISTED_STATEMENTS - #276: Prevent Rails 7.1
create_schemafrom being added todb/schema.rb - #203: Properly reset sequence when switching with multiple schemas
- #184: Exclude default tenant table if it exists in procedure
🔧 Dependencies
- #320: Relaxed
public_suffixdependency from<= 6.0.1to< 7 - #281: Support
public_suffixmajor version 6 - #307: Removed upper bound for Ruby version
- #329: Updated ActiveRecord/ActiveSupport dependencies for Rails 8.2
⚡ Performance & Concurrency
- #288: Use
Rails.application.executor.wrapin Threads (proper Rails executor integration)
🏗️ Infrastructure
Appraisals
Updated test matrix (Rails 6.1 removed):
- Rails 7.0, 7.1, 7.2, 8.0, 8.1 × PostgreSQL, MySQL, SQLite3
- JDBC variants for Rails 7.0 (jdbc_mysql, jdbc_postgresql, jdbc_sqlite3)
GitHub Actions
- Workflow per PostgreSQL version (14, 15, 16, 17, 18)
- Workflow for MySQL 8.0
- Workflow for SQLite3
- Simplified gem publishing workflow
- All workflows use appraisal for correct Rails version testing
📝 Issues Closed
This release closes the following issues:
#330, #329, #328, #326, #322, #320, #315, #311, #310, #309, #307, #297, #296, #295, #293, #292, #291, #290, #289, #288, #281, #278, #276, #203, #184
🚀 Upgrade Path
From 3.1.0 to 3.3.0: No breaking changes for Rails 7.0+ users. Drop-in replacement.
Rails 6.1 users: While the gemspec still allows Rails 6.1, it's no longer tested in CI. Upgrade to Rails 7.0+ recommended.
What to check after upgrading:
- Rails 6.1 users: Consider upgrading to Rails 7.0+ for continued support
- Run
bundle exec rubocopif using RuboCop (gem now compliant) - Test rake tasks (
apartment:create,apartment:migrate, etc.) - now properly load Rails environment - Verify PostgreSQL 17/18 compatibility if using those versions
- Rails 8.0/8.1/8.2 users - ensure
activesupportdependency resolves correctly
📖 Documentation
New users should start with:
README.md- Installation and basic usageCLAUDE.md- Project overview and WHY documentation philosophydocs/architecture.md- Core design decisionsdocs/adapters.md- Database strategy trade-offsdocs/elevators.md- Middleware patterns
🙏 Contributors
Thanks to @oleksii-leonov and @moskvin for their contributions, and to all community members who reported issues and provided feedback.
Full Changelog: v3.1.0...v3.3.0
v3.2.0
Disclaimer
This release introduces support for Rails 7.2, Rails 8.0, and Ruby 3.4. While specs pass for Rails 7.2 with MySQL and Postgres (but not SQLite), the compatibility has not been extensively tested in production environments.
Known limitations:
- Existing issues related to concurrency, multi-threading, and managing multiple databases remain unresolved. These issues are unrelated to Rails 7.2/8.0 and have existed in prior versions.
- Users are strongly encouraged to thoroughly test their applications before deploying this version to production.
This release prioritizes compatibility over bug fixes for unrelated issues. If your application already works with Apartment and earlier Rails versions, upgrading to Rails 7.2 or 8.0 with this release should not introduce additional risk.
For more stability, consider waiting for the next major release, which will focus on addressing fundamental concurrency issues and fiber safety. Feedback on this version is highly appreciated to improve future releases!
What's Changed
- Support rails 7.2 by @npezza93 in #278
- Update .ruby-version by @ferdinandrosario in #279
- Properly reset sequence if switching with multiple schemas by @ryanswood in #203
- Support public_suffix major version 6 by @tangposmarvin in #281
- Fix deprecation method by @m-zielinski in #287
- Prevent Rails 7.1 create_schema from being added to db/schema.rb by @patbenatar in #276
- fix: Deprecation cannot find version error by @lit-poks in #291
- Fix: ActiveRecord monkeypatch breaking Solid Cache by @JustinGranof in #290
- fix: ignore transaction_timeout statement added in postgresql 17 by @martinbarilik in #289
- Exclude the default tenant table if it exists in the procedure by @zakky21 in #184
- Use
Rails.application.executor.wrapin Threads by @jordan-brough in #288 - Split specs according to db version by @mnovelo in #292
- Fix mysql specs and add codecov by @mnovelo in #295
- Only track lib files for code coverage by @mnovelo in #296
- Filter out spec coverage by @mnovelo in #297
- Also match custom default tenant on PSQL_DUMP_BLACKLISTED_STATEMENTS by @rbngzlv in #293
- Remove upper bound for Ruby version by @swiknaba in #307
- Update Ruby and Apartment versions for Rails 8.0 support by @mnovelo in #309
- v3.2.0 by @mnovelo in #310
New Contributors
- @ferdinandrosario made their first contribution in #279
- @ryanswood made their first contribution in #203
- @tangposmarvin made their first contribution in #281
- @m-zielinski made their first contribution in #287
- @patbenatar made their first contribution in #276
- @lit-poks made their first contribution in #291
- @JustinGranof made their first contribution in #290
- @martinbarilik made their first contribution in #289
- @zakky21 made their first contribution in #184
- @jordan-brough made their first contribution in #288
- @rbngzlv made their first contribution in #293
- @swiknaba made their first contribution in #307
Full Changelog: v3.1.0...v3.2.0
v3.1.0
v3.0.4
What's Changed
- chore: Update Ruby and SQLite dependencies by @mnovelo in #262
- Update Appraisals and gem versions by @mnovelo in #264
- Fix Ruby 3.0 support by @shkm in #266
- Explicitly state Ruby version constraints in gemspec by @mnovelo in #267
- FIx Ruby 3.0 support by @mnovelo in #268
- Bump version to 3.0.3 by @mnovelo in #269
- Bump version to 3.0.4 by @mnovelo in #270
New Contributors
Full Changelog: v3.0.2...v3.0.4
3.0.2
3.0.1
What's Changed
- Fix Rails 6.1 ConnectionHandling method signatures by @mrpasquini in #254
- Move JDBC postgres fix to JDBC postgres adapter by @mrpasquini in #255
- Remove Travis CI build status badge by @cmayor in #256
- Remove Changelog Action and build on Development branch by @mrpasquini in #257
- Add workflow to publish gem by @mnovelo in #258
- Release v3.0.0 by @mnovelo in #259
- Update version to avoid tag conflicts by @mnovelo in #260
- Release v3.0.1 by @mnovelo in #261
New Contributors
Full Changelog: v3.0.0...v3.0.1
3.0.0
What's Changed
- [#98] improve changelog automatic generation by @rpbaltazar in #99
- Revert unsafe initializer by @lunks in #118
- [#128] added config spec coverage. added missing require by @rpbaltazar in #129
- new travis ci policies make our tests not run by @rpbaltazar in #132
- [#134] added rubocop to workflows by @rpbaltazar in #135
- [#127] Fixed method to get the current db name by @rpbaltazar in #137
- Update README.md by @nickgal in #138
- [WIP] Add config for handling tenant creation on db:migrate by @jonian in #140
- Add Rails 6.1 to build matrix by @jmortlock in #144
- Allow a list of schemas when switching using schemas by @marksiemers in #154
- [Chore] Fix rubocop breaking by @rpbaltazar in #156
- [Chore] update rubocop local config and fix remaining broken rules by @rpbaltazar in #157
- Add Ruby 3 to build matrix by @marcelolx in #162
- [CI] Rubocop results still different from ci by @rpbaltazar in #158
- Fix create schema between different versions of DB by @oleksii-leonov in #155
- added junit formatter, output and save the spec results by @rpbaltazar in #172
- [#170] cache key breaks when receiving a belongs to reflection by @rpbaltazar in #171
- [#151] removed reloader and console overwrite of reload method by @rpbaltazar in #174
- Show underlying error message and class if we cannot set search path to a new schema by @lunks in #176
- Add rails 7 support by @StefSchenkelaars in #178
- Fixing tenant_presence_check config in the README by @guillaumebriday in #180
- Fix sequence name by @rpbaltazar in #187
- Refactor unsubscribe logic to avoid unsubscribing other listeners by @rpbaltazar in #190
- use current_database method existing in both adapter by @rpbaltazar in #191
- Fix Rails 7 connection handling by @calmyournerves in #194
- Update Circleci workflow by @jespersandnielsen in #221
- Correct links in README by @okuramasafumi in #229
- Update README.md by @harmdewit in #212
- Bump public_suffix version range by @kfriend in #207
- Support Rails 7.1, drop Ruby 2.x and Rails < 6.1 by @eraffel-MDSol in #243
- Updates bold attribute to named attribute on preparation for Rails 7.2 by @rgp in #246
- Move CI to Github Actions, update Rubocop, fix Jruby tests by @mrpasquini in #251
- Allow rack 3 to be used by @npezza93 in #253
- Fix Rails 6.1 ConnectionHandling method signatures by @mrpasquini in #254
- Move JDBC postgres fix to JDBC postgres adapter by @mrpasquini in #255
- Remove Travis CI build status badge by @cmayor in #256
- Remove Changelog Action and build on Development branch by @mrpasquini in #257
New Contributors
- @lunks made their first contribution in #118
- @nickgal made their first contribution in #138
- @jonian made their first contribution in #140
- @jmortlock made their first contribution in #144
- @marksiemers made their first contribution in #154
- @marcelolx made their first contribution in #162
- @oleksii-leonov made their first contribution in #155
- @StefSchenkelaars made their first contribution in #178
- @guillaumebriday made their first contribution in #180
- @calmyournerves made their first contribution in #194
- @jespersandnielsen made their first contribution in #221
- @okuramasafumi made their first contribution in #229
- @harmdewit made their first contribution in #212
- @kfriend made their first contribution in #207
- @eraffel-MDSol made their first contribution in #243
- @rgp made their first contribution in #246
- @mrpasquini made their first contribution in #251
- @npezza93 made their first contribution in #253
- @cmayor made their first contribution in #256
Full Changelog: v2.7.2...v3.0.0
2.11.0
Implemented enhancements:
- Increase errors visibility by showing more information on the underlying error rather than a generic error 'Apartment::TenantNotFound' (#176)
- Resolved #177 - Added rails 7 support (#178)
Fixed bugs:
- Fixing tenant_presence_check config in the README (#180)
- Resolved #161 and #81 - Fixed sequence name (#187)
Closed issues: