Skip to content

Mongoid 9 support #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gemspec
gem 'bundler'
gem 'rake'
gem 'pry-byebug'
gem 'mongoid', '~> 8'
gem 'mongoid', '~> 9'

group :test do
gem 'rspec-given', '~> 3.5'
Expand Down
79 changes: 44 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,85 @@ PATH
remote: .
specs:
mongoid_includes (3.0.2)
mongoid (>= 7.0.10, < 9.0.0)
mongoid (>= 7.0.10, < 10.0.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (7.0.4)
activesupport (= 7.0.4)
activesupport (7.0.4)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activesupport (7.1.3.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
bson (4.15.0)
base64 (0.2.0)
bigdecimal (3.1.8)
bson (5.0.1)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.1.10)
diff-lcs (1.4.4)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
diff-lcs (1.5.1)
docile (1.3.2)
given_core (3.8.1)
drb (2.2.1)
given_core (3.8.2)
sorcerer (>= 0.3.7)
i18n (1.12.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.3.1)
method_source (1.0.0)
minitest (5.16.3)
mongo (2.18.1)
bson (>= 4.14.1, < 5.0.0)
mongoid (8.0.2)
activemodel (>= 5.1, < 7.1, != 7.0.0)
method_source (1.1.0)
minitest (5.24.1)
mongo (2.20.1)
bson (>= 4.14.1, < 6.0.0)
mongoid (9.0.1)
activemodel (>= 5.1, < 7.2, != 7.0.0)
concurrent-ruby (>= 1.0.5, < 2.0)
mongo (>= 2.18.0, < 3.0.0)
ruby2_keywords (~> 0.0.5)
pry (0.13.1)
mutex_m (0.2.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (~> 0.13.0)
pry (>= 0.13, < 0.15)
rake (13.0.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.3)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.3)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-given (3.8.1)
given_core (= 3.8.1)
rspec-support (~> 3.13.0)
rspec-given (3.8.2)
given_core (= 3.8.2)
rspec (>= 2.14.0)
rspec-mocks (3.9.1)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.4)
ruby2_keywords (0.0.5)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sorcerer (2.0.1)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)

PLATFORMS
ruby

DEPENDENCIES
bundler
mongoid (~> 8)
mongoid (~> 9)
mongoid_includes!
pry-byebug
rake
Expand Down
6 changes: 5 additions & 1 deletion lib/mongoid_includes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
Mongoid::Contextual::Memory.send :prepend, Mongoid::Includes::EagerLoad

Mongoid::Criteria.send :prepend, Mongoid::Includes::Criteria
Mongoid::Association::Referenced::Eager::Base.send :prepend, Mongoid::Includes::Association::Eager
if defined?(Mongoid::Association::Referenced::Eager::Base)
Mongoid::Association::Referenced::Eager::Base.send :prepend, Mongoid::Includes::Association::Eager
else
Mongoid::Association::Eager.send :prepend, Mongoid::Includes::Association::Eager
end
2 changes: 1 addition & 1 deletion mongoid_includes.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Gem::Specification.new do |s|
s.files = Dir.glob('lib/**/*') + %w(CHANGELOG.md LICENSE.txt README.md Rakefile)
s.test_files = Dir.glob('spec/**/*')

s.add_runtime_dependency 'mongoid', ['>= 7.0.10', '< 9.0.0']
s.add_runtime_dependency 'mongoid', ['>= 7.0.10', '< 10.0.0']
end
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ def log_mongo_to_console
Mongoid.purge!
end
end

Time.zone = 'UTC'
Loading