Skip to content
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

This fixes #121 #123

Closed
wants to merge 4 commits into from
Closed

This fixes #121 #123

wants to merge 4 commits into from

Conversation

zeitnot
Copy link
Contributor

@zeitnot zeitnot commented Nov 19, 2014

In mongoid4 ::Mongoid.const_defined? :Observer always returns true. So we should check it by mongoid natural version number. BTW this fix works for me.

Another workaround is here but I did not test it.

@dblock
Copy link
Collaborator

dblock commented Nov 19, 2014

We have CI running here against all versions of Mongoid, and with version 4 Mongoid::Observer is most definitely deprecated. There're dozens of other gems that do it the same way, including mongoid-slug for example.

Are you using another gem that (re)introduces the observer backward compatibility?

I think comparing with a string is extremely brittle, I'd be probably OK with something that introduces a proper version parser here from a thirdparty gem.

@zeitnot
Copy link
Contributor Author

zeitnot commented Nov 19, 2014

These are my mongoid related gems.

gem 'mongoid', '~> 4.0.0'  
gem 'mongoid-observers', '~> 0.1.1'
gem 'mongoid_paranoia', github: 'simi/mongoid_paranoia'
gem 'mongoid_search', '~> 0.3.2'
gem 'mongoid_token', github: 'thetron/mongoid_token', branch: 'update/mongoid-4'
gem 'mongoid-history', github: 'zeitnot/mongoid-history'

I did consider using this gem as version comparing tool but did not pollute gem file. :)

@dblock
Copy link
Collaborator

dblock commented Nov 19, 2014

Well, likely that mongoid-observers is where this comes from :) As mentioned above I would be ok with a reliable version parser to verify which version of mongoid it is.

@zeitnot
Copy link
Contributor Author

zeitnot commented Nov 19, 2014

Yes, mongoid-observers is the main guilty :)

@zeitnot
Copy link
Contributor Author

zeitnot commented Dec 1, 2014

@dblock I do not have any idea why this commit crashes on rubinius. I did not find anything on google. Will you merge this one or do you know anything about this crash? Thanks.

@johnnyshields
Copy link
Member

The Rubinius failures look related to infrastructure (bundler not running properly), so probably not introduced by this commit. Travis will probably succeed if we run it again.

@dblock
Copy link
Collaborator

dblock commented Dec 9, 2014

This has been merged via 7ab06f4.

@dblock
Copy link
Collaborator

dblock commented Dec 9, 2014

I had to undo this, opened #126, the rbx failure is in blockenspiel, and will continue breaking the build until that's fixed - dazuma/blockenspiel#13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants