bson 1.2.2-jruby → 1.2.3-jruby
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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: jruby
|
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,29 +33,30 @@ 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
49
|
- ext/java/jar/bson-2.2.jar
|
50
50
|
- ext/java/jar/jbson.jar
|
51
51
|
- ext/java/jar/mongo-2.4.jar
|
52
|
-
- test/bson/byte_buffer_test.rb
|
53
52
|
- test/bson/binary_test.rb
|
54
|
-
- test/bson/
|
55
|
-
- test/bson/json_test.rb
|
53
|
+
- test/bson/bson_string_test.rb
|
56
54
|
- test/bson/bson_test.rb
|
57
|
-
- test/bson/
|
55
|
+
- test/bson/byte_buffer_test.rb
|
58
56
|
- test/bson/hash_with_indifferent_access_test.rb
|
57
|
+
- test/bson/json_test.rb
|
58
|
+
- test/bson/object_id_test.rb
|
59
|
+
- test/bson/ordered_hash_test.rb
|
59
60
|
has_rdoc: true
|
60
61
|
homepage: http://www.mongodb.org
|
61
62
|
licenses: []
|
@@ -86,15 +87,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
87
|
requirements: []
|
87
88
|
|
88
89
|
rubyforge_project:
|
89
|
-
rubygems_version: 1.
|
90
|
+
rubygems_version: 1.3.7
|
90
91
|
signing_key:
|
91
92
|
specification_version: 3
|
92
93
|
summary: Ruby implementation of BSON
|
93
94
|
test_files:
|
94
|
-
- test/bson/byte_buffer_test.rb
|
95
95
|
- test/bson/binary_test.rb
|
96
|
-
- test/bson/
|
97
|
-
- test/bson/json_test.rb
|
96
|
+
- test/bson/bson_string_test.rb
|
98
97
|
- test/bson/bson_test.rb
|
99
|
-
- test/bson/
|
98
|
+
- test/bson/byte_buffer_test.rb
|
100
99
|
- test/bson/hash_with_indifferent_access_test.rb
|
100
|
+
- test/bson/json_test.rb
|
101
|
+
- test/bson/object_id_test.rb
|
102
|
+
- test/bson/ordered_hash_test.rb
|