Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 10 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ jobs:
fail-fast: false
matrix:
ruby: ['3.1', '3.2', '3.3', '3.4', '4.0']
# Mongoid 7.5 supports Rails up to 7.0; Mongoid 8.1 up to 8.0.
# Mongoid 7.5 supports Rails up to 7.0; Mongoid 8.1 up to 8.0; Mongoid 9 up to 8.1.
stack:
- { rails: '7.0', mongoid: '7.5' }
- { rails: '7.0', mongoid: '8.1' }
- { rails: '7.1', mongoid: '8.1' }
- { rails: '7.2', mongoid: '8.1' }
- { rails: '8.0', mongoid: '8.1' }
- { rails: '7.1', mongoid: '9.0' }
- { rails: '7.2', mongoid: '9.0' }
- { rails: '8.0', mongoid: '9.0' }
- { rails: '8.1', mongoid: '9.1' }
exclude:
# Rails 8.0 needs Ruby 3.2 or later.
# Rails 8.0 and 8.1 need Ruby 3.2 or later.
- ruby: '3.1'
stack: { rails: '8.0', mongoid: '8.1' }
- ruby: '3.1'
stack: { rails: '8.0', mongoid: '9.0' }
- ruby: '3.1'
stack: { rails: '8.1', mongoid: '9.1' }
# ubuntu-latest (26.04) can't compile native extensions against Ruby 3.2's headers.
runs-on: ubuntu-24.04
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.stack.rails }}, Mongoid ${{ matrix.stack.mongoid }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 3.1.0

* Supports Mongoid 9 and Rails 8.1 (Rails 8.1 needs Mongoid 9). The `mongoid` dependency is now
>= 7.5, < 10.
* Requires ransack-mongoid 1.1, which adds Mongoid 9 support.

## 3.0.0

Supports ActiveAdmin 3 with Ransack 4, on Ruby 3.1+, Rails 7.0 to 8.0, and Mongoid 8 (or Mongoid 7.5
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

ActiveAdmin is holding off on pulling Mongoid support into the core ActiveAdmin application. This repo was pulled into the ActiveAdmin org from previous work done by Elia Schito, and will be maintained by Grzegorz Jakubiak, Nic Boie, JD Guzman, Elia Schito and other ActiveAdmin and community members.

### Requirements for version 3.0.0
* Ruby 3.1 or greater (Rails 8.0 needs Ruby 3.2 or later).
* Rails 7.0, 7.1, 7.2 or 8.0
* Mongoid 8.x, or Mongoid 7.5 on Rails 7.0
### Requirements for version 3.x
* Ruby 3.1 or greater (Rails 8.0 and 8.1 need Ruby 3.2 or later).
* Rails 7.0, 7.1, 7.2, 8.0 or 8.1
* Mongoid 8.x, or Mongoid 9.x from version 3.1 (Rails 8.1 needs Mongoid 9), or Mongoid 7.5 on Rails 7.0
* ActiveAdmin 3.x (tested on 3.5)
* Ransack 4.x, through [ransack-mongoid](https://github.com/riverock/ransack-mongoid) 1.x, which this gem depends on. Your application should use Mongoid only (see the ransack-mongoid README).
* Ransack 4.x, through [ransack-mongoid](https://github.com/riverock/ransack-mongoid) 1.x (1.1 or later for Mongoid 9), which this gem depends on. Your application should use Mongoid only (see the ransack-mongoid README).

See [CHANGELOG.md](CHANGELOG.md) for the changes from 2.0.0. Use 2.x with ActiveAdmin 2.

Expand Down
4 changes: 2 additions & 2 deletions activeadmin-mongoid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = '>= 3.1'

gem.add_runtime_dependency 'mongoid', '>= 7.5', '< 9'
gem.add_runtime_dependency 'mongoid', '>= 7.5', '< 10'
gem.add_runtime_dependency 'activeadmin', '~> 3.0'
gem.add_runtime_dependency 'ransack-mongoid', '~> 1.0' # Mongoid support for Ransack 4, which ActiveAdmin 3 requires
gem.add_runtime_dependency 'ransack-mongoid', '~> 1.1' # Mongoid support for Ransack 4, which ActiveAdmin 3 requires
gem.add_runtime_dependency 'csv' # the CSV builder; no longer a default gem from Ruby 3.4
gem.add_runtime_dependency 'kaminari-mongoid'
gem.add_runtime_dependency 'jquery-rails'
Expand Down
2 changes: 1 addition & 1 deletion lib/active_admin/mongoid/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module ActiveAdmin
module Mongoid
VERSION = '3.0.0'
VERSION = '3.1.0'
end
end
13 changes: 13 additions & 0 deletions test_app/config/mongoid.9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
development:
clients:
default:
database: activeadmin_mongoid_development
hosts:
- <%= ENV.fetch('MONGODB_HOST', 'localhost:27017') %>

test:
clients:
default:
database: activeadmin_mongoid_test
hosts:
- <%= ENV.fetch('MONGODB_HOST', 'localhost:27017') %>
Loading