bson 1.2.2 → 1.2.3
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.
- data/lib/bson.rb +2 -2
- data/test/bson/bson_string_test.rb +30 -0
- metadata +22 -20
data/lib/bson.rb
CHANGED
@@ -18,10 +18,10 @@
|
|
18
18
|
|
19
19
|
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
20
20
|
|
21
|
-
MINIMUM_BSON_EXT_VERSION = "1.2.
|
21
|
+
MINIMUM_BSON_EXT_VERSION = "1.2.3"
|
22
22
|
|
23
23
|
module BSON
|
24
|
-
VERSION = "1.2.
|
24
|
+
VERSION = "1.2.3"
|
25
25
|
|
26
26
|
if defined? Mongo::DEFAULT_MAX_BSON_SIZE
|
27
27
|
DEFAULT_MAX_BSON_SIZE = Mongo::DEFAULT_MAX_BSON_SIZE
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding:utf-8
|
2
|
+
require './test/test_helper'
|
3
|
+
require 'complex'
|
4
|
+
require 'bigdecimal'
|
5
|
+
require 'rational'
|
6
|
+
|
7
|
+
class BSONTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
include BSON
|
10
|
+
|
11
|
+
def setup
|
12
|
+
@encoder = BSON::BSON_CODER
|
13
|
+
end
|
14
|
+
|
15
|
+
def assert_doc_pass(doc, options={})
|
16
|
+
bson = @encoder.serialize(doc)
|
17
|
+
if options[:debug]
|
18
|
+
puts "DEBUGGING DOC:"
|
19
|
+
p bson.to_a
|
20
|
+
puts "DESERIALIZES TO:"
|
21
|
+
end
|
22
|
+
assert_equal @encoder.serialize(doc).to_a, bson.to_a
|
23
|
+
assert_equal doc, @encoder.deserialize(bson)
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_string
|
27
|
+
assert_doc_pass({:a => "hello"})
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 3
|
10
|
+
version: 1.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jim Menard
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-02-
|
20
|
+
date: 2011-02-22 00:00:00 -05:00
|
21
21
|
default_executable:
|
22
22
|
dependencies: []
|
23
23
|
|
@@ -33,26 +33,27 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- LICENSE.txt
|
35
35
|
- lib/bson.rb
|
36
|
-
- lib/bson/bson_ruby.rb
|
37
36
|
- lib/bson/bson_c.rb
|
37
|
+
- lib/bson/bson_java.rb
|
38
|
+
- lib/bson/bson_ruby.rb
|
39
|
+
- lib/bson/byte_buffer.rb
|
38
40
|
- lib/bson/exceptions.rb
|
39
41
|
- lib/bson/ordered_hash.rb
|
40
|
-
- lib/bson/types/dbref.rb
|
41
|
-
- lib/bson/types/code.rb
|
42
|
-
- lib/bson/types/object_id.rb
|
43
42
|
- lib/bson/types/binary.rb
|
43
|
+
- lib/bson/types/code.rb
|
44
|
+
- lib/bson/types/dbref.rb
|
44
45
|
- lib/bson/types/min_max_keys.rb
|
45
|
-
- lib/bson/
|
46
|
-
- lib/bson/bson_java.rb
|
46
|
+
- lib/bson/types/object_id.rb
|
47
47
|
- bin/b2json
|
48
48
|
- bin/j2bson
|
49
|
-
- test/bson/byte_buffer_test.rb
|
50
49
|
- test/bson/binary_test.rb
|
51
|
-
- test/bson/
|
52
|
-
- test/bson/json_test.rb
|
50
|
+
- test/bson/bson_string_test.rb
|
53
51
|
- test/bson/bson_test.rb
|
54
|
-
- test/bson/
|
52
|
+
- test/bson/byte_buffer_test.rb
|
55
53
|
- test/bson/hash_with_indifferent_access_test.rb
|
54
|
+
- test/bson/json_test.rb
|
55
|
+
- test/bson/object_id_test.rb
|
56
|
+
- test/bson/ordered_hash_test.rb
|
56
57
|
has_rdoc: true
|
57
58
|
homepage: http://www.mongodb.org
|
58
59
|
licenses: []
|
@@ -83,15 +84,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
84
|
requirements: []
|
84
85
|
|
85
86
|
rubyforge_project:
|
86
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 1.3.7
|
87
88
|
signing_key:
|
88
89
|
specification_version: 3
|
89
90
|
summary: Ruby implementation of BSON
|
90
91
|
test_files:
|
91
|
-
- test/bson/byte_buffer_test.rb
|
92
92
|
- test/bson/binary_test.rb
|
93
|
-
- test/bson/
|
94
|
-
- test/bson/json_test.rb
|
93
|
+
- test/bson/bson_string_test.rb
|
95
94
|
- test/bson/bson_test.rb
|
96
|
-
- test/bson/
|
95
|
+
- test/bson/byte_buffer_test.rb
|
97
96
|
- test/bson/hash_with_indifferent_access_test.rb
|
97
|
+
- test/bson/json_test.rb
|
98
|
+
- test/bson/object_id_test.rb
|
99
|
+
- test/bson/ordered_hash_test.rb
|