Skip to content

Commit f55e0f9

Browse files
Upgrade Mongoid to version 9.0.0 (#245)
* Upgrade to version 9 * update changelog * bump up version in changelog and add to ci * add to appraisal file * fix rubocop * update changelog
1 parent 8bb0c65 commit f55e0f9

File tree

8 files changed

+22
-7
lines changed

8 files changed

+22
-7
lines changed

Diff for: .github/workflows/rspec.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- { ruby: '3.0', mongodb: '4.4', gemfile: 'mongoid_8', bundler: '2.4.19' }
1616
- { ruby: '3.1', mongodb: '4.4', gemfile: 'mongoid_8', bundler: '2.4.19' }
1717
- { ruby: '3.2', mongodb: '4.4', gemfile: 'mongoid_8', bundler: '2.4.19' }
18+
- { ruby: '3.2', mongodb: '4.4', gemfile: 'mongoid_9', bundler: '2.4.19' }
1819
name: test (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), gemfile=${{ matrix.entry.gemfile }})
1920
env:
2021
BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile

Diff for: Appraisals

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
appraise 'mongoid-9' do
2+
gem 'mongoid', '~> 9.0.0'
3+
end
4+
15
appraise 'mongoid-8' do
26
gem 'mongoid', '~> 8.0.0'
37
gem 'rails', '~> 7.0'

Diff for: CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
### 4.1.1 (Next)
1+
### 4.2.0 (Next)
22

33
* [#239](https://github.com/mongoid/mongoid-rspec/pull/239): Add support for if/unless validator options - [@knovoselic](https://github.com/knovoselic).
4-
* [#244](https://github.com/mongoid/mongoid-rspec/pull/123): Migration from TravisCI to GitHub Actions - [@skalibog](https://github.com/skalibog).
4+
* [#244](https://github.com/mongoid/mongoid-rspec/pull/244): Migration from TravisCI to GitHub Actions - [@skalibog](https://github.com/skalibog).
5+
* [#245](https://github.com/mongoid/mongoid-rspec/pull/245): Add support for Mongoid 9 - [@saisrinivasan](https://github.com/SairamSrinivasan).
56
* Your contribution here.
67

78
### 4.1.0 (6/12/2020)

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The mongoid-rspec library provides a collection of RSpec-compatible matchers tha
88

99
[Tested](https://github.com/mongoid/mongoid-locker/actions) against:
1010
- MRI: `2.6.x`, `2.7.x`, `3.0.x`, `3.1.x`, `3.2.x`
11-
- Mongoid: `4`, `5`, `6`, `7`, `8`
11+
- Mongoid: `4`, `5`, `6`, `7`, `8`, `9`
1212

1313
See [.github/workflows/rspec.yml](.github/workflows/rspec.yml) for the latest test matrix.
1414

@@ -25,7 +25,7 @@ end
2525

2626
## Compatibility
2727

28-
This gem is compatible with Mongoid 3, 4, 5, 6 and 7.
28+
This gem is compatible with Mongoid 3, 4, 5, 6, 7, 8, 9.
2929

3030
## Configuration
3131

Diff for: gemfiles/mongoid_9.gemfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by Appraisal
2+
3+
source 'https://rubygems.org'
4+
5+
gem 'mongoid', '~> 9.0.0'
6+
7+
gemspec path: '../'

Diff for: mongoid-rspec.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
2828
s.add_development_dependency 'rspec'
2929
s.add_development_dependency 'rubocop', '~> 1.36.0'
3030

31-
s.add_dependency 'mongoid', '>= 3.0', '< 9.0'
31+
s.add_dependency 'mongoid', '>= 3.0', '< 10.0'
3232
s.add_dependency 'mongoid-compatibility', '>= 0.5.1'
3333

3434
s.files = Dir.glob('lib/**/*') + %w[LICENSE README.md Rakefile]

Diff for: spec/models/permalink.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
class Permalink
22
include Mongoid::Document
33

4-
embedded_in :linkable, inverse_of: :link
4+
embedded_in :linkable,
5+
inverse_of: :link,
6+
touch: false
57
end

Diff for: spec/models/profile.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Profile
66
field :age
77
field :hobbies, type: Array, default: []
88

9-
embedded_in :user, inverse_of: :profile
9+
embedded_in :user, inverse_of: :profile, touch: false
1010

1111
validates :age, numericality: { greater_than: 0 }
1212
validates :terms_of_service, acceptance: true

0 commit comments

Comments
 (0)