bson 4.7.1 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +2 -2
  3. data.tar.gz.sig +0 -0
  4. data/README.md +5 -1
  5. data/ext/bson/bson-native.h +14 -4
  6. data/ext/bson/init.c +25 -2
  7. data/ext/bson/read.c +61 -15
  8. data/ext/bson/util.c +40 -0
  9. data/ext/bson/write.c +17 -13
  10. data/lib/bson.rb +3 -0
  11. data/lib/bson/array.rb +21 -3
  12. data/lib/bson/binary.rb +41 -3
  13. data/lib/bson/boolean.rb +3 -1
  14. data/lib/bson/code.rb +15 -1
  15. data/lib/bson/code_with_scope.rb +17 -3
  16. data/lib/bson/db_pointer.rb +104 -0
  17. data/lib/bson/decimal128.rb +15 -1
  18. data/lib/bson/error.rb +17 -0
  19. data/lib/bson/ext_json.rb +374 -0
  20. data/lib/bson/float.rb +47 -1
  21. data/lib/bson/hash.rb +23 -3
  22. data/lib/bson/int32.rb +21 -1
  23. data/lib/bson/int64.rb +28 -3
  24. data/lib/bson/integer.rb +34 -0
  25. data/lib/bson/max_key.rb +12 -0
  26. data/lib/bson/min_key.rb +12 -0
  27. data/lib/bson/nil_class.rb +3 -1
  28. data/lib/bson/object.rb +27 -0
  29. data/lib/bson/object_id.rb +15 -1
  30. data/lib/bson/regexp.rb +19 -2
  31. data/lib/bson/specialized.rb +3 -1
  32. data/lib/bson/string.rb +3 -1
  33. data/lib/bson/symbol.rb +92 -3
  34. data/lib/bson/time.rb +28 -3
  35. data/lib/bson/timestamp.rb +15 -1
  36. data/lib/bson/undefined.rb +11 -0
  37. data/lib/bson/version.rb +1 -1
  38. data/spec/bson/binary_spec.rb +33 -3
  39. data/spec/bson/ext_json_parse_spec.rb +276 -0
  40. data/spec/bson/float_spec.rb +36 -0
  41. data/spec/bson/hash_spec.rb +70 -0
  42. data/spec/bson/int32_spec.rb +20 -0
  43. data/spec/bson/int64_spec.rb +38 -0
  44. data/spec/bson/integer_spec.rb +26 -0
  45. data/spec/bson/raw_spec.rb +22 -1
  46. data/spec/bson/symbol_raw_spec.rb +45 -0
  47. data/spec/bson/symbol_spec.rb +60 -0
  48. data/spec/{support → runners}/common_driver.rb +0 -0
  49. data/spec/runners/corpus.rb +182 -0
  50. data/spec/{support/corpus.rb → runners/corpus_legacy.rb} +40 -58
  51. data/spec/spec_helper.rb +9 -2
  52. data/spec/{bson/driver_bson_spec.rb → spec_tests/common_driver_spec.rb} +1 -0
  53. data/spec/{bson/corpus_spec.rb → spec_tests/corpus_legacy_spec.rb} +4 -4
  54. data/spec/spec_tests/corpus_spec.rb +124 -0
  55. data/spec/spec_tests/data/corpus/README.md +15 -0
  56. data/spec/spec_tests/data/corpus/array.json +49 -0
  57. data/spec/spec_tests/data/corpus/binary.json +85 -0
  58. data/spec/spec_tests/data/corpus/boolean.json +27 -0
  59. data/spec/spec_tests/data/corpus/code.json +67 -0
  60. data/spec/spec_tests/data/corpus/code_w_scope.json +78 -0
  61. data/spec/spec_tests/data/corpus/datetime.json +42 -0
  62. data/spec/spec_tests/data/corpus/dbpointer.json +56 -0
  63. data/spec/spec_tests/data/corpus/dbref.json +31 -0
  64. data/spec/spec_tests/data/corpus/decimal128-1.json +317 -0
  65. data/spec/spec_tests/data/corpus/decimal128-2.json +793 -0
  66. data/spec/spec_tests/data/corpus/decimal128-3.json +1771 -0
  67. data/spec/spec_tests/data/corpus/decimal128-4.json +117 -0
  68. data/spec/spec_tests/data/corpus/decimal128-5.json +402 -0
  69. data/spec/spec_tests/data/corpus/decimal128-6.json +119 -0
  70. data/spec/spec_tests/data/corpus/decimal128-7.json +323 -0
  71. data/spec/spec_tests/data/corpus/document.json +36 -0
  72. data/spec/spec_tests/data/corpus/double.json +87 -0
  73. data/spec/spec_tests/data/corpus/int32.json +43 -0
  74. data/spec/spec_tests/data/corpus/int64.json +43 -0
  75. data/spec/spec_tests/data/corpus/maxkey.json +12 -0
  76. data/spec/spec_tests/data/corpus/minkey.json +12 -0
  77. data/spec/spec_tests/data/corpus/multi-type-deprecated.json +15 -0
  78. data/spec/spec_tests/data/corpus/multi-type.json +11 -0
  79. data/spec/spec_tests/data/corpus/null.json +12 -0
  80. data/spec/spec_tests/data/corpus/oid.json +28 -0
  81. data/spec/spec_tests/data/corpus/regex.json +65 -0
  82. data/spec/spec_tests/data/corpus/string.json +72 -0
  83. data/spec/spec_tests/data/corpus/symbol.json +80 -0
  84. data/spec/spec_tests/data/corpus/timestamp.json +24 -0
  85. data/spec/spec_tests/data/corpus/top.json +240 -0
  86. data/spec/spec_tests/data/corpus/undefined.json +15 -0
  87. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/array.json +0 -0
  88. data/spec/{support/corpus-tests/failures → spec_tests/data/corpus_legacy}/binary.json +0 -0
  89. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/boolean.json +0 -0
  90. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/code.json +1 -1
  91. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/code_w_scope.json +1 -1
  92. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/document.json +1 -1
  93. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/double.json +1 -1
  94. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/datetime.json +0 -0
  95. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/dbpointer.json +0 -0
  96. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/int64.json +0 -0
  97. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/symbol.json +0 -0
  98. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/int32.json +1 -1
  99. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/maxkey.json +1 -1
  100. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/minkey.json +1 -1
  101. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/null.json +1 -1
  102. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/oid.json +0 -0
  103. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/regex.json +1 -1
  104. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/string.json +0 -0
  105. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/timestamp.json +1 -1
  106. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/top.json +0 -0
  107. data/spec/{support/corpus-tests/failures → spec_tests/data/corpus_legacy}/undefined.json +0 -0
  108. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-1.json +0 -0
  109. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-2.json +0 -0
  110. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-3.json +0 -0
  111. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-4.json +0 -0
  112. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-5.json +0 -0
  113. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-6.json +0 -0
  114. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-7.json +0 -0
  115. metadata +170 -95
  116. metadata.gz.sig +2 -4
@@ -0,0 +1,24 @@
1
+ {
2
+ "description": "Timestamp type",
3
+ "bson_type": "0x11",
4
+ "test_key": "a",
5
+ "valid": [
6
+ {
7
+ "description": "Timestamp: (123456789, 42)",
8
+ "canonical_bson": "100000001161002A00000015CD5B0700",
9
+ "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }"
10
+ },
11
+ {
12
+ "description": "Timestamp: (123456789, 42) (keys reversed)",
13
+ "canonical_bson": "100000001161002A00000015CD5B0700",
14
+ "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }",
15
+ "degenerate_extjson": "{\"a\" : {\"$timestamp\" : {\"i\" : 42, \"t\" : 123456789} } }"
16
+ }
17
+ ],
18
+ "decodeErrors": [
19
+ {
20
+ "description": "Truncated timestamp field",
21
+ "bson": "0f0000001161002A00000015CD5B00"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,240 @@
1
+ {
2
+ "description": "Top-level document validity",
3
+ "bson_type": "0x00",
4
+ "valid": [
5
+ {
6
+ "description": "Document with keys that start with $",
7
+ "canonical_bson": "0F00000010246B6579002A00000000",
8
+ "canonical_extjson": "{\"$key\": {\"$numberInt\": \"42\"}}"
9
+ }
10
+ ],
11
+ "decodeErrors": [
12
+ {
13
+ "description": "An object size that's too small to even include the object size, but is a well-formed, empty object",
14
+ "bson": "0100000000"
15
+ },
16
+ {
17
+ "description": "An object size that's only enough for the object size, but is a well-formed, empty object",
18
+ "bson": "0400000000"
19
+ },
20
+ {
21
+ "description": "One object, with length shorter than size (missing EOO)",
22
+ "bson": "05000000"
23
+ },
24
+ {
25
+ "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0x01",
26
+ "bson": "0500000001"
27
+ },
28
+ {
29
+ "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0xff",
30
+ "bson": "05000000FF"
31
+ },
32
+ {
33
+ "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0x70",
34
+ "bson": "0500000070"
35
+ },
36
+ {
37
+ "description": "Byte count is zero (with non-zero input length)",
38
+ "bson": "00000000000000000000"
39
+ },
40
+ {
41
+ "description": "Stated length exceeds byte count, with truncated document",
42
+ "bson": "1200000002666F6F0004000000626172"
43
+ },
44
+ {
45
+ "description": "Stated length less than byte count, with garbage after envelope",
46
+ "bson": "1200000002666F6F00040000006261720000DEADBEEF"
47
+ },
48
+ {
49
+ "description": "Stated length exceeds byte count, with valid envelope",
50
+ "bson": "1300000002666F6F00040000006261720000"
51
+ },
52
+ {
53
+ "description": "Stated length less than byte count, with valid envelope",
54
+ "bson": "1100000002666F6F00040000006261720000"
55
+ },
56
+ {
57
+ "description": "Invalid BSON type low range",
58
+ "bson": "07000000000000"
59
+ },
60
+ {
61
+ "description": "Invalid BSON type high range",
62
+ "bson": "07000000800000"
63
+ },
64
+ {
65
+ "description": "Document truncated mid-key",
66
+ "bson": "1200000002666F"
67
+ }
68
+ ],
69
+ "parseErrors": [
70
+ {
71
+ "description" : "Bad $regularExpression (extra field)",
72
+ "string" : "{\"a\" : \"$regularExpression\": {\"pattern\": \"abc\", \"options\": \"\", \"unrelated\": true}}}"
73
+ },
74
+ {
75
+ "description" : "Bad $regularExpression (missing options field)",
76
+ "string" : "{\"a\" : \"$regularExpression\": {\"pattern\": \"abc\"}}}"
77
+ },
78
+ {
79
+ "description": "Bad $regularExpression (pattern is number, not string)",
80
+ "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": 42, \"$options\" : \"\"}}}"
81
+ },
82
+ {
83
+ "description": "Bad $regularExpression (options are number, not string)",
84
+ "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": \"a\", \"$options\" : 0}}}"
85
+ },
86
+ {
87
+ "description" : "Bad $regularExpression (missing pattern field)",
88
+ "string" : "{\"a\" : \"$regularExpression\": {\"options\":\"ix\"}}}"
89
+ },
90
+ {
91
+ "description": "Bad $oid (number, not string)",
92
+ "string": "{\"a\" : {\"$oid\" : 42}}"
93
+ },
94
+ {
95
+ "description": "Bad $oid (extra field)",
96
+ "string": "{\"a\" : {\"$oid\" : \"56e1fc72e0c917e9c4714161\", \"unrelated\": true}}"
97
+ },
98
+ {
99
+ "description": "Bad $numberInt (number, not string)",
100
+ "string": "{\"a\" : {\"$numberInt\" : 42}}"
101
+ },
102
+ {
103
+ "description": "Bad $numberInt (extra field)",
104
+ "string": "{\"a\" : {\"$numberInt\" : \"42\", \"unrelated\": true}}"
105
+ },
106
+ {
107
+ "description": "Bad $numberLong (number, not string)",
108
+ "string": "{\"a\" : {\"$numberLong\" : 42}}"
109
+ },
110
+ {
111
+ "description": "Bad $numberLong (extra field)",
112
+ "string": "{\"a\" : {\"$numberLong\" : \"42\", \"unrelated\": true}}"
113
+ },
114
+ {
115
+ "description": "Bad $numberDouble (number, not string)",
116
+ "string": "{\"a\" : {\"$numberDouble\" : 42}}"
117
+ },
118
+ {
119
+ "description": "Bad $numberDouble (extra field)",
120
+ "string": "{\"a\" : {\"$numberDouble\" : \".1\", \"unrelated\": true}}"
121
+ },
122
+ {
123
+ "description": "Bad $numberDecimal (number, not string)",
124
+ "string": "{\"a\" : {\"$numberDecimal\" : 42}}"
125
+ },
126
+ {
127
+ "description": "Bad $numberDecimal (extra field)",
128
+ "string": "{\"a\" : {\"$numberDecimal\" : \".1\", \"unrelated\": true}}"
129
+ },
130
+ {
131
+ "description": "Bad $binary (binary is number, not string)",
132
+ "string": "{\"x\" : {\"$binary\" : {\"base64\" : 0, \"subType\" : \"00\"}}}"
133
+ },
134
+ {
135
+ "description": "Bad $binary (type is number, not string)",
136
+ "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"\", \"subType\" : 0}}}"
137
+ },
138
+ {
139
+ "description": "Bad $binary (missing $type)",
140
+ "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"//8=\"}}}"
141
+ },
142
+ {
143
+ "description": "Bad $binary (missing $binary)",
144
+ "string": "{\"x\" : {\"$binary\" : {\"subType\" : \"00\"}}}"
145
+ },
146
+ {
147
+ "description": "Bad $binary (extra field)",
148
+ "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"//8=\", \"subType\" : 0, \"unrelated\": true}}}"
149
+ },
150
+ {
151
+ "description": "Bad $code (type is number, not string)",
152
+ "string": "{\"a\" : {\"$code\" : 42}}"
153
+ },
154
+ {
155
+ "description": "Bad $code (type is number, not string) when $scope is also present",
156
+ "string": "{\"a\" : {\"$code\" : 42, \"$scope\" : {}}}"
157
+ },
158
+ {
159
+ "description": "Bad $code (extra field)",
160
+ "string": "{\"a\" : {\"$code\" : \"\", \"unrelated\": true}}"
161
+ },
162
+ {
163
+ "description": "Bad $code with $scope (scope is number, not doc)",
164
+ "string": "{\"x\" : {\"$code\" : \"\", \"$scope\" : 42}}"
165
+ },
166
+ {
167
+ "description": "Bad $timestamp (type is number, not doc)",
168
+ "string": "{\"a\" : {\"$timestamp\" : 42} }"
169
+ },
170
+ {
171
+ "description": "Bad $timestamp ('t' type is string, not number)",
172
+ "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : 42} } }"
173
+ },
174
+ {
175
+ "description": "Bad $timestamp ('i' type is string, not number)",
176
+ "string": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : \"42\"} } }"
177
+ },
178
+ {
179
+ "description": "Bad $timestamp (extra field at same level as $timestamp)",
180
+ "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : \"42\"}, \"unrelated\": true } }"
181
+ },
182
+ {
183
+ "description": "Bad $timestamp (extra field at same level as t and i)",
184
+ "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : \"42\", \"unrelated\": true} } }"
185
+ },
186
+ {
187
+ "description": "Bad $timestamp (missing t)",
188
+ "string": "{\"a\" : {\"$timestamp\" : {\"i\" : \"42\"} } }"
189
+ },
190
+ {
191
+ "description": "Bad $timestamp (missing i)",
192
+ "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\"} } }"
193
+ },
194
+ {
195
+ "description": "Bad $date (number, not string or hash)",
196
+ "string": "{\"a\" : {\"$date\" : 42}}"
197
+ },
198
+ {
199
+ "description": "Bad $date (extra field)",
200
+ "string": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330501\"}, \"unrelated\": true}}"
201
+ },
202
+ {
203
+ "description": "Bad DBRef (ref is number, not string)",
204
+ "string": "{\"x\" : {\"$ref\" : 42, \"$id\" : \"abc\"}}"
205
+ },
206
+ {
207
+ "description": "Bad DBRef (db is number, not string)",
208
+ "string": "{\"x\" : {\"$ref\" : \"a\", \"$id\" : \"abc\", \"$db\" : 42}}"
209
+ },
210
+ {
211
+ "description": "Bad $minKey (boolean, not integer)",
212
+ "string": "{\"a\" : {\"$minKey\" : true}}"
213
+ },
214
+ {
215
+ "description": "Bad $minKey (wrong integer)",
216
+ "string": "{\"a\" : {\"$minKey\" : 0}}"
217
+ },
218
+ {
219
+ "description": "Bad $minKey (extra field)",
220
+ "string": "{\"a\" : {\"$minKey\" : 1, \"unrelated\": true}}"
221
+ },
222
+ {
223
+ "description": "Bad $maxKey (boolean, not integer)",
224
+ "string": "{\"a\" : {\"$maxKey\" : true}}"
225
+ },
226
+ {
227
+ "description": "Bad $maxKey (wrong integer)",
228
+ "string": "{\"a\" : {\"$maxKey\" : 0}}"
229
+ },
230
+ {
231
+ "description": "Bad $maxKey (extra field)",
232
+ "string": "{\"a\" : {\"$maxKey\" : 1, \"unrelated\": true}}"
233
+ },
234
+ {
235
+ "description": "Bad DBpointer (extra field)",
236
+ "string": "{\"a\": {\"$dbPointer\": {\"a\": {\"$numberInt\": \"1\"}, \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}, \"c\": {\"$numberInt\": \"2\"}, \"$ref\": \"b\"}}}"
237
+ }
238
+
239
+ ]
240
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "description": "Undefined type (deprecated)",
3
+ "bson_type": "0x06",
4
+ "deprecated": true,
5
+ "test_key": "a",
6
+ "valid": [
7
+ {
8
+ "description": "Undefined",
9
+ "canonical_bson": "0800000006610000",
10
+ "canonical_extjson": "{\"a\" : {\"$undefined\" : true}}",
11
+ "converted_bson": "080000000A610000",
12
+ "converted_extjson": "{\"a\" : null}"
13
+ }
14
+ ]
15
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Javascript Code",
2
+ "description": "Code",
3
3
  "bson_type": "0x0D",
4
4
  "test_key": "a",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Javascript Code with Scope",
2
+ "description": "CodeWithScope",
3
3
  "bson_type": "0x0F",
4
4
  "test_key": "a",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Document type (sub-documents)",
2
+ "description": "Document",
3
3
  "bson_type": "0x03",
4
4
  "test_key": "x",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Double type",
2
+ "description": "Float",
3
3
  "bson_type": "0x01",
4
4
  "test_key": "d",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Int32 type",
2
+ "description": "Integer",
3
3
  "bson_type": "0x10",
4
4
  "test_key": "i",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Maxkey type",
2
+ "description": "MaxKey",
3
3
  "bson_type": "0xFF",
4
4
  "test_key": "a",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Minkey type",
2
+ "description": "MinKey",
3
3
  "bson_type": "0xFF",
4
4
  "test_key": "a",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Null type",
2
+ "description": "NilClass",
3
3
  "bson_type": "0x0A",
4
4
  "test_key": "a",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Regular Expression type",
2
+ "description": "Regexp",
3
3
  "bson_type": "0x0B",
4
4
  "test_key": "a",
5
5
  "valid": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Timestamp type",
2
+ "description": "Timestamp",
3
3
  "bson_type": "0x11",
4
4
  "test_key": "a",
5
5
  "valid": [
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.7.1
4
+ version: 4.8.0
5
5
  platform: ruby
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-01-23 00:00:00.000000000 Z
36
+ date: 2020-02-27 00:00:00.000000000 Z
37
37
  dependencies: []
38
38
  description: A fully featured BSON specification implementation in Ruby
39
39
  email:
@@ -69,10 +69,13 @@ files:
69
69
  - lib/bson/config.rb
70
70
  - lib/bson/date.rb
71
71
  - lib/bson/date_time.rb
72
+ - lib/bson/db_pointer.rb
72
73
  - lib/bson/decimal128.rb
73
74
  - lib/bson/decimal128/builder.rb
74
75
  - lib/bson/document.rb
75
76
  - lib/bson/environment.rb
77
+ - lib/bson/error.rb
78
+ - lib/bson/ext_json.rb
76
79
  - lib/bson/false_class.rb
77
80
  - lib/bson/float.rb
78
81
  - lib/bson/hash.rb
@@ -107,12 +110,11 @@ files:
107
110
  - spec/bson/code_spec.rb
108
111
  - spec/bson/code_with_scope_spec.rb
109
112
  - spec/bson/config_spec.rb
110
- - spec/bson/corpus_spec.rb
111
113
  - spec/bson/date_spec.rb
112
114
  - spec/bson/date_time_spec.rb
113
115
  - spec/bson/decimal128_spec.rb
114
116
  - spec/bson/document_spec.rb
115
- - spec/bson/driver_bson_spec.rb
117
+ - spec/bson/ext_json_parse_spec.rb
116
118
  - spec/bson/false_class_spec.rb
117
119
  - spec/bson/float_spec.rb
118
120
  - spec/bson/hash_spec.rb
@@ -130,6 +132,7 @@ files:
130
132
  - spec/bson/regexp_spec.rb
131
133
  - spec/bson/registry_spec.rb
132
134
  - spec/bson/string_spec.rb
135
+ - spec/bson/symbol_raw_spec.rb
133
136
  - spec/bson/symbol_spec.rb
134
137
  - spec/bson/time_spec.rb
135
138
  - spec/bson/time_with_zone_spec.rb
@@ -137,37 +140,73 @@ files:
137
140
  - spec/bson/true_class_spec.rb
138
141
  - spec/bson/undefined_spec.rb
139
142
  - spec/bson_spec.rb
143
+ - spec/runners/common_driver.rb
144
+ - spec/runners/corpus.rb
145
+ - spec/runners/corpus_legacy.rb
140
146
  - spec/spec_helper.rb
141
- - spec/support/common_driver.rb
142
- - spec/support/corpus-tests/array.json
143
- - spec/support/corpus-tests/boolean.json
144
- - spec/support/corpus-tests/code.json
145
- - spec/support/corpus-tests/code_w_scope.json
146
- - spec/support/corpus-tests/document.json
147
- - spec/support/corpus-tests/double.json
148
- - spec/support/corpus-tests/failures/binary.json
149
- - spec/support/corpus-tests/failures/datetime.json
150
- - spec/support/corpus-tests/failures/dbpointer.json
151
- - spec/support/corpus-tests/failures/int64.json
152
- - spec/support/corpus-tests/failures/symbol.json
153
- - spec/support/corpus-tests/failures/undefined.json
154
- - spec/support/corpus-tests/int32.json
155
- - spec/support/corpus-tests/maxkey.json
156
- - spec/support/corpus-tests/minkey.json
157
- - spec/support/corpus-tests/null.json
158
- - spec/support/corpus-tests/oid.json
159
- - spec/support/corpus-tests/regex.json
160
- - spec/support/corpus-tests/string.json
161
- - spec/support/corpus-tests/timestamp.json
162
- - spec/support/corpus-tests/top.json
163
- - spec/support/corpus.rb
164
- - spec/support/driver-spec-tests/decimal128/decimal128-1.json
165
- - spec/support/driver-spec-tests/decimal128/decimal128-2.json
166
- - spec/support/driver-spec-tests/decimal128/decimal128-3.json
167
- - spec/support/driver-spec-tests/decimal128/decimal128-4.json
168
- - spec/support/driver-spec-tests/decimal128/decimal128-5.json
169
- - spec/support/driver-spec-tests/decimal128/decimal128-6.json
170
- - spec/support/driver-spec-tests/decimal128/decimal128-7.json
147
+ - spec/spec_tests/common_driver_spec.rb
148
+ - spec/spec_tests/corpus_legacy_spec.rb
149
+ - spec/spec_tests/corpus_spec.rb
150
+ - spec/spec_tests/data/corpus/README.md
151
+ - spec/spec_tests/data/corpus/array.json
152
+ - spec/spec_tests/data/corpus/binary.json
153
+ - spec/spec_tests/data/corpus/boolean.json
154
+ - spec/spec_tests/data/corpus/code.json
155
+ - spec/spec_tests/data/corpus/code_w_scope.json
156
+ - spec/spec_tests/data/corpus/datetime.json
157
+ - spec/spec_tests/data/corpus/dbpointer.json
158
+ - spec/spec_tests/data/corpus/dbref.json
159
+ - spec/spec_tests/data/corpus/decimal128-1.json
160
+ - spec/spec_tests/data/corpus/decimal128-2.json
161
+ - spec/spec_tests/data/corpus/decimal128-3.json
162
+ - spec/spec_tests/data/corpus/decimal128-4.json
163
+ - spec/spec_tests/data/corpus/decimal128-5.json
164
+ - spec/spec_tests/data/corpus/decimal128-6.json
165
+ - spec/spec_tests/data/corpus/decimal128-7.json
166
+ - spec/spec_tests/data/corpus/document.json
167
+ - spec/spec_tests/data/corpus/double.json
168
+ - spec/spec_tests/data/corpus/int32.json
169
+ - spec/spec_tests/data/corpus/int64.json
170
+ - spec/spec_tests/data/corpus/maxkey.json
171
+ - spec/spec_tests/data/corpus/minkey.json
172
+ - spec/spec_tests/data/corpus/multi-type-deprecated.json
173
+ - spec/spec_tests/data/corpus/multi-type.json
174
+ - spec/spec_tests/data/corpus/null.json
175
+ - spec/spec_tests/data/corpus/oid.json
176
+ - spec/spec_tests/data/corpus/regex.json
177
+ - spec/spec_tests/data/corpus/string.json
178
+ - spec/spec_tests/data/corpus/symbol.json
179
+ - spec/spec_tests/data/corpus/timestamp.json
180
+ - spec/spec_tests/data/corpus/top.json
181
+ - spec/spec_tests/data/corpus/undefined.json
182
+ - spec/spec_tests/data/corpus_legacy/array.json
183
+ - spec/spec_tests/data/corpus_legacy/binary.json
184
+ - spec/spec_tests/data/corpus_legacy/boolean.json
185
+ - spec/spec_tests/data/corpus_legacy/code.json
186
+ - spec/spec_tests/data/corpus_legacy/code_w_scope.json
187
+ - spec/spec_tests/data/corpus_legacy/document.json
188
+ - spec/spec_tests/data/corpus_legacy/double.json
189
+ - spec/spec_tests/data/corpus_legacy/failures/datetime.json
190
+ - spec/spec_tests/data/corpus_legacy/failures/dbpointer.json
191
+ - spec/spec_tests/data/corpus_legacy/failures/int64.json
192
+ - spec/spec_tests/data/corpus_legacy/failures/symbol.json
193
+ - spec/spec_tests/data/corpus_legacy/int32.json
194
+ - spec/spec_tests/data/corpus_legacy/maxkey.json
195
+ - spec/spec_tests/data/corpus_legacy/minkey.json
196
+ - spec/spec_tests/data/corpus_legacy/null.json
197
+ - spec/spec_tests/data/corpus_legacy/oid.json
198
+ - spec/spec_tests/data/corpus_legacy/regex.json
199
+ - spec/spec_tests/data/corpus_legacy/string.json
200
+ - spec/spec_tests/data/corpus_legacy/timestamp.json
201
+ - spec/spec_tests/data/corpus_legacy/top.json
202
+ - spec/spec_tests/data/corpus_legacy/undefined.json
203
+ - spec/spec_tests/data/decimal128/decimal128-1.json
204
+ - spec/spec_tests/data/decimal128/decimal128-2.json
205
+ - spec/spec_tests/data/decimal128/decimal128-3.json
206
+ - spec/spec_tests/data/decimal128/decimal128-4.json
207
+ - spec/spec_tests/data/decimal128/decimal128-5.json
208
+ - spec/spec_tests/data/decimal128/decimal128-6.json
209
+ - spec/spec_tests/data/decimal128/decimal128-7.json
171
210
  - spec/support/shared_examples.rb
172
211
  - spec/support/spec_config.rb
173
212
  - spec/support/utils.rb
@@ -196,82 +235,118 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
235
  - !ruby/object:Gem::Version
197
236
  version: 1.3.6
198
237
  requirements: []
199
- rubygems_version: 3.0.3
238
+ rubygems_version: 3.0.1
200
239
  signing_key:
201
240
  specification_version: 4
202
241
  summary: Ruby implementation of the BSON specification
203
242
  test_files:
204
- - spec/bson/regexp_spec.rb
205
243
  - spec/bson/min_key_spec.rb
206
- - spec/bson/time_spec.rb
207
- - spec/bson/int32_spec.rb
244
+ - spec/bson/undefined_spec.rb
245
+ - spec/bson/regexp_spec.rb
246
+ - spec/bson/decimal128_spec.rb
208
247
  - spec/bson/code_spec.rb
248
+ - spec/bson/time_spec.rb
249
+ - spec/bson/object_spec.rb
250
+ - spec/bson/integer_spec.rb
251
+ - spec/bson/string_spec.rb
252
+ - spec/bson/byte_buffer_read_spec.rb
209
253
  - spec/bson/config_spec.rb
210
- - spec/bson/undefined_spec.rb
211
- - spec/bson/corpus_spec.rb
254
+ - spec/bson/json_spec.rb
212
255
  - spec/bson/boolean_spec.rb
213
- - spec/bson/object_spec.rb
214
- - spec/bson/array_spec.rb
215
256
  - spec/bson/hash_spec.rb
257
+ - spec/bson/open_struct_spec.rb
258
+ - spec/bson/nil_class_spec.rb
259
+ - spec/bson/array_spec.rb
260
+ - spec/bson/false_class_spec.rb
261
+ - spec/bson/symbol_raw_spec.rb
262
+ - spec/bson/binary_uuid_spec.rb
263
+ - spec/bson/ext_json_parse_spec.rb
264
+ - spec/bson/true_class_spec.rb
216
265
  - spec/bson/date_spec.rb
217
- - spec/bson/json_spec.rb
218
- - spec/bson/time_with_zone_spec.rb
266
+ - spec/bson/byte_buffer_write_spec.rb
219
267
  - spec/bson/int64_spec.rb
220
- - spec/bson/registry_spec.rb
221
- - spec/bson/binary_uuid_spec.rb
222
- - spec/bson/byte_buffer_read_spec.rb
223
- - spec/bson/raw_spec.rb
224
- - spec/bson/binary_spec.rb
268
+ - spec/bson/timestamp_spec.rb
225
269
  - spec/bson/max_key_spec.rb
226
- - spec/bson/code_with_scope_spec.rb
227
- - spec/bson/byte_buffer_write_spec.rb
228
- - spec/bson/date_time_spec.rb
229
- - spec/bson/driver_bson_spec.rb
230
- - spec/bson/false_class_spec.rb
270
+ - spec/bson/raw_spec.rb
231
271
  - spec/bson/byte_buffer_spec.rb
232
- - spec/bson/string_spec.rb
233
- - spec/bson/open_struct_spec.rb
234
- - spec/bson/timestamp_spec.rb
235
- - spec/bson/symbol_spec.rb
236
- - spec/bson/decimal128_spec.rb
237
- - spec/bson/integer_spec.rb
238
272
  - spec/bson/document_spec.rb
273
+ - spec/bson/code_with_scope_spec.rb
239
274
  - spec/bson/float_spec.rb
240
- - spec/bson/nil_class_spec.rb
241
- - spec/bson/true_class_spec.rb
275
+ - spec/bson/time_with_zone_spec.rb
276
+ - spec/bson/binary_spec.rb
277
+ - spec/bson/registry_spec.rb
278
+ - spec/bson/symbol_spec.rb
279
+ - spec/bson/date_time_spec.rb
242
280
  - spec/bson/object_id_spec.rb
243
- - spec/spec_helper.rb
244
- - spec/bson_spec.rb
245
- - spec/support/corpus.rb
246
- - spec/support/corpus-tests/failures/datetime.json
247
- - spec/support/corpus-tests/failures/symbol.json
248
- - spec/support/corpus-tests/failures/int64.json
249
- - spec/support/corpus-tests/failures/dbpointer.json
250
- - spec/support/corpus-tests/failures/undefined.json
251
- - spec/support/corpus-tests/failures/binary.json
252
- - spec/support/corpus-tests/maxkey.json
253
- - spec/support/corpus-tests/boolean.json
254
- - spec/support/corpus-tests/oid.json
255
- - spec/support/corpus-tests/code.json
256
- - spec/support/corpus-tests/array.json
257
- - spec/support/corpus-tests/double.json
258
- - spec/support/corpus-tests/code_w_scope.json
259
- - spec/support/corpus-tests/string.json
260
- - spec/support/corpus-tests/document.json
261
- - spec/support/corpus-tests/top.json
262
- - spec/support/corpus-tests/null.json
263
- - spec/support/corpus-tests/int32.json
264
- - spec/support/corpus-tests/timestamp.json
265
- - spec/support/corpus-tests/minkey.json
266
- - spec/support/corpus-tests/regex.json
281
+ - spec/bson/int32_spec.rb
267
282
  - spec/support/utils.rb
268
- - spec/support/spec_config.rb
269
283
  - spec/support/shared_examples.rb
270
- - spec/support/driver-spec-tests/decimal128/decimal128-1.json
271
- - spec/support/driver-spec-tests/decimal128/decimal128-7.json
272
- - spec/support/driver-spec-tests/decimal128/decimal128-6.json
273
- - spec/support/driver-spec-tests/decimal128/decimal128-5.json
274
- - spec/support/driver-spec-tests/decimal128/decimal128-4.json
275
- - spec/support/driver-spec-tests/decimal128/decimal128-3.json
276
- - spec/support/driver-spec-tests/decimal128/decimal128-2.json
277
- - spec/support/common_driver.rb
284
+ - spec/support/spec_config.rb
285
+ - spec/bson_spec.rb
286
+ - spec/spec_tests/corpus_spec.rb
287
+ - spec/spec_tests/corpus_legacy_spec.rb
288
+ - spec/spec_tests/data/decimal128/decimal128-6.json
289
+ - spec/spec_tests/data/decimal128/decimal128-3.json
290
+ - spec/spec_tests/data/decimal128/decimal128-1.json
291
+ - spec/spec_tests/data/decimal128/decimal128-4.json
292
+ - spec/spec_tests/data/decimal128/decimal128-7.json
293
+ - spec/spec_tests/data/decimal128/decimal128-5.json
294
+ - spec/spec_tests/data/decimal128/decimal128-2.json
295
+ - spec/spec_tests/data/corpus_legacy/code_w_scope.json
296
+ - spec/spec_tests/data/corpus_legacy/undefined.json
297
+ - spec/spec_tests/data/corpus_legacy/code.json
298
+ - spec/spec_tests/data/corpus_legacy/oid.json
299
+ - spec/spec_tests/data/corpus_legacy/timestamp.json
300
+ - spec/spec_tests/data/corpus_legacy/string.json
301
+ - spec/spec_tests/data/corpus_legacy/binary.json
302
+ - spec/spec_tests/data/corpus_legacy/null.json
303
+ - spec/spec_tests/data/corpus_legacy/int32.json
304
+ - spec/spec_tests/data/corpus_legacy/maxkey.json
305
+ - spec/spec_tests/data/corpus_legacy/array.json
306
+ - spec/spec_tests/data/corpus_legacy/regex.json
307
+ - spec/spec_tests/data/corpus_legacy/minkey.json
308
+ - spec/spec_tests/data/corpus_legacy/top.json
309
+ - spec/spec_tests/data/corpus_legacy/failures/symbol.json
310
+ - spec/spec_tests/data/corpus_legacy/failures/int64.json
311
+ - spec/spec_tests/data/corpus_legacy/failures/dbpointer.json
312
+ - spec/spec_tests/data/corpus_legacy/failures/datetime.json
313
+ - spec/spec_tests/data/corpus_legacy/boolean.json
314
+ - spec/spec_tests/data/corpus_legacy/double.json
315
+ - spec/spec_tests/data/corpus_legacy/document.json
316
+ - spec/spec_tests/data/corpus/code_w_scope.json
317
+ - spec/spec_tests/data/corpus/undefined.json
318
+ - spec/spec_tests/data/corpus/code.json
319
+ - spec/spec_tests/data/corpus/decimal128-6.json
320
+ - spec/spec_tests/data/corpus/oid.json
321
+ - spec/spec_tests/data/corpus/timestamp.json
322
+ - spec/spec_tests/data/corpus/decimal128-3.json
323
+ - spec/spec_tests/data/corpus/string.json
324
+ - spec/spec_tests/data/corpus/binary.json
325
+ - spec/spec_tests/data/corpus/null.json
326
+ - spec/spec_tests/data/corpus/int32.json
327
+ - spec/spec_tests/data/corpus/multi-type.json
328
+ - spec/spec_tests/data/corpus/decimal128-1.json
329
+ - spec/spec_tests/data/corpus/decimal128-4.json
330
+ - spec/spec_tests/data/corpus/README.md
331
+ - spec/spec_tests/data/corpus/maxkey.json
332
+ - spec/spec_tests/data/corpus/array.json
333
+ - spec/spec_tests/data/corpus/regex.json
334
+ - spec/spec_tests/data/corpus/dbref.json
335
+ - spec/spec_tests/data/corpus/symbol.json
336
+ - spec/spec_tests/data/corpus/minkey.json
337
+ - spec/spec_tests/data/corpus/decimal128-7.json
338
+ - spec/spec_tests/data/corpus/top.json
339
+ - spec/spec_tests/data/corpus/decimal128-5.json
340
+ - spec/spec_tests/data/corpus/boolean.json
341
+ - spec/spec_tests/data/corpus/int64.json
342
+ - spec/spec_tests/data/corpus/decimal128-2.json
343
+ - spec/spec_tests/data/corpus/dbpointer.json
344
+ - spec/spec_tests/data/corpus/double.json
345
+ - spec/spec_tests/data/corpus/multi-type-deprecated.json
346
+ - spec/spec_tests/data/corpus/document.json
347
+ - spec/spec_tests/data/corpus/datetime.json
348
+ - spec/spec_tests/common_driver_spec.rb
349
+ - spec/spec_helper.rb
350
+ - spec/runners/corpus_legacy.rb
351
+ - spec/runners/common_driver.rb
352
+ - spec/runners/corpus.rb