bson 4.11.0-java → 4.11.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7adb7902f9a5a688e440c021e8db54f373cd49930f1ca26e4be4242978c86dd8
4
- data.tar.gz: f4e42673b1d7becb9d069b5837026b171d3d1884d5548c7a04dc90fbc4e255b1
3
+ metadata.gz: 725cd0cbc7f1ffe6b21db7a0bba75f06004cfe840bdc960ec3e800017b655bcd
4
+ data.tar.gz: ded62238e5d764555a8325e22832383413923fd794f5f342bc908d97868e1676
5
5
  SHA512:
6
- metadata.gz: 97b70aad52dc56049c3776b2348d5f8bf9cea1053fa7dbbad4b05a43677cff6ad0ea6be227601270cc260de21e0d082b3cf950211078b23f16f813779d53e2e0
7
- data.tar.gz: a4b983b9900bdf88d9fab2e188cad8819ba9738a4a8c0da937d42123455b703c3bd03317e248ec18254e407d28ab4c21aac3cf9fd0cfdea4e61d5aa00d165093
6
+ metadata.gz: 6d0b0a456f5bf8ac39396cceb105f7ef0f28cf17694583e4da3d9fb4385e8852151b1408ea15e77a27154013602f317f67ab8b2be83cae195fe579c34723ce0b
7
+ data.tar.gz: c21d38cb8696363b1ddbc87c781e2109b236ba99de9dfb86e9daa8cabacf230b83d84f06d68bbebbe7aafa6598358d77a395a6ee2426fc337b5cbaa07510b10c
@@ -1,2 +1,2 @@
1
- ��G��ch��M*��=\llF��RӠO��v�C�O0�qR�b�T��ɿ��A��5a� 2�61���OF�i�m���ז�o�)�C�X&h���H�轄��oi`4"���Kh��~^������`
2
- eG�Vnk��/��|�8�.#H���FI�V���7��Gm�#s�=-,���B��i���ʺ�.����ӗ{M�8o'�-��s��t��,GH��!lՎ� 8m�G|�`���~����)�|L\CS
1
+ d{�?���8���ɜ�R��X�
2
+ �>�V���u������K���i�~h-oj@4,#�7i3����(7X�7b�*z���}�w����g��b%9J��l o@�S�8+�U0�"�0шK�(�4�Z ���aݼ#"]4�h�gt+��q9��/o䅟 G������+���]n�yQ����6PO�ՄbEEha�������D�`-p��P�C��-�:Z6� w�[
data.tar.gz.sig CHANGED
Binary file
Binary file
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module BSON
16
- VERSION = "4.11.0".freeze
16
+ VERSION = "4.11.1".freeze
17
17
  end
@@ -42,7 +42,6 @@ describe BSON::ByteBuffer do
42
42
  end
43
43
  end
44
44
 
45
-
46
45
  context 'when the byte buffer is initialized with some bytes' do
47
46
 
48
47
  let(:buffer) do
@@ -53,6 +52,50 @@ describe BSON::ByteBuffer do
53
52
  expect(buffer.length).to eq(2)
54
53
  end
55
54
  end
55
+
56
+ context 'after the byte buffer was read from' do
57
+
58
+ let(:buffer) do
59
+ described_class.new({}.to_bson.to_s)
60
+ end
61
+
62
+ it 'returns the number of bytes remaining in the buffer' do
63
+ expect(buffer.length).to eq(5)
64
+ buffer.get_int32
65
+ expect(buffer.length).to eq(1)
66
+ end
67
+ end
68
+
69
+ context 'after the byte buffer was converted to string' do
70
+
71
+ shared_examples 'returns the total buffer length' do
72
+ it 'returns the total buffer length' do
73
+ expect(buffer.length).to eq(5)
74
+ buffer.to_s.length.should == 5
75
+ expect(buffer.length).to eq(5)
76
+ end
77
+ end
78
+
79
+ context 'read buffer' do
80
+
81
+ let(:buffer) do
82
+ described_class.new({}.to_bson.to_s)
83
+ end
84
+
85
+ include_examples 'returns the total buffer length'
86
+ end
87
+
88
+ context 'write buffer' do
89
+
90
+ let(:buffer) do
91
+ described_class.new.tap do |buffer|
92
+ buffer.put_bytes('hello')
93
+ end
94
+ end
95
+
96
+ include_examples 'returns the total buffer length'
97
+ end
98
+ end
56
99
  end
57
100
 
58
101
  describe '#rewind!' do
@@ -148,4 +191,40 @@ describe BSON::ByteBuffer do
148
191
  end
149
192
  end
150
193
  end
194
+
195
+ describe '#to_s' do
196
+ context 'read buffer' do
197
+ let(:buffer) do
198
+ described_class.new("\x18\x00\x00\x00*\x00\x00\x00")
199
+ end
200
+
201
+ it 'returns the data' do
202
+ buffer.to_s.should == "\x18\x00\x00\x00*\x00\x00\x00"
203
+ end
204
+
205
+ it 'returns the remaining buffer contents after a read' do
206
+ buffer.to_s.should == "\x18\x00\x00\x00*\x00\x00\x00"
207
+ buffer.get_int32.should == 24
208
+ buffer.to_s.should == "*\x00\x00\x00"
209
+ end
210
+ end
211
+
212
+ context 'write buffer' do
213
+ let(:buffer) do
214
+ described_class.new.tap do |buffer|
215
+ buffer.put_int32(24)
216
+ end
217
+ end
218
+
219
+ it 'returns the data' do
220
+ buffer.to_s.should == "\x18\x00\x00\x00".force_encoding('binary')
221
+ end
222
+
223
+ it 'returns the complete buffer contents after a write' do
224
+ buffer.to_s.should == "\x18\x00\x00\x00".force_encoding('binary')
225
+ buffer.put_int32(42)
226
+ buffer.to_s.should == "\x18\x00\x00\x00*\x00\x00\x00".force_encoding('binary')
227
+ end
228
+ end
229
+ end
151
230
  end
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: 4.11.0
4
+ version: 4.11.1
5
5
  platform: java
6
6
  authors:
7
7
  - Tyler Brock
@@ -33,7 +33,7 @@ cert_chain:
33
33
  gpvfPNWMwyBDlHaNS3GfO6cRRxBOvEG05GUCsvtTY4Bpe8yjE64wg1ymb47LMOnv
34
34
  Qb1lGORmf/opg45mluKUYl7pQNZHD0d3
35
35
  -----END CERTIFICATE-----
36
- date: 2020-10-21 00:00:00.000000000 Z
36
+ date: 2020-11-04 00:00:00.000000000 Z
37
37
  dependencies: []
38
38
  description: A fully featured BSON specification implementation in Ruby
39
39
  email:
@@ -89,7 +89,6 @@ files:
89
89
  - lib/bson/true_class.rb
90
90
  - lib/bson/undefined.rb
91
91
  - lib/bson/version.rb
92
- - lib/bson_native.bundle
93
92
  - spec/bson/array_spec.rb
94
93
  - spec/bson/binary_spec.rb
95
94
  - spec/bson/binary_uuid_spec.rb
@@ -231,111 +230,111 @@ summary: Ruby implementation of the BSON specification
231
230
  test_files:
232
231
  - spec/spec_helper.rb
233
232
  - spec/bson_spec.rb
233
+ - spec/spec_tests/corpus_spec.rb
234
234
  - spec/spec_tests/common_driver_spec.rb
235
235
  - spec/spec_tests/corpus_legacy_spec.rb
236
- - spec/spec_tests/corpus_spec.rb
236
+ - spec/spec_tests/data/corpus/decimal128-7.json
237
+ - spec/spec_tests/data/corpus/top.json
237
238
  - spec/spec_tests/data/corpus/array.json
239
+ - spec/spec_tests/data/corpus/null.json
238
240
  - spec/spec_tests/data/corpus/document.json
239
- - spec/spec_tests/data/corpus/decimal128-7.json
240
- - spec/spec_tests/data/corpus/decimal128-3.json
241
- - spec/spec_tests/data/corpus/maxkey.json
242
- - spec/spec_tests/data/corpus/code.json
243
- - spec/spec_tests/data/corpus/dbpointer.json
244
- - spec/spec_tests/data/corpus/int32.json
245
- - spec/spec_tests/data/corpus/README.md
246
- - spec/spec_tests/data/corpus/decimal128-5.json
247
- - spec/spec_tests/data/corpus/decimal128-4.json
248
241
  - spec/spec_tests/data/corpus/decimal128-2.json
249
- - spec/spec_tests/data/corpus/double.json
250
- - spec/spec_tests/data/corpus/code_w_scope.json
242
+ - spec/spec_tests/data/corpus/decimal128-6.json
243
+ - spec/spec_tests/data/corpus/boolean.json
244
+ - spec/spec_tests/data/corpus/README.md
245
+ - spec/spec_tests/data/corpus/maxkey.json
251
246
  - spec/spec_tests/data/corpus/binary.json
247
+ - spec/spec_tests/data/corpus/multi-type.json
248
+ - spec/spec_tests/data/corpus/timestamp.json
249
+ - spec/spec_tests/data/corpus/multi-type-deprecated.json
250
+ - spec/spec_tests/data/corpus/dbpointer.json
252
251
  - spec/spec_tests/data/corpus/oid.json
253
- - spec/spec_tests/data/corpus/null.json
254
- - spec/spec_tests/data/corpus/decimal128-6.json
255
- - spec/spec_tests/data/corpus/int64.json
256
- - spec/spec_tests/data/corpus/dbref.json
257
252
  - spec/spec_tests/data/corpus/regex.json
258
253
  - spec/spec_tests/data/corpus/minkey.json
259
- - spec/spec_tests/data/corpus/multi-type.json
260
- - spec/spec_tests/data/corpus/top.json
261
254
  - spec/spec_tests/data/corpus/symbol.json
262
- - spec/spec_tests/data/corpus/multi-type-deprecated.json
255
+ - spec/spec_tests/data/corpus/dbref.json
256
+ - spec/spec_tests/data/corpus/decimal128-1.json
263
257
  - spec/spec_tests/data/corpus/undefined.json
264
- - spec/spec_tests/data/corpus/datetime.json
258
+ - spec/spec_tests/data/corpus/double.json
259
+ - spec/spec_tests/data/corpus/decimal128-4.json
260
+ - spec/spec_tests/data/corpus/decimal128-3.json
261
+ - spec/spec_tests/data/corpus/decimal128-5.json
262
+ - spec/spec_tests/data/corpus/int32.json
265
263
  - spec/spec_tests/data/corpus/string.json
266
- - spec/spec_tests/data/corpus/boolean.json
267
- - spec/spec_tests/data/corpus/timestamp.json
268
- - spec/spec_tests/data/corpus/decimal128-1.json
269
- - spec/spec_tests/data/decimal128/decimal128-7.json
270
- - spec/spec_tests/data/decimal128/decimal128-3.json
271
- - spec/spec_tests/data/decimal128/decimal128-5.json
272
- - spec/spec_tests/data/decimal128/decimal128-4.json
273
- - spec/spec_tests/data/decimal128/decimal128-2.json
274
- - spec/spec_tests/data/decimal128/decimal128-6.json
275
- - spec/spec_tests/data/decimal128/decimal128-1.json
264
+ - spec/spec_tests/data/corpus/code.json
265
+ - spec/spec_tests/data/corpus/code_w_scope.json
266
+ - spec/spec_tests/data/corpus/int64.json
267
+ - spec/spec_tests/data/corpus/datetime.json
268
+ - spec/spec_tests/data/corpus_legacy/top.json
276
269
  - spec/spec_tests/data/corpus_legacy/array.json
270
+ - spec/spec_tests/data/corpus_legacy/null.json
277
271
  - spec/spec_tests/data/corpus_legacy/document.json
272
+ - spec/spec_tests/data/corpus_legacy/boolean.json
278
273
  - spec/spec_tests/data/corpus_legacy/maxkey.json
279
- - spec/spec_tests/data/corpus_legacy/code.json
280
- - spec/spec_tests/data/corpus_legacy/int32.json
281
- - spec/spec_tests/data/corpus_legacy/double.json
282
- - spec/spec_tests/data/corpus_legacy/code_w_scope.json
283
274
  - spec/spec_tests/data/corpus_legacy/binary.json
275
+ - spec/spec_tests/data/corpus_legacy/timestamp.json
284
276
  - spec/spec_tests/data/corpus_legacy/oid.json
285
- - spec/spec_tests/data/corpus_legacy/null.json
286
277
  - spec/spec_tests/data/corpus_legacy/regex.json
287
278
  - spec/spec_tests/data/corpus_legacy/minkey.json
288
- - spec/spec_tests/data/corpus_legacy/top.json
289
279
  - spec/spec_tests/data/corpus_legacy/undefined.json
280
+ - spec/spec_tests/data/corpus_legacy/double.json
281
+ - spec/spec_tests/data/corpus_legacy/int32.json
290
282
  - spec/spec_tests/data/corpus_legacy/string.json
291
- - spec/spec_tests/data/corpus_legacy/boolean.json
292
- - spec/spec_tests/data/corpus_legacy/timestamp.json
283
+ - spec/spec_tests/data/corpus_legacy/code.json
284
+ - spec/spec_tests/data/corpus_legacy/code_w_scope.json
293
285
  - spec/spec_tests/data/corpus_legacy/failures/dbpointer.json
294
- - spec/spec_tests/data/corpus_legacy/failures/int64.json
295
286
  - spec/spec_tests/data/corpus_legacy/failures/symbol.json
287
+ - spec/spec_tests/data/corpus_legacy/failures/int64.json
296
288
  - spec/spec_tests/data/corpus_legacy/failures/datetime.json
297
- - spec/runners/corpus.rb
298
- - spec/runners/corpus_legacy.rb
299
- - spec/runners/common_driver.rb
300
- - spec/support/spec_config.rb
301
- - spec/support/shared_examples.rb
289
+ - spec/spec_tests/data/decimal128/decimal128-7.json
290
+ - spec/spec_tests/data/decimal128/decimal128-2.json
291
+ - spec/spec_tests/data/decimal128/decimal128-6.json
292
+ - spec/spec_tests/data/decimal128/decimal128-1.json
293
+ - spec/spec_tests/data/decimal128/decimal128-4.json
294
+ - spec/spec_tests/data/decimal128/decimal128-3.json
295
+ - spec/spec_tests/data/decimal128/decimal128-5.json
302
296
  - spec/support/utils.rb
303
- - spec/bson/ext_json_parse_spec.rb
304
- - spec/bson/object_spec.rb
305
- - spec/bson/json_spec.rb
306
- - spec/bson/true_class_spec.rb
297
+ - spec/support/shared_examples.rb
298
+ - spec/support/spec_config.rb
299
+ - spec/runners/common_driver.rb
300
+ - spec/runners/corpus_legacy.rb
301
+ - spec/runners/corpus.rb
302
+ - spec/bson/code_spec.rb
307
303
  - spec/bson/byte_buffer_read_spec.rb
308
- - spec/bson/config_spec.rb
309
304
  - spec/bson/int32_spec.rb
310
- - spec/bson/regexp_spec.rb
311
- - spec/bson/symbol_raw_spec.rb
312
- - spec/bson/open_struct_spec.rb
305
+ - spec/bson/max_key_spec.rb
306
+ - spec/bson/time_spec.rb
307
+ - spec/bson/array_spec.rb
308
+ - spec/bson/date_time_spec.rb
313
309
  - spec/bson/document_spec.rb
314
- - spec/bson/min_key_spec.rb
310
+ - spec/bson/float_spec.rb
311
+ - spec/bson/nil_class_spec.rb
312
+ - spec/bson/time_with_zone_spec.rb
313
+ - spec/bson/ext_json_parse_spec.rb
314
+ - spec/bson/string_spec.rb
315
+ - spec/bson/open_struct_spec.rb
316
+ - spec/bson/config_spec.rb
315
317
  - spec/bson/false_class_spec.rb
316
- - spec/bson/code_spec.rb
317
- - spec/bson/symbol_spec.rb
318
- - spec/bson/object_id_spec.rb
318
+ - spec/bson/raw_spec.rb
319
+ - spec/bson/regexp_spec.rb
320
+ - spec/bson/binary_spec.rb
321
+ - spec/bson/object_spec.rb
319
322
  - spec/bson/decimal128_spec.rb
320
- - spec/bson/registry_spec.rb
321
- - spec/bson/time_spec.rb
323
+ - spec/bson/binary_uuid_spec.rb
322
324
  - spec/bson/boolean_spec.rb
323
325
  - spec/bson/byte_buffer_spec.rb
324
- - spec/bson/hash_spec.rb
326
+ - spec/bson/json_spec.rb
327
+ - spec/bson/symbol_spec.rb
328
+ - spec/bson/integer_spec.rb
329
+ - spec/bson/byte_buffer_write_spec.rb
330
+ - spec/bson/registry_spec.rb
331
+ - spec/bson/code_with_scope_spec.rb
332
+ - spec/bson/true_class_spec.rb
325
333
  - spec/bson/undefined_spec.rb
326
- - spec/bson/raw_spec.rb
327
- - spec/bson/string_spec.rb
334
+ - spec/bson/object_id_spec.rb
328
335
  - spec/bson/timestamp_spec.rb
329
- - spec/bson/date_time_spec.rb
330
- - spec/bson/max_key_spec.rb
336
+ - spec/bson/hash_spec.rb
337
+ - spec/bson/symbol_raw_spec.rb
338
+ - spec/bson/min_key_spec.rb
331
339
  - spec/bson/int64_spec.rb
332
- - spec/bson/byte_buffer_write_spec.rb
333
340
  - spec/bson/date_spec.rb
334
- - spec/bson/binary_spec.rb
335
- - spec/bson/code_with_scope_spec.rb
336
- - spec/bson/integer_spec.rb
337
- - spec/bson/binary_uuid_spec.rb
338
- - spec/bson/nil_class_spec.rb
339
- - spec/bson/array_spec.rb
340
- - spec/bson/time_with_zone_spec.rb
341
- - spec/bson/float_spec.rb
metadata.gz.sig CHANGED
Binary file
Binary file