Skip to content

RUBY-537 cleaning up how strict is used, deprecating strict #177

Closed
wants to merge 1 commit into from

2 participants

@brandonblack

In short, the goal of this change set is to eliminate all calls to fetch collection names (eg. all namespaces) unless strict mode is enabled. This has always been the documented behavior of strict, but there were a number of places like #drop_collection and #create_collection where we weren't actually using it correctly.

The driver really shouldn't ever be doing namespace checks. In addition to correcting how strict is used, I've added a deprecation for strict mode in general so that it can be phased out at a later date.

Also... while I was digging around in Collection and DB I cleaned up a few inconsistencies, style issues, white space and small bugs. If you touch it, make it better, right?

The core parts of this change set can be found here:
https://github.com/brandonblack/mongo-ruby-driver/blob/46f1312c824b0ce9364251bf2652f205c4ab60ae/lib/mongo/db.rb#L26-L48
https://github.com/brandonblack/mongo-ruby-driver/blob/46f1312c824b0ce9364251bf2652f205c4ab60ae/lib/mongo/db.rb#L289-L304
https://github.com/brandonblack/mongo-ruby-driver/blob/46f1312c824b0ce9364251bf2652f205c4ab60ae/lib/mongo/db.rb#L331-L338

@brandonblack

split up into multiple commits, fixed travis:
https://travis-ci.org/mongodb/mongo-ruby-driver/builds/5519916

@TylerBrock

Still only seeing the original commit on the PR, not sure if you pushed or not.

@TylerBrock

Nevermind, see the commits in master. Closing this out.

@TylerBrock TylerBrock closed this Mar 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.