bson 3.0.1-java → 3.0.2-java

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: 94f168576510a364adb9eaf334c85a9a568ceb6d
4
- data.tar.gz: 1d5e8c4a8fa6c7cd209d7de5d89debb2b490e4ca
3
+ metadata.gz: 877436240448eb4678ff95791f41cd7a3be643dc
4
+ data.tar.gz: bebbfb19aac4bf51867c3b99e5d74d0375336dfa
5
5
  SHA512:
6
- metadata.gz: ccdb34c828dc47587aebfda35329e28fa55a70487f19bda844516071f75ea3fdabecba08dfe373deecab43bb1386eea30ebeea4f9761a48fc4f03b6559652033
7
- data.tar.gz: 3b24a7a00b196b913b7fc1be4c44295f9ce054b29bfa5f99148e885b1b2dcfd95ef2018e13931fdb7dd55ac7af434b952e3024fbce9ac4e5189a4ed2f84c20a4
6
+ metadata.gz: 00ab0326b23d9e0fc63b21a12e33de0e5b5edcece77b475352d7d9176e2601ddd91c0d971fb6fec43adec834fde0ce6c04cba86b750aa0c850304467531c5f5a
7
+ data.tar.gz: bb9f904072bceeadc47c0885b20856f01a7ce4cd309c505ad1cd706c750d9a01254d4254262e53df5fc5af2e70f35c843d16208f3604a3984007e60c96f539b5
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
Binary file
@@ -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: java
6
6
  authors:
7
7
  - Tyler Brock
@@ -16,7 +16,7 @@ cert_chain:
16
16
  -----BEGIN CERTIFICATE-----
17
17
  MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtkcml2
18
18
  ZXItcnVieTEVMBMGCgmSJomT8ixkARkWBTEwZ2VuMRMwEQYKCZImiZPyLGQBGRYD
19
- Y29tMB4XDTE0MTEyMDE1NTYxOVoXDTE1MTEyMDE1NTYxOVowQjE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DVtGok06CXnb2swHEtd1Z8zpQviJ3xpSGAvF88+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:
@@ -43,8 +43,8 @@ executables: []
43
43
  extensions: []
44
44
  extra_rdoc_files: []
45
45
  files:
46
- - CONTRIBUTING.md
47
46
  - CHANGELOG.md
47
+ - CONTRIBUTING.md
48
48
  - LICENSE
49
49
  - NOTICE
50
50
  - README.md
@@ -83,8 +83,6 @@ files:
83
83
  - lib/bson/true_class.rb
84
84
  - lib/bson/undefined.rb
85
85
  - lib/bson/version.rb
86
- - spec/bson_spec.rb
87
- - spec/spec_helper.rb
88
86
  - spec/bson/array_spec.rb
89
87
  - spec/bson/binary_spec.rb
90
88
  - spec/bson/boolean_spec.rb
@@ -113,6 +111,8 @@ files:
113
111
  - spec/bson/timestamp_spec.rb
114
112
  - spec/bson/true_class_spec.rb
115
113
  - spec/bson/undefined_spec.rb
114
+ - spec/bson_spec.rb
115
+ - spec/spec_helper.rb
116
116
  - spec/support/shared_examples.rb
117
117
  homepage: http://bsonspec.org
118
118
  licenses:
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: 1.3.6
135
135
  requirements: []
136
136
  rubyforge_project: bson
137
- rubygems_version: 2.1.9
137
+ rubygems_version: 2.4.1
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: Ruby Implementation of the BSON specification
metadata.gz.sig CHANGED
Binary file