bson 5.0.2-java → 5.1.1-java
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 +4 -4
- data/Rakefile +16 -26
- data/lib/bson/binary.rb +126 -4
- data/lib/bson/document.rb +8 -0
- data/lib/bson/object_id.rb +1 -1
- data/lib/bson/regexp.rb +3 -3
- data/lib/bson/vector.rb +44 -0
- data/lib/bson/version.rb +5 -16
- data/lib/bson-ruby.jar +0 -0
- data/lib/bson.rb +1 -0
- data/spec/bson/document_as_spec.rb +14 -0
- data/spec/bson/vector_spec.rb +33 -0
- data/spec/runners/binary_vector.rb +78 -0
- data/spec/shared/LICENSE +20 -0
- data/spec/shared/bin/get-mongodb-download-url +17 -0
- data/spec/shared/bin/s3-copy +45 -0
- data/spec/shared/bin/s3-upload +69 -0
- data/spec/shared/lib/mrss/child_process_helper.rb +80 -0
- data/spec/shared/lib/mrss/cluster_config.rb +231 -0
- data/spec/shared/lib/mrss/constraints.rb +378 -0
- data/spec/shared/lib/mrss/docker_runner.rb +298 -0
- data/spec/shared/lib/mrss/eg_config_utils.rb +51 -0
- data/spec/shared/lib/mrss/event_subscriber.rb +210 -0
- data/spec/shared/lib/mrss/lite_constraints.rb +238 -0
- data/spec/shared/lib/mrss/release/candidate.rb +281 -0
- data/spec/shared/lib/mrss/release/product_data.rb +144 -0
- data/spec/shared/lib/mrss/server_version_registry.rb +113 -0
- data/spec/shared/lib/mrss/session_registry.rb +69 -0
- data/spec/shared/lib/mrss/session_registry_legacy.rb +60 -0
- data/spec/shared/lib/mrss/spec_organizer.rb +179 -0
- data/spec/shared/lib/mrss/utils.rb +37 -0
- data/spec/shared/lib/tasks/candidate.rake +64 -0
- data/spec/shared/share/Dockerfile.erb +251 -0
- data/spec/shared/share/haproxy-1.conf +16 -0
- data/spec/shared/share/haproxy-2.conf +17 -0
- data/spec/shared/shlib/config.sh +27 -0
- data/spec/shared/shlib/distro.sh +84 -0
- data/spec/shared/shlib/server.sh +423 -0
- data/spec/shared/shlib/set_env.sh +110 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/spec_tests/binary_vector_spec.rb +82 -0
- data/spec/spec_tests/data/binary_vector/README.md +61 -0
- data/spec/spec_tests/data/binary_vector/float32.json +65 -0
- data/spec/spec_tests/data/binary_vector/int8.json +57 -0
- data/spec/spec_tests/data/binary_vector/packed_bit.json +83 -0
- data/spec/spec_tests/data/corpus/binary.json +30 -0
- metadata +70 -6
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"description": "Tests of Binary subtype 9, Vectors, with dtype FLOAT32",
|
3
|
+
"test_key": "vector",
|
4
|
+
"tests": [
|
5
|
+
{
|
6
|
+
"description": "Simple Vector FLOAT32",
|
7
|
+
"valid": true,
|
8
|
+
"vector": [127.0, 7.0],
|
9
|
+
"dtype_hex": "0x27",
|
10
|
+
"dtype_alias": "FLOAT32",
|
11
|
+
"padding": 0,
|
12
|
+
"canonical_bson": "1C00000005766563746F72000A0000000927000000FE420000E04000"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "Vector with decimals and negative value FLOAT32",
|
16
|
+
"valid": true,
|
17
|
+
"vector": [127.7, -7.7],
|
18
|
+
"dtype_hex": "0x27",
|
19
|
+
"dtype_alias": "FLOAT32",
|
20
|
+
"padding": 0,
|
21
|
+
"canonical_bson": "1C00000005766563746F72000A0000000927006666FF426666F6C000"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "Empty Vector FLOAT32",
|
25
|
+
"valid": true,
|
26
|
+
"vector": [],
|
27
|
+
"dtype_hex": "0x27",
|
28
|
+
"dtype_alias": "FLOAT32",
|
29
|
+
"padding": 0,
|
30
|
+
"canonical_bson": "1400000005766563746F72000200000009270000"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "Infinity Vector FLOAT32",
|
34
|
+
"valid": true,
|
35
|
+
"vector": [{"$numberDouble": "-Infinity"}, 0.0, {"$numberDouble": "Infinity"} ],
|
36
|
+
"dtype_hex": "0x27",
|
37
|
+
"dtype_alias": "FLOAT32",
|
38
|
+
"padding": 0,
|
39
|
+
"canonical_bson": "2000000005766563746F72000E000000092700000080FF000000000000807F00"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"description": "FLOAT32 with padding",
|
43
|
+
"valid": false,
|
44
|
+
"vector": [127.0, 7.0],
|
45
|
+
"dtype_hex": "0x27",
|
46
|
+
"dtype_alias": "FLOAT32",
|
47
|
+
"padding": 3,
|
48
|
+
"canonical_bson": "1C00000005766563746F72000A0000000927030000FE420000E04000"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"description": "Insufficient vector data with 3 bytes FLOAT32",
|
52
|
+
"valid": false,
|
53
|
+
"dtype_hex": "0x27",
|
54
|
+
"dtype_alias": "FLOAT32",
|
55
|
+
"canonical_bson": "1700000005766563746F7200050000000927002A2A2A00"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"description": "Insufficient vector data with 5 bytes FLOAT32",
|
59
|
+
"valid": false,
|
60
|
+
"dtype_hex": "0x27",
|
61
|
+
"dtype_alias": "FLOAT32",
|
62
|
+
"canonical_bson": "1900000005766563746F7200070000000927002A2A2A2A2A00"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
{
|
2
|
+
"description": "Tests of Binary subtype 9, Vectors, with dtype INT8",
|
3
|
+
"test_key": "vector",
|
4
|
+
"tests": [
|
5
|
+
{
|
6
|
+
"description": "Simple Vector INT8",
|
7
|
+
"valid": true,
|
8
|
+
"vector": [127, 7],
|
9
|
+
"dtype_hex": "0x03",
|
10
|
+
"dtype_alias": "INT8",
|
11
|
+
"padding": 0,
|
12
|
+
"canonical_bson": "1600000005766563746F7200040000000903007F0700"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "Empty Vector INT8",
|
16
|
+
"valid": true,
|
17
|
+
"vector": [],
|
18
|
+
"dtype_hex": "0x03",
|
19
|
+
"dtype_alias": "INT8",
|
20
|
+
"padding": 0,
|
21
|
+
"canonical_bson": "1400000005766563746F72000200000009030000"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "Overflow Vector INT8",
|
25
|
+
"valid": false,
|
26
|
+
"vector": [128],
|
27
|
+
"dtype_hex": "0x03",
|
28
|
+
"dtype_alias": "INT8",
|
29
|
+
"padding": 0
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"description": "Underflow Vector INT8",
|
33
|
+
"valid": false,
|
34
|
+
"vector": [-129],
|
35
|
+
"dtype_hex": "0x03",
|
36
|
+
"dtype_alias": "INT8",
|
37
|
+
"padding": 0
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"description": "INT8 with padding",
|
41
|
+
"valid": false,
|
42
|
+
"vector": [127, 7],
|
43
|
+
"dtype_hex": "0x03",
|
44
|
+
"dtype_alias": "INT8",
|
45
|
+
"padding": 3,
|
46
|
+
"canonical_bson": "1600000005766563746F7200040000000903037F0700"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"description": "INT8 with float inputs",
|
50
|
+
"valid": false,
|
51
|
+
"vector": [127.77, 7.77],
|
52
|
+
"dtype_hex": "0x03",
|
53
|
+
"dtype_alias": "INT8",
|
54
|
+
"padding": 0
|
55
|
+
}
|
56
|
+
]
|
57
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"description": "Tests of Binary subtype 9, Vectors, with dtype PACKED_BIT",
|
3
|
+
"test_key": "vector",
|
4
|
+
"tests": [
|
5
|
+
{
|
6
|
+
"description": "Padding specified with no vector data PACKED_BIT",
|
7
|
+
"valid": false,
|
8
|
+
"vector": [],
|
9
|
+
"dtype_hex": "0x10",
|
10
|
+
"dtype_alias": "PACKED_BIT",
|
11
|
+
"padding": 1,
|
12
|
+
"canonical_bson": "1400000005766563746F72000200000009100100"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "Simple Vector PACKED_BIT",
|
16
|
+
"valid": true,
|
17
|
+
"vector": [127, 7],
|
18
|
+
"dtype_hex": "0x10",
|
19
|
+
"dtype_alias": "PACKED_BIT",
|
20
|
+
"padding": 0,
|
21
|
+
"canonical_bson": "1600000005766563746F7200040000000910007F0700"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "Empty Vector PACKED_BIT",
|
25
|
+
"valid": true,
|
26
|
+
"vector": [],
|
27
|
+
"dtype_hex": "0x10",
|
28
|
+
"dtype_alias": "PACKED_BIT",
|
29
|
+
"padding": 0,
|
30
|
+
"canonical_bson": "1400000005766563746F72000200000009100000"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "PACKED_BIT with padding",
|
34
|
+
"valid": true,
|
35
|
+
"vector": [127, 7],
|
36
|
+
"dtype_hex": "0x10",
|
37
|
+
"dtype_alias": "PACKED_BIT",
|
38
|
+
"padding": 3,
|
39
|
+
"canonical_bson": "1600000005766563746F7200040000000910037F0700"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"description": "Overflow Vector PACKED_BIT",
|
43
|
+
"valid": false,
|
44
|
+
"vector": [256],
|
45
|
+
"dtype_hex": "0x10",
|
46
|
+
"dtype_alias": "PACKED_BIT",
|
47
|
+
"padding": 0
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"description": "Underflow Vector PACKED_BIT",
|
51
|
+
"valid": false,
|
52
|
+
"vector": [-1],
|
53
|
+
"dtype_hex": "0x10",
|
54
|
+
"dtype_alias": "PACKED_BIT",
|
55
|
+
"padding": 0
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"description": "Vector with float values PACKED_BIT",
|
59
|
+
"valid": false,
|
60
|
+
"vector": [127.5],
|
61
|
+
"dtype_hex": "0x10",
|
62
|
+
"dtype_alias": "PACKED_BIT",
|
63
|
+
"padding": 0
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"description": "Exceeding maximum padding PACKED_BIT",
|
67
|
+
"valid": false,
|
68
|
+
"vector": [1],
|
69
|
+
"dtype_hex": "0x10",
|
70
|
+
"dtype_alias": "PACKED_BIT",
|
71
|
+
"padding": 8,
|
72
|
+
"canonical_bson": "1500000005766563746F7200030000000910080100"
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"description": "Negative padding PACKED_BIT",
|
76
|
+
"valid": false,
|
77
|
+
"vector": [1],
|
78
|
+
"dtype_hex": "0x10",
|
79
|
+
"dtype_alias": "PACKED_BIT",
|
80
|
+
"padding": -1
|
81
|
+
}
|
82
|
+
]
|
83
|
+
}
|
@@ -74,6 +74,36 @@
|
|
74
74
|
"description": "$type query operator (conflicts with legacy $binary form with $type field)",
|
75
75
|
"canonical_bson": "180000000378001000000010247479706500020000000000",
|
76
76
|
"canonical_extjson": "{\"x\" : { \"$type\" : {\"$numberInt\": \"2\"}}}"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"description": "subtype 0x09 Vector FLOAT32",
|
80
|
+
"canonical_bson": "170000000578000A0000000927000000FE420000E04000",
|
81
|
+
"canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"JwAAAP5CAADgQA==\", \"subType\": \"09\"}}}"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"description": "subtype 0x09 Vector INT8",
|
85
|
+
"canonical_bson": "11000000057800040000000903007F0700",
|
86
|
+
"canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"AwB/Bw==\", \"subType\": \"09\"}}}"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"description": "subtype 0x09 Vector PACKED_BIT",
|
90
|
+
"canonical_bson": "11000000057800040000000910007F0700",
|
91
|
+
"canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"EAB/Bw==\", \"subType\": \"09\"}}}"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"description": "subtype 0x09 Vector (Zero-length) FLOAT32",
|
95
|
+
"canonical_bson": "0F0000000578000200000009270000",
|
96
|
+
"canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"JwA=\", \"subType\": \"09\"}}}"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"description": "subtype 0x09 Vector (Zero-length) INT8",
|
100
|
+
"canonical_bson": "0F0000000578000200000009030000",
|
101
|
+
"canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"AwA=\", \"subType\": \"09\"}}}"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"description": "subtype 0x09 Vector (Zero-length) PACKED_BIT",
|
105
|
+
"canonical_bson": "0F0000000578000200000009100000",
|
106
|
+
"canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"EAA=\", \"subType\": \"09\"}}}"
|
77
107
|
}
|
78
108
|
],
|
79
109
|
"decodeErrors": [
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- The MongoDB Ruby Team
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: A fully featured BSON specification implementation in Ruby
|
14
13
|
email: dbx-ruby@mongodb.com
|
@@ -80,6 +79,7 @@ files:
|
|
80
79
|
- lib/bson/timestamp.rb
|
81
80
|
- lib/bson/true_class.rb
|
82
81
|
- lib/bson/undefined.rb
|
82
|
+
- lib/bson/vector.rb
|
83
83
|
- lib/bson/version.rb
|
84
84
|
- spec/README.md
|
85
85
|
- spec/bson/array_spec.rb
|
@@ -126,14 +126,47 @@ files:
|
|
126
126
|
- spec/bson/timestamp_spec.rb
|
127
127
|
- spec/bson/true_class_spec.rb
|
128
128
|
- spec/bson/undefined_spec.rb
|
129
|
+
- spec/bson/vector_spec.rb
|
129
130
|
- spec/bson_spec.rb
|
131
|
+
- spec/runners/binary_vector.rb
|
130
132
|
- spec/runners/common_driver.rb
|
131
133
|
- spec/runners/corpus.rb
|
132
134
|
- spec/runners/corpus_legacy.rb
|
135
|
+
- spec/shared/LICENSE
|
136
|
+
- spec/shared/bin/get-mongodb-download-url
|
137
|
+
- spec/shared/bin/s3-copy
|
138
|
+
- spec/shared/bin/s3-upload
|
139
|
+
- spec/shared/lib/mrss/child_process_helper.rb
|
140
|
+
- spec/shared/lib/mrss/cluster_config.rb
|
141
|
+
- spec/shared/lib/mrss/constraints.rb
|
142
|
+
- spec/shared/lib/mrss/docker_runner.rb
|
143
|
+
- spec/shared/lib/mrss/eg_config_utils.rb
|
144
|
+
- spec/shared/lib/mrss/event_subscriber.rb
|
145
|
+
- spec/shared/lib/mrss/lite_constraints.rb
|
146
|
+
- spec/shared/lib/mrss/release/candidate.rb
|
147
|
+
- spec/shared/lib/mrss/release/product_data.rb
|
148
|
+
- spec/shared/lib/mrss/server_version_registry.rb
|
149
|
+
- spec/shared/lib/mrss/session_registry.rb
|
150
|
+
- spec/shared/lib/mrss/session_registry_legacy.rb
|
151
|
+
- spec/shared/lib/mrss/spec_organizer.rb
|
152
|
+
- spec/shared/lib/mrss/utils.rb
|
153
|
+
- spec/shared/lib/tasks/candidate.rake
|
154
|
+
- spec/shared/share/Dockerfile.erb
|
155
|
+
- spec/shared/share/haproxy-1.conf
|
156
|
+
- spec/shared/share/haproxy-2.conf
|
157
|
+
- spec/shared/shlib/config.sh
|
158
|
+
- spec/shared/shlib/distro.sh
|
159
|
+
- spec/shared/shlib/server.sh
|
160
|
+
- spec/shared/shlib/set_env.sh
|
133
161
|
- spec/spec_helper.rb
|
162
|
+
- spec/spec_tests/binary_vector_spec.rb
|
134
163
|
- spec/spec_tests/common_driver_spec.rb
|
135
164
|
- spec/spec_tests/corpus_legacy_spec.rb
|
136
165
|
- spec/spec_tests/corpus_spec.rb
|
166
|
+
- spec/spec_tests/data/binary_vector/README.md
|
167
|
+
- spec/spec_tests/data/binary_vector/float32.json
|
168
|
+
- spec/spec_tests/data/binary_vector/int8.json
|
169
|
+
- spec/spec_tests/data/binary_vector/packed_bit.json
|
137
170
|
- spec/spec_tests/data/corpus/README.md
|
138
171
|
- spec/spec_tests/data/corpus/array.json
|
139
172
|
- spec/spec_tests/data/corpus/binary.json
|
@@ -206,7 +239,6 @@ metadata:
|
|
206
239
|
documentation_uri: https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/
|
207
240
|
homepage_uri: https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/
|
208
241
|
source_code_uri: https://github.com/mongodb/bson-ruby
|
209
|
-
post_install_message:
|
210
242
|
rdoc_options: []
|
211
243
|
require_paths:
|
212
244
|
- lib
|
@@ -221,8 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
253
|
- !ruby/object:Gem::Version
|
222
254
|
version: 1.3.6
|
223
255
|
requirements: []
|
224
|
-
rubygems_version: 3.
|
225
|
-
signing_key:
|
256
|
+
rubygems_version: 3.6.9
|
226
257
|
specification_version: 4
|
227
258
|
summary: Ruby implementation of the BSON specification
|
228
259
|
test_files:
|
@@ -271,14 +302,47 @@ test_files:
|
|
271
302
|
- spec/bson/timestamp_spec.rb
|
272
303
|
- spec/bson/true_class_spec.rb
|
273
304
|
- spec/bson/undefined_spec.rb
|
305
|
+
- spec/bson/vector_spec.rb
|
274
306
|
- spec/bson_spec.rb
|
307
|
+
- spec/runners/binary_vector.rb
|
275
308
|
- spec/runners/common_driver.rb
|
276
309
|
- spec/runners/corpus.rb
|
277
310
|
- spec/runners/corpus_legacy.rb
|
311
|
+
- spec/shared/LICENSE
|
312
|
+
- spec/shared/bin/get-mongodb-download-url
|
313
|
+
- spec/shared/bin/s3-copy
|
314
|
+
- spec/shared/bin/s3-upload
|
315
|
+
- spec/shared/lib/mrss/child_process_helper.rb
|
316
|
+
- spec/shared/lib/mrss/cluster_config.rb
|
317
|
+
- spec/shared/lib/mrss/constraints.rb
|
318
|
+
- spec/shared/lib/mrss/docker_runner.rb
|
319
|
+
- spec/shared/lib/mrss/eg_config_utils.rb
|
320
|
+
- spec/shared/lib/mrss/event_subscriber.rb
|
321
|
+
- spec/shared/lib/mrss/lite_constraints.rb
|
322
|
+
- spec/shared/lib/mrss/release/candidate.rb
|
323
|
+
- spec/shared/lib/mrss/release/product_data.rb
|
324
|
+
- spec/shared/lib/mrss/server_version_registry.rb
|
325
|
+
- spec/shared/lib/mrss/session_registry.rb
|
326
|
+
- spec/shared/lib/mrss/session_registry_legacy.rb
|
327
|
+
- spec/shared/lib/mrss/spec_organizer.rb
|
328
|
+
- spec/shared/lib/mrss/utils.rb
|
329
|
+
- spec/shared/lib/tasks/candidate.rake
|
330
|
+
- spec/shared/share/Dockerfile.erb
|
331
|
+
- spec/shared/share/haproxy-1.conf
|
332
|
+
- spec/shared/share/haproxy-2.conf
|
333
|
+
- spec/shared/shlib/config.sh
|
334
|
+
- spec/shared/shlib/distro.sh
|
335
|
+
- spec/shared/shlib/server.sh
|
336
|
+
- spec/shared/shlib/set_env.sh
|
278
337
|
- spec/spec_helper.rb
|
338
|
+
- spec/spec_tests/binary_vector_spec.rb
|
279
339
|
- spec/spec_tests/common_driver_spec.rb
|
280
340
|
- spec/spec_tests/corpus_legacy_spec.rb
|
281
341
|
- spec/spec_tests/corpus_spec.rb
|
342
|
+
- spec/spec_tests/data/binary_vector/README.md
|
343
|
+
- spec/spec_tests/data/binary_vector/float32.json
|
344
|
+
- spec/spec_tests/data/binary_vector/int8.json
|
345
|
+
- spec/spec_tests/data/binary_vector/packed_bit.json
|
282
346
|
- spec/spec_tests/data/corpus/README.md
|
283
347
|
- spec/spec_tests/data/corpus/array.json
|
284
348
|
- spec/spec_tests/data/corpus/binary.json
|