-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Intgeration with official Mongo driver 2.0.0. #3941
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
d2a6507
First pass integration of Mongo Ruby driver 2
durran 4aa2ccb
Udpating tests to use auth
durran 8c3123b
Get specs running with authentication, passing on 2.6 and 3.0
durran 100e94c
Update to have travis matrix run on multiple mongodb versions
durran f102a87
Run appropriate specs depending on version
durran 4dc58fc
Remove text search context since it's now a query
durran af41579
Fix 2.6 related role issues
durran 2bbba35
Point at rc, fix index and delete syntax changes
durran 1e8aa58
Bump to 2.0
durran 0e796c0
Fixing query cache and query expectations
durran 6eb74b4
Back to standard tests with no auth
durran 19f15d1
Fix uri handling with db name
durran de07e9e
Unpend eager loading specs
durran fc6c806
Remove find and modify contexts - provided no extra value
durran 11b5e19
Removing text search related specs
durran fdfbdb6
Implement find and modify related operations
durran dd5e570
Rename query in mongo context to view
durran 155aa6c
Remove the no timeout specs
durran 5248751
Revert "Back to standard tests with no auth"
durran 0068b26
Fixing auth on 3.0.0
durran 33722a1
Make direct session setting private
durran 68b82f0
Bit errors on 2.4 for null fields
durran 00e0be0
Fixing atomic operations failures
durran bc718d4
Need 2.1 driver for session closing
durran 37fd26d
Fix rebase failures
durran 2d19d8d
Use latest mongo versions
durran c87b1b1
Updating changelog
durran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
gem "rake" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,9 +268,9 @@ def apply_criteria_options | |
# @since 3.0.0 | ||
def documents | ||
return results["results"] if results.has_key?("results") | ||
query = session[output_collection].find | ||
query.no_timeout if criteria.options[:timeout] == false | ||
query | ||
view = session[output_collection].find | ||
view.no_cursor_timeout if criteria.options[:timeout] == false | ||
view | ||
end | ||
|
||
# Get the collection that the map/reduce results were stored in. | ||
|
@@ -299,7 +299,7 @@ def output_collection | |
# @since 3.0.0 | ||
def results | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be called result instead of results just because is returning one element, the same as in geo_near.rb |
||
raise Errors::NoMapReduceOutput.new(command) unless command[:out] | ||
@results ||= __session__.command(command) | ||
@results ||= __session__.command(command).first | ||
end | ||
|
||
# Get the session with the proper consistency. | ||
|
@@ -316,7 +316,7 @@ def results | |
# @since 3.0.15 | ||
def __session__ | ||
if command[:out][:inline] != 1 | ||
session.with(read: :primary) | ||
session.with(read: { mode: :primary }) | ||
else | ||
session | ||
end | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should be called
result
instead ofresults
just because is returning one element, isn't it?