bson 1.6.2-jruby → 1.6.4-jruby
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/bin/b2json +1 -1
- data/bin/j2bson +1 -1
- data/lib/bson/bson_ruby.rb +1 -1
- data/lib/bson/version.rb +1 -1
- data/test/bson/binary_test.rb +1 -1
- data/test/bson/bson_test.rb +8 -1
- data/test/bson/byte_buffer_test.rb +1 -1
- data/test/bson/hash_with_indifferent_access_test.rb +1 -1
- data/test/bson/json_test.rb +1 -1
- data/test/bson/object_id_test.rb +11 -1
- data/test/bson/ordered_hash_test.rb +1 -1
- data/test/bson/timestamp_test.rb +1 -1
- metadata +3 -3
data/bin/b2json
CHANGED
data/bin/j2bson
CHANGED
data/lib/bson/bson_ruby.rb
CHANGED
data/lib/bson/version.rb
CHANGED
data/test/bson/binary_test.rb
CHANGED
data/test/bson/bson_test.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding:utf-8
|
2
|
-
require
|
2
|
+
require File.expand_path("../test_helper", __FILE__)
|
3
3
|
require 'set'
|
4
4
|
|
5
5
|
if RUBY_VERSION < '1.9'
|
@@ -141,6 +141,13 @@ class BSONTest < Test::Unit::TestCase
|
|
141
141
|
end
|
142
142
|
end
|
143
143
|
|
144
|
+
def test_forced_encoding_with_valid_utf8
|
145
|
+
doc = {'doc' => "\xC3\xB6".force_encoding("ISO-8859-1")}
|
146
|
+
serialized = @encoder.serialize(doc)
|
147
|
+
deserialized = @encoder.deserialize(serialized)
|
148
|
+
assert_equal(doc['doc'], deserialized['doc'].force_encoding("ISO-8859-1"))
|
149
|
+
end
|
150
|
+
|
144
151
|
# Based on a test from sqlite3-ruby
|
145
152
|
def test_default_internal_is_honored
|
146
153
|
before_enc = Encoding.default_internal
|
data/test/bson/json_test.rb
CHANGED
data/test/bson/object_id_test.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require File.expand_path("../test_helper", __FILE__)
|
2
2
|
require 'rubygems'
|
3
3
|
require 'json'
|
4
4
|
|
@@ -135,4 +135,14 @@ class ObjectIdTest < Test::Unit::TestCase
|
|
135
135
|
id = ObjectId.new
|
136
136
|
assert_equal({"$oid" => id.to_s}, id.as_json)
|
137
137
|
end
|
138
|
+
|
139
|
+
def test_object_id_array_flatten
|
140
|
+
id = ObjectId.new
|
141
|
+
assert_equal [ id ], [[ id ]].flatten
|
142
|
+
end
|
143
|
+
|
144
|
+
def test_object_id_array_flatten_bang
|
145
|
+
id = ObjectId.new
|
146
|
+
assert_equal [ id ], [[ id ]].flatten!
|
147
|
+
end
|
138
148
|
end
|
data/test/bson/timestamp_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.4
|
5
5
|
prerelease:
|
6
6
|
platform: jruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: A Ruby BSON implementation for MongoDB. For more information about Mongo,
|
17
17
|
see http://www.mongodb.org. For more information on BSON, see http://www.bsonspec.org.
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.8.
|
73
|
+
rubygems_version: 1.8.24
|
74
74
|
signing_key:
|
75
75
|
specification_version: 3
|
76
76
|
summary: Ruby implementation of BSON
|