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

Fixing failures against Mongoid master. #125

Closed
wants to merge 1 commit into from
Closed

Fixing failures against Mongoid master. #125

wants to merge 1 commit into from

Conversation

durran
Copy link
Contributor

@durran durran commented Sep 28, 2011

Mongoid 2.3 (current master) has some internal changes around the way that default attributes are applied that broke the current state_machine implementation. This pull request addresses those issues.

Note there are 2 tests that I commented on in which I thought the expectation of the test (as the test was named) was incorrect. I changed these tests to pass, but the assertion does not match the expectation anymore. I do believe though the assertions are correct as I would not anticipate anything to show up in the dirty tracking when the state attribute has not actually changed itself:

https://github.com/durran/state_machine/blob/mongoid-2.3-fixes/test/unit/integrations/mongoid_test.rb#L660
https://github.com/durran/state_machine/blob/mongoid-2.3-fixes/test/unit/integrations/mongoid_test.rb#L665

I also tested against our current applications and all our tests there are passing.

Note: Mongoid 2.3.0 will be released this weekend.

My apologies for the trailing whitespace removal on the changed files - I have git hooks that just automatically do it.

@durran
Copy link
Contributor Author

durran commented Oct 5, 2011

Note that the official 2.3.0 release is out. This is safe to pull in now.

@ghost ghost assigned obrie Oct 13, 2011
@yfeldblum
Copy link

@obrie Please review, merge, and issue a patch-level release.

This is blocking for anyone using both state_machine and mongoid and wanting to upgrade to mongoid-2.3.

@yfeldblum
Copy link

@durran Any chance you can push a commit without any whitespace changes?

@huug
Copy link

huug commented Oct 14, 2011

As of v2.2 of mongoid seems to have several issues with state_machine
@durran will they all be solved with this pull-request?

@durran
Copy link
Contributor Author

durran commented Oct 14, 2011

Yes we're using state machine just fine here with the changes in this pull. We're just pointing directly at my branch for now.

@obrie
Copy link
Member

obrie commented Oct 19, 2011

Hey guys -

Thanks for the pull request! I sincerely apologize for finding little time to take a look at these issues lately. I'll be able to look at all of them (including your e-mails) in the coming days and likely have a new release within the next week.

@obrie obrie closed this in cc14fb1 Nov 5, 2011
@obrie
Copy link
Member

obrie commented Nov 5, 2011

Thanks again to everyone, especially @durran, supporting this pull request. I left out the changes to fix the loopback failures mostly because that's a problem I need to fix across all of the ORM integrations and will be part of a major 1.1.0 release instead.

A minor release with this patch will be released this weekend.

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

4 participants