bson 3.2.3-java → 3.2.4-java
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +6 -2
- data/lib/bson-ruby.jar +0 -0
- data/lib/bson/hash.rb +2 -2
- data/lib/bson/version.rb +1 -1
- data/spec/bson/document_spec.rb +34 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c56b5705464d23f23e17cb6075facfe3a0920507
|
4
|
+
data.tar.gz: 7026777dc603e8c421e7484f00a196580a0a5c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e14b929b5918634f7a0fc6f92776150715ae4514a7aa2ee063c1be773c7cf42b41840cd605d70a76255acb3baee828d5ec59215e3f5635c535167860adb7bc21
|
7
|
+
data.tar.gz: ac58c8d00dc791fdf507f058d409f82283eeab622af37cb30ef0c3eba680364cda0bb13c36a4cc5f4c47c18d554f3478d62b4235e859b53d263eedac568f7c6c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
BSON Changelog
|
2
2
|
==============
|
3
3
|
|
4
|
+
## 3.2.4
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* [RUBY-1019](https://jira.mongodb.org/browse/RUBY-1019) Performace improvements on deserialization.
|
9
|
+
|
4
10
|
## 3.2.3
|
5
11
|
|
6
12
|
### Bug Fixes
|
@@ -9,8 +15,6 @@ BSON Changelog
|
|
9
15
|
|
10
16
|
* [#40](https://github.com/mongodb/bson-ruby/pull/40) Added big endian support. (Jeff Blight)
|
11
17
|
|
12
|
-
* [RUBY-1019](https://jira.mongodb.org/browse/RUBY-1019) Performace improvements on deserialization.
|
13
|
-
|
14
18
|
## 3.2.1
|
15
19
|
|
16
20
|
### Bug Fixes
|
data/lib/bson-ruby.jar
CHANGED
Binary file
|
data/lib/bson/hash.rb
CHANGED
@@ -72,11 +72,11 @@ module BSON
|
|
72
72
|
#
|
73
73
|
# @since 2.0.0
|
74
74
|
def from_bson(bson)
|
75
|
-
hash =
|
75
|
+
hash = Document.allocate
|
76
76
|
bson.read(4) # Swallow the first four bytes.
|
77
77
|
while (type = bson.readbyte.chr) != NULL_BYTE
|
78
78
|
field = bson.gets(NULL_BYTE).from_bson_string.chop!
|
79
|
-
hash
|
79
|
+
hash.store(field, BSON::Registry.get(type).from_bson(bson))
|
80
80
|
end
|
81
81
|
hash
|
82
82
|
end
|
data/lib/bson/version.rb
CHANGED
data/spec/bson/document_spec.rb
CHANGED
@@ -626,6 +626,40 @@ describe BSON::Document do
|
|
626
626
|
end
|
627
627
|
end
|
628
628
|
|
629
|
+
describe "#from_bson" do
|
630
|
+
|
631
|
+
context "when the document has embedded documents in an array" do
|
632
|
+
|
633
|
+
let(:embedded_document) do
|
634
|
+
BSON::Document.new(n: 1)
|
635
|
+
end
|
636
|
+
|
637
|
+
let(:embedded_documents) do
|
638
|
+
[ embedded_document ]
|
639
|
+
end
|
640
|
+
|
641
|
+
let(:document) do
|
642
|
+
BSON::Document.new(field: 'value', embedded: embedded_documents)
|
643
|
+
end
|
644
|
+
|
645
|
+
let(:serialized) do
|
646
|
+
document.to_bson
|
647
|
+
end
|
648
|
+
|
649
|
+
let(:deserialized) do
|
650
|
+
described_class.from_bson(StringIO.new(serialized))
|
651
|
+
end
|
652
|
+
|
653
|
+
it 'deserializes the documents' do
|
654
|
+
expect(deserialized).to eq(document)
|
655
|
+
end
|
656
|
+
|
657
|
+
it 'deserializes embedded documents as document type' do
|
658
|
+
expect(deserialized[:embedded].first).to be_a(BSON::Document)
|
659
|
+
end
|
660
|
+
end
|
661
|
+
end
|
662
|
+
|
629
663
|
describe "#to_bson/#from_bson" do
|
630
664
|
|
631
665
|
let(:type) { 3.chr }
|
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: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Tyler Brock
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
XZOS48LlWh15EG4yZo/gRzqNAW2LUIkYA5eMS2Kp6r+KV8IBUO/LaHdrXbdilpa8
|
35
35
|
BRsuCo7UZDbFVRns04HLyjVvkj+K/ywIcdKdS0csz5M=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2015-09-
|
37
|
+
date: 2015-09-04 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: A full featured BSON specification implementation, in Ruby
|
40
40
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|