Commit Graph

102 Commits

Author SHA1 Message Date
John Bintz f93e05de83 use collection#save instead of collection#insert to save gridio chunks so that replacement chunks overwrite existing ones 2012-06-04 13:24:30 -04:00
Gary Murakami ca7bf209dd DOCS-197 Fully qualify examples in the code with Mongo:: 2012-05-02 17:43:54 -04:00
Tyler Brock 6944794fb2 RUBY-422 Cleanup testing output 2012-03-16 16:17:33 -04:00
Chris Winslett 0f46875473 Fixed issue when sending a :filename GridFS would store the :filename attribute twice. 2012-02-22 08:44:19 -06: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
VvanGemert 585e6722b4 Documented the option :versions in description of method GridFileSystem.open. 2012-01-10 17:52:13 +01:00
VvanGemert 417000da7b Added back support for :delete_old option and wrote tests for :versions option on GridFilesystem. 2012-01-10 17:37:25 +01:00
VvanGemert c70b1d1b30 Added support for keeping a limited amount of documents in GridFS and removed the delete_old option.
The delete_old removed all the old files while having a versioning system you might want to keep a limited set of files. This small little patch does that. You can specify a number of versions to keep by using the new versions option.
2012-01-05 16:27:05 +01:00
Markus Schirp af441efb7c Remove noop assignment 2011-12-28 01:15:11 +01:00
Kyle Banker 93f228aaf1 RUBY-351 Build GridFS indexes when a primary is present. 2011-11-15 15:44:31 -05:00
Nandor Kracser 1b595316c6 use BSON::ObjectId rather than Mongo::ObjectId for return values in doc 2011-09-01 21:33:23 +02:00
Daniël van de Burgt 6e66b11f6e fix: reading chunks from an empty (zero-length) grid-stored file
reading chunks from an empty file caused an endless loop
2011-05-10 22:58:50 -05:00
Kyle Banker 74faed3f38 Merge pull request #41 from rmm5t/refactor_gets
Fix and refactoring for GridIO#gets.
2011-05-09 08:12:40 -07:00
Ryan McGeary 7f384ebd51 Refactored two code paths of GridIO#gets into well-named methods 2011-05-03 11:54:18 -04:00
Ryan McGeary c672168236 Fixed GridIO#gets to handle the end of a file
Neither a multi-character nor single-character separator search returned nil
after hitting the EOF.
2011-05-03 11:36:33 -04:00
Steve Randy Tantra 3a3a31a3dc get_md5 should return @server_md5 when putting file in safe mode. 2011-05-02 01:55:54 +08:00
Kyle Banker ba1e4679fa Leave hash arguments unmodified. 2011-04-27 11:10:48 -04:00
Kyle Banker 8887402ca8 Don't modify hash arguments. 2011-04-26 07:48:17 -04:00
Kyle Banker 9cc6bad613 Simplify GridIO#read_all 2011-04-26 07:48:16 -04:00
Kyle Banker 6b9eef0d1f RUBY-240 minor fix for RUBY 1.8 2011-03-29 16:01:46 -04:00
Kyle Banker 002ddb06fc RUBY-240 Add StringIO methods to GridIO 2011-03-29 15:27:13 -04:00
Kyle Banker 025e56732e minor: test and doc fixes 2011-03-29 10:39:01 -04:00
Wojciech Piekutowski d12987bf7a Always initialize @metadata and @aliases 2011-02-20 17:09:18 +01:00
Kyle Banker 0d91faf6b1 RUBY-226 minor: license update 2011-01-17 12:26:32 -05:00
Kyle Banker 8b1f20b3cb RUBY-210 GridIO#seek with GridIO#read_all 2010-12-15 15:07:30 -05:00
Kyle Banker 9a8d83ad24 Tests for GridIO#each 2010-12-01 13:30:57 -05:00
Jonathan Tron c80cd285fa Add Mongo::GridIO#each which yield each chunks of a file, allowing Rack streaming 2010-12-01 12:55:55 -05:00
Steve Ardis ffab7ba5a3 Fixed issue with grid.rb where 'put' was duplicating the filename attribute on the file 2010-11-11 15:18:52 -05:00
Kyle Banker afe8fe3167 RUBY-193 don't create gridfs indexes when slave_ok 2010-10-21 13:01:32 -04:00
Kyle Banker 68cadc1987 minor: patch for JRuby 1.9 MD5 comparison bug 2010-10-14 16:35:13 -04:00
Kyle Banker c7c309b00d RUBY-158 deprecate BSON::ObjectID for BSON::ObjectId 2010-08-24 12:49:23 -04:00
Kyle Banker f22e81414b RUBY-141 raise exception if attempting to overwrite with Grid#put (only in safe mode) 2010-07-09 13:33:26 -04:00
Kyle Banker 924a275ea3 check command response by default; better DB#command api 2010-05-18 16:17:17 -04:00
Mike Dirolf 60ffbb2706 Check for nil response in db#command and set check_response for filemd5.
Kyle can we make check_response default to true instead of false?
2010-05-11 13:03:47 -04:00
Kyle Banker 97ee66be02 minor: source file encoding with magic comment 2010-05-07 15:33:27 -04:00
sleverbor ed76126a12 namespaced the OrderedHash class 2010-05-06 18:25:18 -07:00
Kyle Banker 7b89523315 added Grid#exist? and GridFileSystem#exist? RUBY-122 2010-05-05 11:07:52 -04:00
Kyle Banker 60f72937fd minor: removed deprecated @grid.put syntax 2010-04-28 16:21:39 -04:00
Kyle Banker 1e13187db6 minor: gridfs docs 2010-04-28 15:20:39 -04:00
Kyle Banker 56ecc470f5 minor: docs 2010-04-19 12:16:45 -04:00
Kyle Banker 3d3e983ae0 minor: docs 2010-04-07 15:58:02 -04:00
Kyle Banker fd43eca514 unique indexes for GridFS chunks collections 2010-04-07 15:53:38 -04:00
Kyle Banker cd32dabd52 added GridFileNotFound and GridMD5Failure exceptions 2010-04-07 14:39:05 -04:00
Kyle Banker 3133380341 allow arbitrary attirbutes in files collection 2010-04-07 13:54:49 -04:00
Kyle Banker 1e8e0c02fe removed deprecated GridStore class 2010-04-05 10:50:27 -04:00
Kyle Banker c4d5cb641b renamed mongo_bson to bson 2010-04-05 10:39:55 -04:00
Kyle Banker 85fd06f990 options to delete old versions of GridFileSystem files 2010-03-30 13:22:22 -04:00
Kyle Banker 284c442c46 filename is now optional for Grid#put RUBY-116 2010-03-30 11:54:23 -04:00
Mike Dirolf aa86c03bd5 test and fix for Grid#delete 2010-03-23 17:00:31 -04:00
Kyle Banker f2bc05f51c merge new bson commits 2010-03-19 15:23:24 -04:00