mongo 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,3 +1,7 @@
1
+ 1.0.5 2010-7-13
2
+
3
+ * Fix for bug introduced in 1.0.4.
4
+
1
5
  1.0.4 2010-7-13
2
6
 
3
7
  * Removed deprecated
@@ -3,7 +3,7 @@
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
5
  module Mongo
6
- VERSION = "1.0.4"
6
+ VERSION = "1.0.5"
7
7
  end
8
8
 
9
9
  module Mongo
@@ -480,7 +480,7 @@ module Mongo
480
480
  #
481
481
  # @core mapreduce map_reduce-instance_method
482
482
  def map_reduce(map, reduce, opts={})
483
- opts.assert_valid_keys(:query, :sort, :limit, :finalize, :keeptemp, :verbose, :raw)
483
+ opts.assert_valid_keys(:query, :sort, :limit, :finalize, :out, :keeptemp, :verbose, :raw)
484
484
  map = BSON::Code.new(map) unless map.is_a?(BSON::Code)
485
485
  reduce = BSON::Code.new(reduce) unless reduce.is_a?(BSON::Code)
486
486
  raw = opts.delete(:raw)
@@ -29,5 +29,5 @@ Gem::Specification.new do |s|
29
29
  s.email = 'mongodb-dev@googlegroups.com'
30
30
  s.homepage = 'http://www.mongodb.org'
31
31
 
32
- s.add_dependency(%q<bson>, ["= #{Mongo::VERSION}"])
32
+ s.add_dependency(%q<bson>, [">= 1.0.4"])
33
33
  end
@@ -439,6 +439,16 @@ class TestCollection < Test::Unit::TestCase
439
439
  assert res["timeMillis"]
440
440
  end
441
441
 
442
+ def test_map_reduce_with_output_collection
443
+ output_collection = "test-map-coll"
444
+ m = Code.new("function() { emit(this.user_id, 1); }")
445
+ r = Code.new("function(k,vals) { return 1; }")
446
+ res = @@test.map_reduce(m, r, :raw => true, :out => output_collection)
447
+ assert_equal output_collection, res["result"]
448
+ assert res["counts"]
449
+ assert res["timeMillis"]
450
+ end
451
+
442
452
  def test_allows_only_valid_keys
443
453
  m = Code.new("function() { emit(this.user_id, 1); }")
444
454
  r = Code.new("function(k,vals) { return 1; }")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 4
9
- version: 1.0.4
8
+ - 5
9
+ version: 1.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jim Menard
@@ -24,7 +24,7 @@ dependencies:
24
24
  prerelease: false
25
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "="
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  segments:
30
30
  - 1