bson 4.10.0 → 4.12.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a62c9c51fa6fafda7b1e9a084a118fd34e25804fd97ffd504f8d00690d2eb9f0
4
- data.tar.gz: 219e45cccac4d1d1b7f7dfad0e6f386538678d632cc9937b9f0f6c06f57e4118
3
+ metadata.gz: 18f69f1d0f65a2c4883500061a6637f6fb314e7758a15cda3941432a7e6fbd0a
4
+ data.tar.gz: b26789d1b2da697b6113897040ecd297d88367267fd28411609f23229ec8be2e
5
5
  SHA512:
6
- metadata.gz: 40cab24a15e3430250426e270e99700ab2527d417ac9a248976afc1e1cee5deb9bd1b7dc07112d1d772cb4e65387a3c6fab00943bc55b9d426bc29fee39aba9e
7
- data.tar.gz: 349f013a08fc84afea777262e88f8813586621f4dc4273ebf122fd347d574dc8dee8b102ba901085b373b3479b1172c3c596a8dd3e5086e05d19b109845f6168
6
+ metadata.gz: 7f90cd2d60cb0904d80ec6a3d75ba7d88af3872b5b1fdd27f9a283026f7c27ffbe84ad5331e571ebe120c7cd8c94d06190da8f1dc9fc783c349667f0ee963de1
7
+ data.tar.gz: da4c4edb81e99a804789c3914555376db3510a65437cc7b80829ae1f38f3c0f5a45894c8b4d8b24127367d0a9d1f46c9094a7b4f0f18633dbd4c4a8890675b02
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/ext/bson/init.c CHANGED
@@ -56,6 +56,16 @@ void Init_bson_native()
56
56
 
57
57
  rb_define_alloc_func(rb_byte_buffer_class, rb_bson_byte_buffer_allocate);
58
58
  rb_define_method(rb_byte_buffer_class, "initialize", rb_bson_byte_buffer_initialize, -1);
59
+
60
+ /*
61
+ * call-seq:
62
+ * buffer.length -> Fixnum
63
+ *
64
+ * Returns the number of bytes available to be read in the buffer.
65
+ *
66
+ * When a buffer is being written to, each added byte increases its length.
67
+ * When a buffer is being read from, each read byte decreases its length.
68
+ */
59
69
  rb_define_method(rb_byte_buffer_class, "length", rb_bson_byte_buffer_length, 0);
60
70
 
61
71
  /*
@@ -266,7 +276,7 @@ void Init_bson_native()
266
276
 
267
277
  /*
268
278
  * call-seq:
269
- * buffer.put_hash(hash) -> ByteBuffer
279
+ * buffer.put_hash(hash, validating_keys) -> ByteBuffer
270
280
  *
271
281
  * Writes a Hash into the byte buffer.
272
282
  *
@@ -319,6 +329,10 @@ void Init_bson_native()
319
329
  *
320
330
  * Returns the contents of the buffer as a binary string.
321
331
  *
332
+ * If the buffer is used for reading, the returned contents is the data
333
+ * that was not yet read. If the buffer is used for writing, the returned
334
+ * contents is the complete data that has been written so far.
335
+ *
322
336
  * Note: this method copies the buffer's contents into a newly allocated
323
337
  * +String+ instance. It does not return a reference to the data stored in
324
338
  * the buffer itself.
data/ext/bson/read.c CHANGED
@@ -42,12 +42,12 @@ void pvt_raise_decode_error(volatile VALUE msg) {
42
42
  int32_t pvt_validate_length(byte_buffer_t *b)
43
43
  {
44
44
  int32_t length;
45
-
45
+
46
46
  ENSURE_BSON_READ(b, 4);
47
47
  memcpy(&length, READ_PTR(b), 4);
48
48
  length = BSON_UINT32_TO_LE(length);
49
49
 
50
- /* minimum valid length is 4 (byte count) + 1 (terminating byte) */
50
+ /* minimum valid length is 4 (byte count) + 1 (terminating byte) */
51
51
  if(length >= 5){
52
52
  ENSURE_BSON_READ(b, length);
53
53
 
@@ -60,7 +60,7 @@ int32_t pvt_validate_length(byte_buffer_t *b)
60
60
  else{
61
61
  rb_raise(rb_eRangeError, "Buffer contained invalid length %d at %zu", length, b->read_position);
62
62
  }
63
-
63
+
64
64
  return length;
65
65
  }
66
66
 
@@ -176,13 +176,13 @@ VALUE pvt_get_string(byte_buffer_t *b, const char *data_type)
176
176
  }
177
177
  ENSURE_BSON_READ(b, 4 + length);
178
178
  str_ptr = READ_PTR(b) + 4;
179
- last_byte = *(READ_PTR(b) + 4 + length_le - 1);
179
+ last_byte = *(READ_PTR(b) + 4 + length - 1);
180
180
  if (last_byte != 0) {
181
181
  pvt_raise_decode_error(rb_sprintf("Last byte of the string is not null: 0x%x", (int) last_byte));
182
182
  }
183
183
  rb_bson_utf8_validate(str_ptr, length - 1, true, data_type);
184
184
  string = rb_enc_str_new(str_ptr, length - 1, rb_utf8_encoding());
185
- b->read_position += 4 + length_le;
185
+ b->read_position += 4 + length;
186
186
  return string;
187
187
  }
188
188
 
@@ -206,7 +206,7 @@ VALUE pvt_get_symbol(byte_buffer_t *b, VALUE rb_buffer, int argc, VALUE *argv)
206
206
  klass = rb_funcall(rb_bson_registry, rb_intern("get"), 1, INT2FIX(BSON_TYPE_SYMBOL));
207
207
  value = rb_funcall(klass, rb_intern("from_bson"), 1, rb_buffer);
208
208
  }
209
-
209
+
210
210
  RB_GC_GUARD(klass);
211
211
  return value;
212
212
  }
@@ -307,7 +307,7 @@ VALUE pvt_get_int64(byte_buffer_t *b, int argc, VALUE *argv)
307
307
  memcpy(&i64, READ_PTR(b), 8);
308
308
  b->read_position += 8;
309
309
  num = LL2NUM(BSON_UINT64_FROM_LE(i64));
310
-
310
+
311
311
  if (pvt_get_mode_option(argc, argv) == BSON_MODE_BSON) {
312
312
  VALUE klass = rb_funcall(rb_bson_registry,rb_intern("get"),1, INT2FIX(BSON_TYPE_INT64));
313
313
  VALUE value = rb_funcall(klass, rb_intern("new"), 1, num);
@@ -316,7 +316,7 @@ VALUE pvt_get_int64(byte_buffer_t *b, int argc, VALUE *argv)
316
316
  } else {
317
317
  return num;
318
318
  }
319
-
319
+
320
320
  RB_GC_GUARD(num);
321
321
  }
322
322
 
@@ -376,11 +376,11 @@ VALUE rb_bson_byte_buffer_get_hash(int argc, VALUE *argv, VALUE self){
376
376
  rb_hash_aset(doc, field, pvt_read_field(b, self, type, argc, argv));
377
377
  RB_GC_GUARD(field);
378
378
  }
379
-
379
+
380
380
  if (READ_PTR(b) - start_ptr != length) {
381
381
  pvt_raise_decode_error(rb_sprintf("Expected to read %d bytes for the hash but read %ld bytes", length, READ_PTR(b) - start_ptr));
382
382
  }
383
-
383
+
384
384
  return doc;
385
385
  }
386
386
 
@@ -402,10 +402,10 @@ VALUE rb_bson_byte_buffer_get_array(int argc, VALUE *argv, VALUE self){
402
402
  rb_ary_push(array, pvt_read_field(b, self, type, argc, argv));
403
403
  }
404
404
  RB_GC_GUARD(array);
405
-
405
+
406
406
  if (READ_PTR(b) - start_ptr != length) {
407
407
  pvt_raise_decode_error(rb_sprintf("Expected to read %d bytes for the hash but read %ld bytes", length, READ_PTR(b) - start_ptr));
408
408
  }
409
-
409
+
410
410
  return array;
411
411
  }
data/lib/bson/binary.rb CHANGED
@@ -207,7 +207,8 @@ module BSON
207
207
  if representation && representation != :standard
208
208
  raise ArgumentError, "Binary of type :uuid can only be stringified to :standard representation, requested: #{representation.inspect}"
209
209
  end
210
- data.split('').map { |n| '%02x' % n.ord }.join.sub(/(.{8})(.{4})(.{4})(.{12})/, '\1-\2-\3-\4')
210
+
211
+ data.split('').map { |n| '%02x' % n.ord }.join.sub(/\A(.{8})(.{4})(.{4})(.{4})(.{12})\z/, '\1-\2-\3-\4-\5')
211
212
  when :uuid_old
212
213
  if representation.nil?
213
214
  raise ArgumentError, 'Representation must be specified for BSON::Binary objects of type :uuid_old'
@@ -229,7 +230,7 @@ module BSON
229
230
  hex
230
231
  else
231
232
  raise ArgumentError, "Invalid representation: #{representation}"
232
- end.sub(/(.{8})(.{4})(.{4})(.{12})/, '\1-\2-\3-\4')
233
+ end.sub(/\A(.{8})(.{4})(.{4})(.{4})(.{12})\z/, '\1-\2-\3-\4-\5')
233
234
  else
234
235
  raise TypeError, "The type of Binary must be :uuid or :uuid_old, this object is: #{type.inspect}"
235
236
  end
data/lib/bson/document.rb CHANGED
@@ -269,27 +269,56 @@ module BSON
269
269
  end
270
270
  end
271
271
 
272
- if instance_methods.include?(:slice)
273
- # Slices a document to include only the given keys.
274
- # Will normalize symbol keys into strings.
275
- # (this method is backported from ActiveSupport::Hash)
276
- #
277
- # @example Get a document/hash with only the `name` and `age` fields present
278
- # document # => { _id: <ObjectId>, :name => 'John', :age => 30, :location => 'Earth' }
279
- # document.slice(:name, 'age') # => { name: 'John', age: 30 }
280
- # document.slice('name') # => { name: 'John' }
281
- # document.slice(:foo) # => nil
282
- #
283
- # @param [ Array<String, Symbol> ] *keys Keys, that will be kept in the resulting document
284
- #
285
- # @return [ BSON::Document ] The document with only the selected keys
286
- #
287
- # @since 4.3.1
288
- def slice(*keys)
289
- super(*keys.map{|key| convert_key(key)})
272
+ # Slices a document to include only the given keys.
273
+ # Will normalize symbol keys into strings.
274
+ # (this method is backported from ActiveSupport::Hash)
275
+ #
276
+ # @example Get a document/hash with only the `name` and `age` fields present
277
+ # document # => { _id: <ObjectId>, :name => "John", :age => 30, :location => "Earth" }
278
+ # document.slice(:name, 'age') # => { "name": "John", "age" => 30 }
279
+ # document.slice('name') # => { "name" => "John" }
280
+ # document.slice(:foo) # => {}
281
+ #
282
+ # @param [ Array<String, Symbol> ] *keys Keys, that will be kept in the resulting document
283
+ #
284
+ # @return [ BSON::Document ] The document with only the selected keys
285
+ #
286
+ # @since 4.3.1
287
+ def slice(*keys)
288
+ keys.each_with_object(self.class.new) do |key, hash|
289
+ if key?(key)
290
+ hash[key] = self[key]
291
+ end
290
292
  end
291
293
  end
292
294
 
295
+ # Returns a new document consisting of the current document minus the
296
+ # specified keys.
297
+ #
298
+ # The keys to be removed can be specified as either strings or symbols.
299
+ #
300
+ # @example Get a document/hash with only the `name` and `age` fields removed
301
+ # document # => { _id: <ObjectId>, :name => 'John', :age => 30, :location => 'Earth' }
302
+ # document.except(:name, 'age') # => { _id: <ObjectId>, location: 'Earth' }
303
+ #
304
+ # @param [ Array<String, Symbol> ] *keys Keys, that will be removed in the resulting document
305
+ #
306
+ # @return [ BSON::Document ] The document with the specified keys removed.
307
+ #
308
+ # @note This method is always defined, even if Hash already contains a
309
+ # definition of #except, because ActiveSupport unconditionally defines
310
+ # its version of #except which doesn't work for BSON::Document which
311
+ # causes problems if ActiveSupport is loaded after bson-ruby is.
312
+ def except(*keys)
313
+ copy = dup
314
+ keys.each {|key| copy.delete(key)}
315
+ copy
316
+ end
317
+
318
+ def symbolize_keys!
319
+ raise ArgumentError, 'symbolize_keys! is not supported on BSON::Document instances. Please convert the document to hash first (using #to_h), then call #symbolize_keys! on the Hash instance'
320
+ end
321
+
293
322
  private
294
323
 
295
324
  def convert_key(key)
data/lib/bson/ext_json.rb CHANGED
@@ -219,6 +219,14 @@ module BSON
219
219
  raise Error::ExtJSONParseError, "Invalid subType value in $binary: #{value}"
220
220
  end
221
221
  create_binary(encoded_value, subtype)
222
+
223
+ when '$uuid'
224
+ unless /\A[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\z/.match(value)
225
+ raise Error::ExtJSONParseError, "Invalid $uuid value: #{value}"
226
+ end
227
+
228
+ return Binary.from_uuid(value)
229
+
222
230
  when '$code'
223
231
  unless value.is_a?(String)
224
232
  raise Error::ExtJSONParseError, "Invalid $code value: #{value}"
data/lib/bson/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module BSON
16
- VERSION = "4.10.0".freeze
16
+ VERSION = "4.12.1".freeze
17
17
  end
@@ -255,7 +255,7 @@ describe BSON::Binary do
255
255
  let(:obj) { described_class.new("\x00" * 16, :uuid) }
256
256
 
257
257
  it 'accepts symbol representation' do
258
- expect(obj.to_uuid(:standard)).to eq('00000000-0000-0000-0000000000000000')
258
+ expect(obj.to_uuid(:standard)).to eq('00000000-0000-0000-0000-000000000000')
259
259
  end
260
260
 
261
261
  it 'rejects string representation' do
@@ -136,6 +136,10 @@ describe "BSON::Binary - UUID spec tests" do
136
136
  it 'decodes as python legacy' do
137
137
  expect(binary.to_uuid(:python_legacy).gsub('-', '').upcase).not_to eq("00112233445566778899AABBCCDDEEFF")
138
138
  end
139
+
140
+ it 'expects four dashes when output as String' do
141
+ expect(binary.to_uuid(:csharp_legacy)).to eq("00112233-4455-6677-8899-aabbccddeeff")
142
+ end
139
143
  end
140
144
 
141
145
  context ':uuid_old, java legacy encoded' do
@@ -154,6 +158,10 @@ describe "BSON::Binary - UUID spec tests" do
154
158
  it 'decodes as python legacy' do
155
159
  expect(binary.to_uuid(:python_legacy).gsub('-', '').upcase).not_to eq("00112233445566778899AABBCCDDEEFF")
156
160
  end
161
+
162
+ it 'expects four dashes when output as String' do
163
+ expect(binary.to_uuid(:java_legacy)).to eq("00112233-4455-6677-8899-aabbccddeeff")
164
+ end
157
165
  end
158
166
 
159
167
  context ':uuid_old, python legacy encoded' do
@@ -172,6 +180,10 @@ describe "BSON::Binary - UUID spec tests" do
172
180
  it 'decodes as python legacy' do
173
181
  expect(binary.to_uuid(:python_legacy).gsub('-', '').upcase).to eq("00112233445566778899AABBCCDDEEFF")
174
182
  end
183
+
184
+ it 'expects four dashes when output as String' do
185
+ expect(binary.to_uuid(:python_legacy)).to eq("00112233-4455-6677-8899-aabbccddeeff")
186
+ end
175
187
  end
176
188
  end
177
189
  end
@@ -30,8 +30,8 @@ describe BSON::ByteBuffer do
30
30
  let(:buffer) do
31
31
  described_class.new
32
32
  end
33
-
34
- context '#put_int32' do
33
+
34
+ context '#put_int32' do
35
35
  before do
36
36
  buffer.put_int32(5)
37
37
  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
@@ -107,4 +150,81 @@ describe BSON::ByteBuffer do
107
150
  expect(buffer.write_position).to eq(1)
108
151
  end
109
152
  end
153
+
154
+ describe 'write followed by read' do
155
+ let(:buffer) do
156
+ described_class.new
157
+ end
158
+
159
+ context 'one cycle' do
160
+ it 'returns the written data' do
161
+ buffer.put_cstring('hello')
162
+ buffer.get_cstring.should == 'hello'
163
+ end
164
+ end
165
+
166
+ context 'two cycles' do
167
+ it 'returns the written data' do
168
+ buffer.put_cstring('hello')
169
+ buffer.get_cstring.should == 'hello'
170
+
171
+ buffer.put_cstring('world')
172
+ buffer.get_cstring.should == 'world'
173
+ end
174
+ end
175
+
176
+ context 'mixed cycles' do
177
+ it 'returns the written data' do
178
+ if BSON::Environment.jruby?
179
+ pending 'RUBY-2334'
180
+ end
181
+
182
+ buffer.put_int32(1)
183
+ buffer.put_int32(2)
184
+
185
+ buffer.get_int32.should == 1
186
+
187
+ buffer.put_int32(3)
188
+
189
+ buffer.get_int32.should == 2
190
+ buffer.get_int32.should == 3
191
+ end
192
+ end
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
110
230
  end
@@ -0,0 +1,46 @@
1
+ # Copyright (C) 2021 MongoDB Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "spec_helper"
16
+
17
+ # BSON::Document ActiveSupport extensions
18
+ describe BSON::Document do
19
+ require_active_support
20
+
21
+ describe '#symbolize_keys' do
22
+ context 'string keys' do
23
+ let(:doc) do
24
+ described_class.new('foo' => 'bar')
25
+ end
26
+
27
+ it 'works correctly' do
28
+ doc.symbolize_keys.should == {foo: 'bar'}
29
+ end
30
+ end
31
+ end
32
+
33
+ describe '#symbolize_keys!' do
34
+ context 'string keys' do
35
+ let(:doc) do
36
+ described_class.new('foo' => 'bar')
37
+ end
38
+
39
+ it 'raises ArgumentError' do
40
+ lambda do
41
+ doc.symbolize_keys!
42
+ end.should raise_error(ArgumentError, /symbolize_keys! is not supported on BSON::Document instances/)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -215,6 +215,10 @@ describe BSON::Document do
215
215
 
216
216
  context "when provided string keys" do
217
217
 
218
+ it "is a BSON Document" do
219
+ expect(document.slice("key1")).to be_a(BSON::Document)
220
+ end
221
+
218
222
  it "returns the partial document" do
219
223
  expect(document.slice("key1")).to contain_exactly(['key1', 'value1'])
220
224
  end
@@ -222,13 +226,45 @@ describe BSON::Document do
222
226
 
223
227
  context "when provided symbol keys" do
224
228
 
229
+ it "is a BSON Document" do
230
+ expect(document.slice(:key1)).to be_a(BSON::Document)
231
+ end
232
+
225
233
  it "returns the partial document" do
226
234
  expect(document.slice(:key1)).to contain_exactly(['key1', 'value1'])
227
235
  end
228
236
  end
237
+
238
+ context "when provided keys that do not exist in the document" do
239
+
240
+ it "returns only the keys that exist in the document" do
241
+ expect(document.slice(:key1, :key3)).to contain_exactly(['key1', 'value1'])
242
+ end
243
+ end
229
244
  end
230
245
  end
231
246
 
247
+ describe "#except" do
248
+ let(:document) do
249
+ described_class.new("key1" => "value1", key2: "value2")
250
+ end
251
+
252
+ context "when provided string keys" do
253
+
254
+ it "returns the partial document" do
255
+ expect(document.except("key1")).to contain_exactly(['key2', 'value2'])
256
+ end
257
+ end
258
+
259
+ context "when provided symbol keys" do
260
+
261
+ it "returns the partial document" do
262
+ expect(document.except(:key1)).to contain_exactly(['key2', 'value2'])
263
+ end
264
+ end
265
+ end
266
+
267
+
232
268
  describe "#delete" do
233
269
 
234
270
  shared_examples_for "a document with deletable pairs" do
@@ -0,0 +1,57 @@
1
+ # Copyright (C) 2021 MongoDB Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "spec_helper"
16
+
17
+ describe 'Hash ActiveSupport extensions' do
18
+ require_active_support
19
+
20
+ describe '#symbolize_keys' do
21
+ let(:symbolized) { hash.symbolize_keys }
22
+
23
+ shared_examples 'works correctly' do
24
+ it 'returns a hash' do
25
+ symbolized.class.should be Hash
26
+ end
27
+
28
+ it 'works correctly' do
29
+ hash.symbolize_keys.should == {foo: 'bar'}
30
+ end
31
+ end
32
+
33
+ context 'string keys' do
34
+ let(:hash) do
35
+ {'foo' => 'bar'}
36
+ end
37
+
38
+ include_examples 'works correctly'
39
+ end
40
+
41
+ context 'symbol keys' do
42
+ let(:hash) do
43
+ {foo: 'bar'}
44
+ end
45
+
46
+ include_examples 'works correctly'
47
+ end
48
+
49
+ context 'both string and symbol keys' do
50
+ let(:hash) do
51
+ {'foo' => 42, foo: 'bar'}
52
+ end
53
+
54
+ include_examples 'works correctly'
55
+ end
56
+ end
57
+ end
@@ -244,6 +244,16 @@ describe Hash do
244
244
  /(Hash value for key 'foo'|Value) does not define its BSON serialized type:.*HashSpecUnserializableClass/)
245
245
  end
246
246
  end
247
+
248
+ context 'when reading from a byte buffer that was previously written to' do
249
+ let(:buffer) do
250
+ {foo: 42}.to_bson
251
+ end
252
+
253
+ it 'returns the original hash' do
254
+ expect(Hash.from_bson(buffer)).to eq('foo' => 42)
255
+ end
256
+ end
247
257
  end
248
258
 
249
259
  describe '#to_bson' do
@@ -310,4 +320,50 @@ describe Hash do
310
320
  end
311
321
  end
312
322
  end
323
+
324
+ describe '#from_bson' do
325
+ context 'when bson document has duplicate keys' do
326
+ let(:buf) do
327
+ buf = BSON::ByteBuffer.new
328
+ buf.put_int32(37)
329
+ buf.put_byte("\x02")
330
+ buf.put_cstring('foo')
331
+ buf.put_string('bar')
332
+ buf.put_byte("\x02")
333
+ buf.put_cstring('foo')
334
+ buf.put_string('overwrite')
335
+ buf.put_byte("\x00")
336
+
337
+ BSON::ByteBuffer.new(buf.to_s)
338
+ end
339
+
340
+ let(:doc) { Hash.from_bson(buf) }
341
+
342
+ it 'overwrites first value with second value' do
343
+ doc.should == {'foo' => 'overwrite'}
344
+ end
345
+ end
346
+
347
+ context 'when bson document has string and symbol keys of the same name' do
348
+ let(:buf) do
349
+ buf = BSON::ByteBuffer.new
350
+ buf.put_int32(31)
351
+ buf.put_byte("\x02")
352
+ buf.put_cstring('foo')
353
+ buf.put_string('bar')
354
+ buf.put_byte("\x0e")
355
+ buf.put_cstring('foo')
356
+ buf.put_string('bar')
357
+ buf.put_byte("\x00")
358
+
359
+ BSON::ByteBuffer.new(buf.to_s)
360
+ end
361
+
362
+ let(:doc) { Hash.from_bson(buf) }
363
+
364
+ it 'overwrites first value with second value' do
365
+ doc.should == {'foo' => :bar}
366
+ end
367
+ end
368
+ end
313
369
  end
data/spec/spec_helper.rb CHANGED
@@ -17,6 +17,7 @@ DRIVER_COMMON_BSON_TESTS = Dir.glob("#{CURRENT_PATH}/spec_tests/data/decimal128/
17
17
  BSON_CORPUS_TESTS = Dir.glob("#{CURRENT_PATH}/spec_tests/data/corpus/*.json").sort
18
18
  BSON_CORPUS_LEGACY_TESTS = Dir.glob("#{CURRENT_PATH}/spec_tests/data/corpus_legacy/*.json").sort
19
19
 
20
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "shared", "lib"))
20
21
  $LOAD_PATH.unshift(File.dirname(__FILE__))
21
22
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
22
23
 
@@ -40,6 +41,8 @@ unless ENV['CI'] || BSON::Environment.jruby?
40
41
  end
41
42
  end
42
43
 
44
+ require 'mrss/lite_constraints'
45
+
43
46
  Dir["./spec/support/**/*.rb"].each { |file| require file }
44
47
 
45
48
  # Alternate IO class that returns a String from #readbyte.
@@ -71,4 +74,6 @@ RSpec.configure do |config|
71
74
  end
72
75
  end
73
76
  end
77
+
78
+ config.extend Mrss::LiteConstraints
74
79
  end
@@ -39,6 +39,12 @@
39
39
  "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400",
40
40
  "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}"
41
41
  },
42
+ {
43
+ "description": "subtype 0x04 UUID",
44
+ "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400",
45
+ "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}",
46
+ "degenerate_extjson": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}"
47
+ },
42
48
  {
43
49
  "description": "subtype 0x05",
44
50
  "canonical_bson": "1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400",
@@ -81,5 +87,27 @@
81
87
  "description": "subtype 0x02 length negative one",
82
88
  "bson": "130000000578000600000002FFFFFFFFFFFF00"
83
89
  }
90
+ ],
91
+ "parseErrors": [
92
+ {
93
+ "description": "$uuid wrong type",
94
+ "string": "{\"x\" : { \"$uuid\" : { \"data\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}}"
95
+ },
96
+ {
97
+ "description": "$uuid invalid value--too short",
98
+ "string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-90e8-e7d1dfc035d4\"}}"
99
+ },
100
+ {
101
+ "description": "$uuid invalid value--too long",
102
+ "string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4-789e4\"}}"
103
+ },
104
+ {
105
+ "description": "$uuid invalid value--misplaced hyphens",
106
+ "string": "{\"x\" : { \"$uuid\" : \"73ff-d26444b-34c6-990e8e-7d1dfc035d4\"}}"
107
+ },
108
+ {
109
+ "description": "$uuid invalid value--too many hyphens",
110
+ "string": "{\"x\" : { \"$uuid\" : \"----d264-44b3-4--9-90e8-e7d1dfc0----\"}}"
111
+ }
84
112
  ]
85
113
  }
@@ -6,7 +6,8 @@ class SpecConfig
6
6
  COMPACTION_CHANCE = 0.001
7
7
 
8
8
  def active_support?
9
- %w(1 true yes).include?(ENV['WITH_ACTIVE_SUPPORT'])
9
+ %w(1 true yes).include?(ENV['WITH_ACTIVE_SUPPORT']) ||
10
+ ENV['WITH_ACTIVE_SUPPORT'] =~ /[0-9]/ && ENV['WITH_ACTIVE_SUPPORT'] != '0'
10
11
  end
11
12
 
12
13
  def compact?
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.10.0
4
+ version: 4.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Brock
@@ -15,8 +15,8 @@ cert_chain:
15
15
  - |
16
16
  -----BEGIN CERTIFICATE-----
17
17
  MIIDRDCCAiygAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtkcml2
18
- ZXItcnVieS9EQz0xMGdlbi9EQz1jb20wHhcNMjAwMTIzMTkzNjAxWhcNMjEwMTIy
19
- MTkzNjAxWjAmMSQwIgYDVQQDDBtkcml2ZXItcnVieS9EQz0xMGdlbi9EQz1jb20w
18
+ ZXItcnVieS9EQz0xMGdlbi9EQz1jb20wHhcNMjEwMjA5MTQxOTU3WhcNMjIwMjA5
19
+ MTQxOTU3WjAmMSQwIgYDVQQDDBtkcml2ZXItcnVieS9EQz0xMGdlbi9EQz1jb20w
20
20
  ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDRXUgGvH0ZtWwDPc2umdHw
21
21
  B+INNm6jNTRp8PMyUKxPzxaxX2OiBQk9gLC3zsK9ZmlZu4lNfpHVSCEPoiP/fhPg
22
22
  Kyfq2xld3Qz0Pki5d5i0/r14343MTKiNiFulLlbbdlN0cXeEFNJHUycZnD2LOXwz
@@ -26,14 +26,14 @@ cert_chain:
26
26
  AgMBAAGjfTB7MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBRbd1mx
27
27
  fvSaVIwKI+tnEAYDW/B81zAgBgNVHREEGTAXgRVkcml2ZXItcnVieUAxMGdlbi5j
28
28
  b20wIAYDVR0SBBkwF4EVZHJpdmVyLXJ1YnlAMTBnZW4uY29tMA0GCSqGSIb3DQEB
29
- CwUAA4IBAQBfX4dwxG5PhtxES/LDEOaZIZXyaX6CKe367zhW+HxWbSOXMQJFkIQj
30
- m7tzT+sDFJXyiOv5cPtfpUam5pTiryzRw5HD6oxlPIt5vO15EJ69v++3m7shMLbw
31
- amZOajKXmu2ZGZfhOtj7bOTwmOj1AnWLKeOQIR3STvvfZCD+6dt1XenW7CdjCsxE
32
- ifervPjLFqFPsMOgaxikhgPK6bRtszrQhJSYlifKKzxbX1hYAsmGL7IxjubFSV5r
33
- gpvfPNWMwyBDlHaNS3GfO6cRRxBOvEG05GUCsvtTY4Bpe8yjE64wg1ymb47LMOnv
34
- Qb1lGORmf/opg45mluKUYl7pQNZHD0d3
29
+ CwUAA4IBAQCYGRgQbtk+g+Nuwg15p8jb+8bJlwHFHkb8rkLn00OPXLk3uBhImOKZ
30
+ mhwwr/8ZBkeE/PBDxkQjeua+NpqSaPr1lvXQaGpHxJzpR/BmSteeoF49jBu0dHaz
31
+ MRghinst6ROS1qVRae0z+wkbnufpH/NxdCUufb639nAlZguT2rGqvM6VZCC8eSO9
32
+ KfJA7/MEE+qQtiQgJaAUVRaGC8fLtmS555BPjNVITJs+BcGDYWh2clWuqlzjHOp3
33
+ YoFhlyUEi7VLlqNH0H/JFttVZK6+qmLelkVNcIYVLeWOB4Lf4VxEiYGEK1ORxsrY
34
+ iyYKJJALWY1FAInGRIlvkN+B8o3yIhq1
35
35
  -----END CERTIFICATE-----
36
- date: 2020-07-17 00:00:00.000000000 Z
36
+ date: 2021-05-28 00:00:00.000000000 Z
37
37
  dependencies: []
38
38
  description: A fully featured BSON specification implementation in Ruby
39
39
  email:
@@ -112,10 +112,12 @@ files:
112
112
  - spec/bson/date_spec.rb
113
113
  - spec/bson/date_time_spec.rb
114
114
  - spec/bson/decimal128_spec.rb
115
+ - spec/bson/document_as_spec.rb
115
116
  - spec/bson/document_spec.rb
116
117
  - spec/bson/ext_json_parse_spec.rb
117
118
  - spec/bson/false_class_spec.rb
118
119
  - spec/bson/float_spec.rb
120
+ - spec/bson/hash_as_spec.rb
119
121
  - spec/bson/hash_spec.rb
120
122
  - spec/bson/int32_spec.rb
121
123
  - spec/bson/int64_spec.rb
@@ -239,113 +241,115 @@ signing_key:
239
241
  specification_version: 4
240
242
  summary: Ruby implementation of the BSON specification
241
243
  test_files:
244
+ - spec/bson/true_class_spec.rb
245
+ - spec/bson/false_class_spec.rb
246
+ - spec/bson/object_spec.rb
247
+ - spec/bson/json_spec.rb
248
+ - spec/bson/undefined_spec.rb
249
+ - spec/bson/time_with_zone_spec.rb
250
+ - spec/bson/max_key_spec.rb
251
+ - spec/bson/float_spec.rb
252
+ - spec/bson/int32_spec.rb
253
+ - spec/bson/boolean_spec.rb
254
+ - spec/bson/int64_spec.rb
255
+ - spec/bson/min_key_spec.rb
256
+ - spec/bson/date_time_spec.rb
257
+ - spec/bson/date_spec.rb
258
+ - spec/bson/registry_spec.rb
259
+ - spec/bson/hash_as_spec.rb
260
+ - spec/bson/regexp_spec.rb
261
+ - spec/bson/timestamp_spec.rb
262
+ - spec/bson/decimal128_spec.rb
263
+ - spec/bson/binary_uuid_spec.rb
264
+ - spec/bson/binary_spec.rb
265
+ - spec/bson/document_as_spec.rb
266
+ - spec/bson/code_spec.rb
267
+ - spec/bson/array_spec.rb
268
+ - spec/bson/time_spec.rb
269
+ - spec/bson/raw_spec.rb
270
+ - spec/bson/string_spec.rb
271
+ - spec/bson/hash_spec.rb
272
+ - spec/bson/object_id_spec.rb
273
+ - spec/bson/ext_json_parse_spec.rb
274
+ - spec/bson/document_spec.rb
275
+ - spec/bson/symbol_spec.rb
276
+ - spec/bson/open_struct_spec.rb
277
+ - spec/bson/code_with_scope_spec.rb
278
+ - spec/bson/symbol_raw_spec.rb
279
+ - spec/bson/byte_buffer_write_spec.rb
280
+ - spec/bson/byte_buffer_spec.rb
281
+ - spec/bson/nil_class_spec.rb
282
+ - spec/bson/byte_buffer_read_spec.rb
283
+ - spec/bson/config_spec.rb
284
+ - spec/bson/integer_spec.rb
285
+ - spec/support/shared_examples.rb
286
+ - spec/support/utils.rb
287
+ - spec/support/spec_config.rb
242
288
  - spec/spec_helper.rb
243
- - spec/spec_tests/corpus_spec.rb
244
- - spec/spec_tests/common_driver_spec.rb
245
- - spec/spec_tests/data/corpus/decimal128-7.json
246
- - spec/spec_tests/data/corpus/top.json
247
- - spec/spec_tests/data/corpus/array.json
248
- - spec/spec_tests/data/corpus/null.json
249
- - spec/spec_tests/data/corpus/document.json
250
- - spec/spec_tests/data/corpus/decimal128-2.json
251
- - spec/spec_tests/data/corpus/decimal128-6.json
252
- - spec/spec_tests/data/corpus/boolean.json
253
- - spec/spec_tests/data/corpus/README.md
254
- - spec/spec_tests/data/corpus/maxkey.json
255
- - spec/spec_tests/data/corpus/binary.json
256
- - spec/spec_tests/data/corpus/multi-type.json
257
- - spec/spec_tests/data/corpus/timestamp.json
258
- - spec/spec_tests/data/corpus/multi-type-deprecated.json
259
- - spec/spec_tests/data/corpus/dbpointer.json
260
- - spec/spec_tests/data/corpus/oid.json
261
- - spec/spec_tests/data/corpus/regex.json
262
- - spec/spec_tests/data/corpus/minkey.json
263
- - spec/spec_tests/data/corpus/symbol.json
264
- - spec/spec_tests/data/corpus/dbref.json
265
- - spec/spec_tests/data/corpus/decimal128-1.json
266
- - spec/spec_tests/data/corpus/undefined.json
267
- - spec/spec_tests/data/corpus/double.json
268
- - spec/spec_tests/data/corpus/decimal128-4.json
269
- - spec/spec_tests/data/corpus/decimal128-3.json
270
- - spec/spec_tests/data/corpus/decimal128-5.json
271
- - spec/spec_tests/data/corpus/int32.json
272
- - spec/spec_tests/data/corpus/string.json
273
- - spec/spec_tests/data/corpus/code.json
274
- - spec/spec_tests/data/corpus/code_w_scope.json
275
- - spec/spec_tests/data/corpus/int64.json
276
- - spec/spec_tests/data/corpus/datetime.json
277
- - spec/spec_tests/data/corpus_legacy/top.json
278
- - spec/spec_tests/data/corpus_legacy/array.json
279
- - spec/spec_tests/data/corpus_legacy/null.json
280
- - spec/spec_tests/data/corpus_legacy/document.json
281
- - spec/spec_tests/data/corpus_legacy/boolean.json
282
- - spec/spec_tests/data/corpus_legacy/maxkey.json
283
- - spec/spec_tests/data/corpus_legacy/binary.json
284
- - spec/spec_tests/data/corpus_legacy/timestamp.json
285
289
  - spec/spec_tests/data/corpus_legacy/failures/dbpointer.json
286
290
  - spec/spec_tests/data/corpus_legacy/failures/symbol.json
287
291
  - spec/spec_tests/data/corpus_legacy/failures/int64.json
288
292
  - spec/spec_tests/data/corpus_legacy/failures/datetime.json
289
- - spec/spec_tests/data/corpus_legacy/oid.json
290
- - spec/spec_tests/data/corpus_legacy/regex.json
291
- - spec/spec_tests/data/corpus_legacy/minkey.json
293
+ - spec/spec_tests/data/corpus_legacy/timestamp.json
294
+ - spec/spec_tests/data/corpus_legacy/top.json
295
+ - spec/spec_tests/data/corpus_legacy/maxkey.json
292
296
  - spec/spec_tests/data/corpus_legacy/undefined.json
293
- - spec/spec_tests/data/corpus_legacy/double.json
297
+ - spec/spec_tests/data/corpus_legacy/array.json
294
298
  - spec/spec_tests/data/corpus_legacy/int32.json
299
+ - spec/spec_tests/data/corpus_legacy/oid.json
300
+ - spec/spec_tests/data/corpus_legacy/regex.json
301
+ - spec/spec_tests/data/corpus_legacy/binary.json
302
+ - spec/spec_tests/data/corpus_legacy/null.json
295
303
  - spec/spec_tests/data/corpus_legacy/string.json
304
+ - spec/spec_tests/data/corpus_legacy/document.json
305
+ - spec/spec_tests/data/corpus_legacy/minkey.json
306
+ - spec/spec_tests/data/corpus_legacy/boolean.json
296
307
  - spec/spec_tests/data/corpus_legacy/code.json
308
+ - spec/spec_tests/data/corpus_legacy/double.json
297
309
  - spec/spec_tests/data/corpus_legacy/code_w_scope.json
298
- - spec/spec_tests/data/decimal128/decimal128-7.json
299
- - spec/spec_tests/data/decimal128/decimal128-2.json
310
+ - spec/spec_tests/data/decimal128/decimal128-4.json
300
311
  - spec/spec_tests/data/decimal128/decimal128-6.json
312
+ - spec/spec_tests/data/decimal128/decimal128-2.json
301
313
  - spec/spec_tests/data/decimal128/decimal128-1.json
302
- - spec/spec_tests/data/decimal128/decimal128-4.json
314
+ - spec/spec_tests/data/decimal128/decimal128-7.json
303
315
  - spec/spec_tests/data/decimal128/decimal128-3.json
304
316
  - spec/spec_tests/data/decimal128/decimal128-5.json
317
+ - spec/spec_tests/data/corpus/timestamp.json
318
+ - spec/spec_tests/data/corpus/top.json
319
+ - spec/spec_tests/data/corpus/maxkey.json
320
+ - spec/spec_tests/data/corpus/decimal128-4.json
321
+ - spec/spec_tests/data/corpus/dbpointer.json
322
+ - spec/spec_tests/data/corpus/undefined.json
323
+ - spec/spec_tests/data/corpus/array.json
324
+ - spec/spec_tests/data/corpus/decimal128-6.json
325
+ - spec/spec_tests/data/corpus/README.md
326
+ - spec/spec_tests/data/corpus/int32.json
327
+ - spec/spec_tests/data/corpus/oid.json
328
+ - spec/spec_tests/data/corpus/regex.json
329
+ - spec/spec_tests/data/corpus/binary.json
330
+ - spec/spec_tests/data/corpus/symbol.json
331
+ - spec/spec_tests/data/corpus/null.json
332
+ - spec/spec_tests/data/corpus/decimal128-2.json
333
+ - spec/spec_tests/data/corpus/string.json
334
+ - spec/spec_tests/data/corpus/document.json
335
+ - spec/spec_tests/data/corpus/dbref.json
336
+ - spec/spec_tests/data/corpus/decimal128-1.json
337
+ - spec/spec_tests/data/corpus/minkey.json
338
+ - spec/spec_tests/data/corpus/boolean.json
339
+ - spec/spec_tests/data/corpus/int64.json
340
+ - spec/spec_tests/data/corpus/code.json
341
+ - spec/spec_tests/data/corpus/decimal128-7.json
342
+ - spec/spec_tests/data/corpus/decimal128-3.json
343
+ - spec/spec_tests/data/corpus/decimal128-5.json
344
+ - spec/spec_tests/data/corpus/double.json
345
+ - spec/spec_tests/data/corpus/multi-type.json
346
+ - spec/spec_tests/data/corpus/multi-type-deprecated.json
347
+ - spec/spec_tests/data/corpus/datetime.json
348
+ - spec/spec_tests/data/corpus/code_w_scope.json
349
+ - spec/spec_tests/corpus_spec.rb
305
350
  - spec/spec_tests/corpus_legacy_spec.rb
306
- - spec/support/utils.rb
307
- - spec/support/shared_examples.rb
308
- - spec/support/spec_config.rb
309
- - spec/runners/common_driver.rb
351
+ - spec/spec_tests/common_driver_spec.rb
310
352
  - spec/runners/corpus_legacy.rb
311
353
  - spec/runners/corpus.rb
312
- - spec/bson/code_spec.rb
313
- - spec/bson/byte_buffer_read_spec.rb
314
- - spec/bson/int32_spec.rb
315
- - spec/bson/max_key_spec.rb
316
- - spec/bson/time_spec.rb
317
- - spec/bson/array_spec.rb
318
- - spec/bson/date_time_spec.rb
319
- - spec/bson/document_spec.rb
320
- - spec/bson/float_spec.rb
321
- - spec/bson/nil_class_spec.rb
322
- - spec/bson/time_with_zone_spec.rb
323
- - spec/bson/ext_json_parse_spec.rb
324
- - spec/bson/string_spec.rb
325
- - spec/bson/open_struct_spec.rb
326
- - spec/bson/config_spec.rb
327
- - spec/bson/false_class_spec.rb
328
- - spec/bson/raw_spec.rb
329
- - spec/bson/regexp_spec.rb
330
- - spec/bson/binary_spec.rb
331
- - spec/bson/object_spec.rb
332
- - spec/bson/decimal128_spec.rb
333
- - spec/bson/binary_uuid_spec.rb
334
- - spec/bson/boolean_spec.rb
335
- - spec/bson/byte_buffer_spec.rb
336
- - spec/bson/json_spec.rb
337
- - spec/bson/symbol_spec.rb
338
- - spec/bson/integer_spec.rb
339
- - spec/bson/byte_buffer_write_spec.rb
340
- - spec/bson/registry_spec.rb
341
- - spec/bson/code_with_scope_spec.rb
342
- - spec/bson/true_class_spec.rb
343
- - spec/bson/undefined_spec.rb
344
- - spec/bson/object_id_spec.rb
345
- - spec/bson/timestamp_spec.rb
346
- - spec/bson/hash_spec.rb
347
- - spec/bson/symbol_raw_spec.rb
348
- - spec/bson/min_key_spec.rb
349
- - spec/bson/int64_spec.rb
350
- - spec/bson/date_spec.rb
354
+ - spec/runners/common_driver.rb
351
355
  - spec/bson_spec.rb
metadata.gz.sig CHANGED
Binary file