bson 3.0.1 → 3.0.2

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 019fdce3d10ee37a06d4981b26ce0a2a9a76fb63
4
- data.tar.gz: 79ecfec23aa93cad55213c6c89e2dcb6b84412d8
3
+ metadata.gz: 4ac84fbcc70f8632f4307aad22bd38d33d03c0a0
4
+ data.tar.gz: e15158b63b32006e7ed77bde63daac6aa4931637
5
5
  SHA512:
6
- metadata.gz: 61b0d3b6306b89f6f887a3e56f7ec2f86d1891aa4fed5a7986a96b9a28e5192de8fa619e03ceccecae8c17bb866f938db326f86e704c152bf817253941c2fdb5
7
- data.tar.gz: 5d26f6c7d1cb8d507154e2e2ef4ecdee5ddb9e19068f19bd715c30e7097c5d03b5cb8337bb2351ceed5d1f82d2f39d4bad135a58dce3580027ec41f79363bc1c
6
+ metadata.gz: 8b19fa4b7b1de4a48e4bb616812be5c2a3bca4691cfea5b229554ef2f8ca0ca62d788973afe38cc6bbfd4e7ef8e8a6f6acf00198ed097d5b5d268bc152468ae8
7
+ data.tar.gz: 89f2ff69f1f03dc7bb78213be4addbd06053339b53b17364181810e23e3fadd2cacaa236da296af9eda6ed7047042d5be3187f77da87e06713f896b5779891af
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,6 +1,13 @@
1
1
  BSON Changelog
2
2
  ==============
3
3
 
4
+ ## 3.0.2
5
+
6
+ ### Bug Fixes
7
+
8
+ * [RUBY-898](https://jira.mongodb.org/browse/RUBY-898) Compensated for different
9
+ return values of Socket#readbyte and OpenSSL::SSL::SSLSocket#readbyte.
10
+
4
11
  ## 3.0.1
5
12
 
6
13
  ### Bug Fixes
@@ -37,7 +37,7 @@ module BSON
37
37
  #
38
38
  # @since 2.0.0
39
39
  def self.from_bson(bson)
40
- bson.readbyte == 1
40
+ bson.readbyte.chr == TrueClass::TRUE_BYTE
41
41
  end
42
42
 
43
43
  # Register this type when the module is loaded.
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module BSON
16
- VERSION = "3.0.1"
16
+ VERSION = "3.0.2"
17
17
  end
@@ -30,3 +30,17 @@ require "rspec"
30
30
  require "yaml"
31
31
 
32
32
  Dir["./spec/support/**/*.rb"].each { |file| require file }
33
+
34
+ # Alternate IO class that returns a String from #readbyte.
35
+ # See RUBY-898 for more information on why we need to test this.
36
+ # Ruby core documentation says IO#readbyte returns a Fixnum, but
37
+ # OpenSSL::SSL::SSLSocket#readbyte returns a String.
38
+ class AlternateIO < StringIO
39
+
40
+ # Read a byte from the stream.
41
+ #
42
+ # @returns [ String ] A String representation of the next byte.
43
+ def readbyte
44
+ super.chr
45
+ end
46
+ end
@@ -64,6 +64,21 @@ shared_examples_for "a deserializable bson element" do
64
64
  it "deserializes from bson" do
65
65
  expect(result).to eq(obj)
66
66
  end
67
+
68
+ context 'when io#readbyte returns a String' do
69
+
70
+ let(:io) do
71
+ AlternateIO.new(bson)
72
+ end
73
+
74
+ let(:result) do
75
+ described_class.from_bson(io)
76
+ end
77
+
78
+ it "deserializes from bson" do
79
+ expect(result).to eq(obj)
80
+ end
81
+ end
67
82
  end
68
83
 
69
84
  shared_examples_for "a JSON serializable object" do
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.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Brock
@@ -16,7 +16,7 @@ cert_chain:
16
16
  -----BEGIN CERTIFICATE-----
17
17
  MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtkcml2
18
18
  ZXItcnVieTEVMBMGCgmSJomT8ixkARkWBTEwZ2VuMRMwEQYKCZImiZPyLGQBGRYD
19
- Y29tMB4XDTE0MTEyMDE1NTYxOVoXDTE1MTEyMDE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CY
32
+ F+0vDVtGok06CXnb2swHEtd1Z8zpQviJ3xpSGAvF88+glzvPQmCyA071kPUAmDvd
33
+ 5og5x3Bv8IxaxmEpFndXhT3NHL/tOBeT9VJuJWMCxOXRCv4y9bBBTrxoRVuos59Z
34
+ XZOS48LlWh15EG4yZo/gRzqNAW2LUIkYA5eMS2Kp6r+KV8IBUO/LaHdrXbdilpa8
35
+ BRsuCo7UZDbFVRns04HLyjVvkj+K/ywIcdKdS0csz5M=
36
36
  -----END CERTIFICATE-----
37
- date: 2015-03-30 00:00:00.000000000 Z
37
+ date: 2015-04-23 00:00:00.000000000 Z
38
38
  dependencies: []
39
39
  description: A full featured BSON specification implementation, in Ruby
40
40
  email:
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: 1.3.6
137
137
  requirements: []
138
138
  rubyforge_project: bson
139
- rubygems_version: 2.4.6
139
+ rubygems_version: 2.4.5
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Ruby Implementation of the BSON specification
metadata.gz.sig CHANGED
Binary file