-
Notifications
You must be signed in to change notification settings - Fork 69
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
Support for mongoid 7.0.0 #69
Conversation
Association reflections no longer have a `.macro`
I'm afraid I can't make the spec pass with mongoid 4 on travis. Locally it runs green though. |
mongoid-tree.gemspec
Outdated
@@ -12,7 +12,8 @@ Gem::Specification.new do |s| | |||
|
|||
s.files = Dir.glob('{lib,spec}/**/*') + %w(LICENSE README.md Rakefile Gemfile .rspec) | |||
|
|||
s.add_runtime_dependency('mongoid', ['< 7.0', '>= 4.0']) | |||
s.add_runtime_dependency('mongoid', ['<= 7.0', '>= 4.0']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to change this to
s.add_runtime_dependency('mongoid', ['< 8', '>= 4.0'])
in order to allow minor versions of Mongoid 7
Hi @asgerb! Thanks so much for this fantastic pull request. I can confirm that the specs run locally. Not sure what's up with the CI build there. |
@benedikt if we could have a new version of the gem released, it would be awesome! thank you! |
@tomasc v2.1.1 is on RubyGems now :) |
@benedikt thank you! |
Adding support for
mongoid 7.0.0
did not require any changes to the code, but a small change to thetree_spec.rb
was needed.In
mongoid 7.0.0
Node.reflect_on_association
no longer has the.macro
. So instead of testing against.macro
I tested the type of the reflection. In order to just do this on 7 I added themongoid-compabilitity
gem as a development dependency.I also updated
Gemfile
and.travis.yml
to make travis test against multiple mongoid versions (4..7).