bson 1.4.0 → 1.5.0.rc0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bson might be problematic. Click here for more details.

@@ -18,10 +18,10 @@
18
18
 
19
19
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
20
20
 
21
- MINIMUM_BSON_EXT_VERSION = "1.4.0"
21
+ MINIMUM_BSON_EXT_VERSION = "1.5.0.rc0"
22
22
 
23
23
  module BSON
24
- VERSION = "1.4.0"
24
+ VERSION = "1.5.0.rc0"
25
25
 
26
26
  if defined? Mongo::DEFAULT_MAX_BSON_SIZE
27
27
  DEFAULT_MAX_BSON_SIZE = Mongo::DEFAULT_MAX_BSON_SIZE
@@ -130,11 +130,12 @@ module BSON
130
130
  end
131
131
 
132
132
  def delete_if(&block)
133
- self.each do |k,v|
134
- if yield k, v
135
- delete(k)
133
+ keys.each do |key|
134
+ if yield key, self[key]
135
+ delete(key)
136
136
  end
137
137
  end
138
+ self
138
139
  end
139
140
 
140
141
  def reject(&block)
@@ -2,14 +2,12 @@
2
2
  require './test/bson/test_helper'
3
3
 
4
4
  class BinaryTest < Test::Unit::TestCase
5
- context "Inspecting" do
6
- setup do
7
- @data = ("THIS IS BINARY " * 50).unpack("c*")
8
- end
5
+ def setup
6
+ @data = ("THIS IS BINARY " * 50).unpack("c*")
7
+ end
9
8
 
10
- should "not display actual data" do
11
- binary = BSON::Binary.new(@data)
12
- assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect
13
- end
9
+ def test_do_not_display_binary_data
10
+ binary = BSON::Binary.new(@data)
11
+ assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect
14
12
  end
15
13
  end
@@ -9,6 +9,7 @@ end
9
9
  require 'bigdecimal'
10
10
 
11
11
  begin
12
+ require 'date'
12
13
  require 'tzinfo'
13
14
  require 'active_support/core_ext'
14
15
  Time.zone = "Pacific Time (US & Canada)"
@@ -212,6 +212,8 @@ class OrderedHashTest < Test::Unit::TestCase
212
212
  assert @oh.keys.include?('z')
213
213
  @oh.delete_if { |k,v| k == 'z' }
214
214
  assert !@oh.keys.include?('z')
215
+ @oh.delete_if { |k, v| v > 0 }
216
+ assert @oh.keys.empty?
215
217
  end
216
218
 
217
219
  def test_reject
@@ -10,23 +10,6 @@ def silently
10
10
  result
11
11
  end
12
12
 
13
- begin
14
- require 'rubygems' if RUBY_VERSION < "1.9.0" && !ENV['C_EXT']
15
- silently { require 'shoulda' }
16
- silently { require 'mocha' }
17
- rescue LoadError
18
- puts <<MSG
19
-
20
- This test suite requires shoulda and mocha.
21
- You can install them as follows:
22
- gem install shoulda
23
- gem install mocha
24
-
25
- MSG
26
-
27
- exit
28
- end
29
-
30
13
  require 'bson_ext/cbson' if !(RUBY_PLATFORM =~ /java/) && ENV['C_EXT']
31
14
 
32
15
  class Test::Unit::TestCase
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
5
- prerelease:
6
- segments:
7
- - 1
8
- - 4
9
- - 0
10
- version: 1.4.0
4
+ prerelease: 6
5
+ version: 1.5.0.rc0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Jim Menard
@@ -17,7 +12,7 @@ autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
14
 
20
- date: 2011-09-20 00:00:00 -04:00
15
+ date: 2011-11-18 00:00:00 -05:00
21
16
  default_executable:
22
17
  dependencies: []
23
18
 
@@ -72,19 +67,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
67
  requirements:
73
68
  - - ">="
74
69
  - !ruby/object:Gem::Version
75
- hash: 3
76
- segments:
77
- - 0
78
70
  version: "0"
79
71
  required_rubygems_version: !ruby/object:Gem::Requirement
80
72
  none: false
81
73
  requirements:
82
- - - ">="
74
+ - - ">"
83
75
  - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
76
+ version: 1.3.1
88
77
  requirements: []
89
78
 
90
79
  rubyforge_project: