Commit Graph

617 Commits

Author SHA1 Message Date
Tyler Brock 9be394b623 Merge pull request #104 from seamusabshere/from_uri_implicit_arg
Make ENV['MONGODB_URI'] the default first arg for `Mongo::Connection.from_uri`
2012-06-04 20:59:35 -07:00
Seamus Abshere 90773ebeb8 Make ENV['MONGODB_URI'] the default first arg for `Mongo::Connection.from_uri` 2012-06-04 12:57:01 -05:00
Seamus Abshere d8f94e6f63 Since `URI.decode_www_form` is Ruby 1.9-only, use `CGI.parse` instead
Conflicts:
	lib/mongo/util/uri_parser.rb - replaced @TylerBrock's (temp?) fix with this one, which uses the stdlib
	test/uri_test.rb - reintroduced test for conflicting URL separators... and added a new test for URL-encoded parts
2012-06-04 12:54:48 -05:00
Tyler Brock 9d859d2b5c minor: URI.decode_www_form not available pre 1.9.x, alternative solution 2012-06-04 13:24:30 -04:00
John Bintz 89d2130306 add test for save_chunk fix 2012-06-04 13:24:30 -04:00
Seamus Abshere 1454210d9f Use ENV["MONGODB_URI"] if available. 2012-06-04 13:24:30 -04:00
Tyler Brock 351eeb65a2 minor: read preference test fix
Secondary to remove is randomly chosen so test would randomly fail
before this fix.
2012-06-04 13:23:56 -04:00
Tyler Brock 4c032c4d31 Merge pull request #101 from farrel/master
Added BSON::ObjectId#to_ary
2012-06-01 11:33:52 -07:00
Tyler Brock f55fc95bf4 RUBY-432
Do not encode strings to utf-8 after checking that utf-8 is valid.

Before this fix, an encoding operation could turn valid utf-8 into
invalid utf-8 if an encoding that requires conversion is forced on a
valid string.
2012-06-01 14:20:15 -04:00
Farrel Lifson 078354a39a Added BSON::ObjectId#to_ary 2012-05-26 01:16:11 +02:00
Kyle Banker 5591e3dfe3 RUBY-444 keep multiple replica set connections separate 2012-05-25 13:58:07 -04:00
Tyler Brock 746687bb86 minor: testing fixes 2012-05-15 16:52:58 -04:00
Gary Murakami 64c87e93a3 [Gary] require test_helper edits to work everywhere including via IDE (RubyMine), Gemfile for JRuby 2012-04-11 11:08:04 -04:00
Tyler Brock dfca0dd134 minor: disable refresh with threads for 1.8x 2012-04-05 12:45:34 -04:00
Tyler Brock b2a1841f9c minor: test fix for legacy mongo 2012-04-04 19:10:02 -04:00
Tyler Brock d42eee278b minor: testing fixes, cleaning output 2012-04-04 16:44:01 -04:00
Tyler Brock c992369918 minor: more testing fixes 2012-04-04 15:48:32 -04:00
Tyler Brock f58b56a4ee minor: testing cleanup, suppress mongod startup output in rs tests 2012-04-04 15:10:11 -04:00
Tyler Brock 92af319412 minor: test cleanup 2012-04-04 13:51:04 -04:00
Tyler Brock e9e0e47cc1 minor: test cleanup and fixes 2012-04-03 16:06:37 -04:00
Tyler Brock 01f28b47ff RUBY-429 non-blocking IO for socket timeouts
Should greatly improve performance for highly threaded applications
using connection and operation timeouts.
2012-04-03 16:06:37 -04:00
Tyler Brock aab3cf7b74 minor: cleanup thread_to_socket pruning code and test 2012-04-03 16:06:37 -04:00
Gary Murakami 481c57c52e fix bson test hash_with_indifferent_access, missing require 2012-03-30 11:47:06 -04:00
Tyler Brock 0e8eef6cdd RUBY-420 enforce lower bound on refresh interval 2012-03-21 19:01:37 -04:00
Tyler Brock 6944794fb2 RUBY-422 Cleanup testing output 2012-03-16 16:17:33 -04:00
Tyler Brock ec86275b60 RUBY-424 Authenticating with only secondary fails
Authentication command now prefers to use primary node but will fall
back on secondary if no primary is available
2012-03-15 13:50:02 -04:00
Tyler Brock 2af817f0f8 minor: fix for refresh with threads test and rs documentation updates 2012-03-07 16:38:14 -05:00
Tyler Brock 0ae757c69b RUBY-416 unit test stub fix 2012-03-07 12:38:04 -05:00
Tyler Brock 8c3283f514 minor: switched additional tests to socket mock 2012-03-06 22:56:39 -05:00
Tyler Brock 68f19039d2 minor: updates for replica set tests, mock socket stubs 2012-03-06 17:06:42 -05:00
Tyler Brock 379c831b8b minor: test fix for mocha 0.10.5 -- new initializer 2012-03-01 13:03:52 -05:00
Kyle Banker ebfe279784 Fixed threaded replica set reconnection. 2012-02-27 17:13:57 -05:00
Tyler Brock 6301a41254 minor: whitespace 2012-02-27 16:42:48 -05:00
Kyle Banker 29cc4b20e2 RUBY-416 thread affinity for Mongo::Pool 2012-02-27 16:16:09 -05:00
Tyler Brock 8e64c74d7d RUBY-239 warn if bad options are passed to connection constructors 2012-02-27 14:06:07 -05:00
Tyler Brock c802c7eba3 minor: fixes for tests in Ruby 1.8.7 2012-02-18 19:24:27 -05:00
Tyler Brock 8db4eb771f RUBY-378: fixed documentation and tests for new ReplSetConnection seed format
Added helper method #build_seeds to rs_test_helper
Added new test for old connection
2012-02-18 18:35:29 -05:00
Tyler Brock b70c9ce152 RUBY-406 enhancements to :secondary_only read preference
Improved implementation
-- read_preference :secondary_only is now communicated via invocation
of ReplSetConnection#checkout_secondary

Better tests
-- ensures reads go to secondaries
-- ensures reads do not go to primaries
2012-02-18 16:51:57 -05:00
Tyler Brock b9371206dc minor: improvements to ReplSetManager
add_node can now take blocks
new add_arbiter method
2012-02-18 15:00:25 -05:00
Tyler Brock 79105f6c98 minor: documentation and test updates for RUBY-378 2012-02-16 14:31:34 -05:00
Kyle Banker b79d408a11 Enable log duration by default for :debug-level logging. 2012-02-16 14:01:09 -05:00
Tyler Brock a4e49d86ac Merge branch 'master' of github.com:mongodb/mongo-ruby-driver 2012-02-16 13:03:08 -05:00
Tyler Brock 542b8f46da RUBY-406 added ReplSetConnection read preference :secondary_only 2012-02-16 12:59:52 -05:00
Kyle Banker 0e50077ced Merge pull request #80 from VvanGemert/master
Allow GridFileSystem#delete to keep a specified number of versioned documents in GridFS rather than removing all or none.
2012-02-16 08:24:34 -08:00
Kyle Banker 3613a05461 Merge pull request #85 from shingara/log_duration
Add a log duration option.
2012-02-16 08:01:23 -08:00
Tyler Brock 78fc1debbe RUBY-378 new ReplSetConnection format 2012-02-16 10:59:09 -05:00
Kyle Banker aecad5d345 Merge pull request #88 from Oscil8/master
Add read_only option to DB#add_user
2012-02-16 07:55:22 -08:00
Tyler Brock bcb32e5935 minor: wait for mongod to die when we kill it during replica set tests 2012-02-15 18:17:24 -05:00
Kyle Banker 02d39a75c7 minor: insert test should use w = 2 2012-02-15 12:55:14 -05:00
Kyle Banker b299986eb4 minor: don't preallocate for replica set tests 2012-02-15 12:13:47 -05:00