vault_coh 6.2.4 → 6.3.0
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/.ruby-version +1 -1
- data/Cargo.lock +224 -81
- data/Gemfile +2 -2
- data/Gemfile.lock +41 -31
- data/README.md +3 -3
- data/ext/vault_coh/Cargo.toml +2 -2
- data/ext/vault_coh/src/hash.rs +57 -51
- data/ext/vault_coh/src/lib.rs +10 -10
- data/lib/vault_coh/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f0c6131f692e19c816b5bd587b4cb02084f4c2b68bc62c717b2ce0178e05524
|
4
|
+
data.tar.gz: 6d21e9e307b292fd0c03dcfdf97b20c37e8460f34fdcde0c3b0e18028082550c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ec1342ad36f906659ce36d42ca9c005dd05379d7b27c72a9fd845d7c17f5bb33a5d429c2306e863ae2e734d5508a17056960b5f30ea715c46d22ed48621053f
|
7
|
+
data.tar.gz: ef44283beefa7afc55e3b6c54513c9872c0f1de31ff316113f67e6f3a0596cd6605d8f62f0bad06e2d35843dddf6ba7b8cba91de3aa091cb57e50cd739477121
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.5
|
data/Cargo.lock
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
# This file is automatically @generated by Cargo.
|
2
2
|
# It is not intended for manual editing.
|
3
|
-
version =
|
3
|
+
version = 4
|
4
4
|
|
5
5
|
[[package]]
|
6
6
|
name = "aho-corasick"
|
7
|
-
version = "1.1.
|
7
|
+
version = "1.1.3"
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9
|
-
checksum = "
|
9
|
+
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
10
10
|
dependencies = [
|
11
11
|
"memchr",
|
12
12
|
]
|
13
13
|
|
14
14
|
[[package]]
|
15
15
|
name = "bindgen"
|
16
|
-
version = "0.69.
|
16
|
+
version = "0.69.5"
|
17
17
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
18
|
-
checksum = "
|
18
|
+
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
|
19
19
|
dependencies = [
|
20
20
|
"bitflags",
|
21
21
|
"cexpr",
|
@@ -28,20 +28,26 @@ dependencies = [
|
|
28
28
|
"regex",
|
29
29
|
"rustc-hash",
|
30
30
|
"shlex",
|
31
|
-
"syn 2.0.
|
31
|
+
"syn 2.0.106",
|
32
32
|
]
|
33
33
|
|
34
34
|
[[package]]
|
35
35
|
name = "bitflags"
|
36
|
-
version = "2.
|
36
|
+
version = "2.9.3"
|
37
37
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
38
|
-
checksum = "
|
38
|
+
checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d"
|
39
|
+
|
40
|
+
[[package]]
|
41
|
+
name = "bumpalo"
|
42
|
+
version = "3.19.0"
|
43
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
44
|
+
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
39
45
|
|
40
46
|
[[package]]
|
41
47
|
name = "bytecount"
|
42
|
-
version = "0.6.
|
48
|
+
version = "0.6.9"
|
43
49
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
44
|
-
checksum = "
|
50
|
+
checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e"
|
45
51
|
|
46
52
|
[[package]]
|
47
53
|
name = "byteorder"
|
@@ -60,15 +66,15 @@ dependencies = [
|
|
60
66
|
|
61
67
|
[[package]]
|
62
68
|
name = "cfg-if"
|
63
|
-
version = "1.0.
|
69
|
+
version = "1.0.3"
|
64
70
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
65
|
-
checksum = "
|
71
|
+
checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
|
66
72
|
|
67
73
|
[[package]]
|
68
74
|
name = "clang-sys"
|
69
|
-
version = "1.
|
75
|
+
version = "1.8.1"
|
70
76
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
71
|
-
checksum = "
|
77
|
+
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
|
72
78
|
dependencies = [
|
73
79
|
"glob",
|
74
80
|
"libc",
|
@@ -77,15 +83,15 @@ dependencies = [
|
|
77
83
|
|
78
84
|
[[package]]
|
79
85
|
name = "either"
|
80
|
-
version = "1.
|
86
|
+
version = "1.15.0"
|
81
87
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
82
|
-
checksum = "
|
88
|
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
83
89
|
|
84
90
|
[[package]]
|
85
91
|
name = "glob"
|
86
|
-
version = "0.3.
|
92
|
+
version = "0.3.3"
|
87
93
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
88
|
-
checksum = "
|
94
|
+
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
89
95
|
|
90
96
|
[[package]]
|
91
97
|
name = "itertools"
|
@@ -96,11 +102,21 @@ dependencies = [
|
|
96
102
|
"either",
|
97
103
|
]
|
98
104
|
|
105
|
+
[[package]]
|
106
|
+
name = "js-sys"
|
107
|
+
version = "0.3.77"
|
108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
109
|
+
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
110
|
+
dependencies = [
|
111
|
+
"once_cell",
|
112
|
+
"wasm-bindgen",
|
113
|
+
]
|
114
|
+
|
99
115
|
[[package]]
|
100
116
|
name = "lazy_static"
|
101
|
-
version = "1.
|
117
|
+
version = "1.5.0"
|
102
118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
103
|
-
checksum = "
|
119
|
+
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
104
120
|
|
105
121
|
[[package]]
|
106
122
|
name = "lazycell"
|
@@ -110,25 +126,31 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
110
126
|
|
111
127
|
[[package]]
|
112
128
|
name = "libc"
|
113
|
-
version = "0.2.
|
129
|
+
version = "0.2.175"
|
114
130
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
115
|
-
checksum = "
|
131
|
+
checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
|
116
132
|
|
117
133
|
[[package]]
|
118
134
|
name = "libloading"
|
119
|
-
version = "0.
|
135
|
+
version = "0.8.8"
|
120
136
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
121
|
-
checksum = "
|
137
|
+
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
|
122
138
|
dependencies = [
|
123
139
|
"cfg-if",
|
124
|
-
"
|
140
|
+
"windows-targets",
|
125
141
|
]
|
126
142
|
|
143
|
+
[[package]]
|
144
|
+
name = "log"
|
145
|
+
version = "0.4.27"
|
146
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
147
|
+
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
148
|
+
|
127
149
|
[[package]]
|
128
150
|
name = "magnus"
|
129
|
-
version = "0.
|
151
|
+
version = "0.8.0"
|
130
152
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
131
|
-
checksum = "
|
153
|
+
checksum = "3f14d3cc31b2dc4fce6cd447a83c7a7ca2ab8a9f1e535dcb2f796ff972b0e68b"
|
132
154
|
dependencies = [
|
133
155
|
"magnus-macros",
|
134
156
|
"rb-sys",
|
@@ -138,20 +160,20 @@ dependencies = [
|
|
138
160
|
|
139
161
|
[[package]]
|
140
162
|
name = "magnus-macros"
|
141
|
-
version = "0.
|
163
|
+
version = "0.8.0"
|
142
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
143
|
-
checksum = "
|
165
|
+
checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
|
144
166
|
dependencies = [
|
145
167
|
"proc-macro2",
|
146
168
|
"quote",
|
147
|
-
"syn 2.0.
|
169
|
+
"syn 2.0.106",
|
148
170
|
]
|
149
171
|
|
150
172
|
[[package]]
|
151
173
|
name = "memchr"
|
152
|
-
version = "2.
|
174
|
+
version = "2.7.5"
|
153
175
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
154
|
-
checksum = "
|
176
|
+
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
155
177
|
|
156
178
|
[[package]]
|
157
179
|
name = "minimal-lexical"
|
@@ -171,9 +193,9 @@ dependencies = [
|
|
171
193
|
|
172
194
|
[[package]]
|
173
195
|
name = "nom-tracable"
|
174
|
-
version = "0.9.
|
196
|
+
version = "0.9.1"
|
175
197
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
176
|
-
checksum = "
|
198
|
+
checksum = "6a39d3ec4e5bc9816ca540bd6b1e4885c0275536eb3293d317d984bb17f9a294"
|
177
199
|
dependencies = [
|
178
200
|
"nom",
|
179
201
|
"nom-tracable-macros",
|
@@ -182,9 +204,9 @@ dependencies = [
|
|
182
204
|
|
183
205
|
[[package]]
|
184
206
|
name = "nom-tracable-macros"
|
185
|
-
version = "0.9.
|
207
|
+
version = "0.9.1"
|
186
208
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
187
|
-
checksum = "
|
209
|
+
checksum = "c9c68f5316254dae193b3ce083f6caf19ae1a58471e6585e89f0796b9e5bdf4a"
|
188
210
|
dependencies = [
|
189
211
|
"quote",
|
190
212
|
"syn 1.0.109",
|
@@ -201,38 +223,44 @@ dependencies = [
|
|
201
223
|
"nom",
|
202
224
|
]
|
203
225
|
|
226
|
+
[[package]]
|
227
|
+
name = "once_cell"
|
228
|
+
version = "1.21.3"
|
229
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
230
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
231
|
+
|
204
232
|
[[package]]
|
205
233
|
name = "proc-macro2"
|
206
|
-
version = "1.0.
|
234
|
+
version = "1.0.101"
|
207
235
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
208
|
-
checksum = "
|
236
|
+
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
|
209
237
|
dependencies = [
|
210
238
|
"unicode-ident",
|
211
239
|
]
|
212
240
|
|
213
241
|
[[package]]
|
214
242
|
name = "quote"
|
215
|
-
version = "1.0.
|
243
|
+
version = "1.0.40"
|
216
244
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
217
|
-
checksum = "
|
245
|
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
218
246
|
dependencies = [
|
219
247
|
"proc-macro2",
|
220
248
|
]
|
221
249
|
|
222
250
|
[[package]]
|
223
251
|
name = "rb-sys"
|
224
|
-
version = "0.9.
|
252
|
+
version = "0.9.117"
|
225
253
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
226
|
-
checksum = "
|
254
|
+
checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
|
227
255
|
dependencies = [
|
228
256
|
"rb-sys-build",
|
229
257
|
]
|
230
258
|
|
231
259
|
[[package]]
|
232
260
|
name = "rb-sys-build"
|
233
|
-
version = "0.9.
|
261
|
+
version = "0.9.117"
|
234
262
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
235
|
-
checksum = "
|
263
|
+
checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
|
236
264
|
dependencies = [
|
237
265
|
"bindgen",
|
238
266
|
"lazy_static",
|
@@ -240,20 +268,20 @@ dependencies = [
|
|
240
268
|
"quote",
|
241
269
|
"regex",
|
242
270
|
"shell-words",
|
243
|
-
"syn 2.0.
|
271
|
+
"syn 2.0.106",
|
244
272
|
]
|
245
273
|
|
246
274
|
[[package]]
|
247
275
|
name = "rb-sys-env"
|
248
|
-
version = "0.
|
276
|
+
version = "0.2.2"
|
249
277
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
250
|
-
checksum = "
|
278
|
+
checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
|
251
279
|
|
252
280
|
[[package]]
|
253
281
|
name = "regex"
|
254
|
-
version = "1.
|
282
|
+
version = "1.11.2"
|
255
283
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
256
|
-
checksum = "
|
284
|
+
checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
|
257
285
|
dependencies = [
|
258
286
|
"aho-corasick",
|
259
287
|
"memchr",
|
@@ -263,9 +291,9 @@ dependencies = [
|
|
263
291
|
|
264
292
|
[[package]]
|
265
293
|
name = "regex-automata"
|
266
|
-
version = "0.4.
|
294
|
+
version = "0.4.10"
|
267
295
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
268
|
-
checksum = "
|
296
|
+
checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
|
269
297
|
dependencies = [
|
270
298
|
"aho-corasick",
|
271
299
|
"memchr",
|
@@ -274,9 +302,9 @@ dependencies = [
|
|
274
302
|
|
275
303
|
[[package]]
|
276
304
|
name = "regex-syntax"
|
277
|
-
version = "0.8.
|
305
|
+
version = "0.8.6"
|
278
306
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
279
|
-
checksum = "
|
307
|
+
checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
|
280
308
|
|
281
309
|
[[package]]
|
282
310
|
name = "rustc-hash"
|
@@ -284,36 +312,42 @@ version = "1.1.0"
|
|
284
312
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
285
313
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
286
314
|
|
315
|
+
[[package]]
|
316
|
+
name = "rustversion"
|
317
|
+
version = "1.0.22"
|
318
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
319
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
320
|
+
|
287
321
|
[[package]]
|
288
322
|
name = "seq-macro"
|
289
|
-
version = "0.3.
|
323
|
+
version = "0.3.6"
|
290
324
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
291
|
-
checksum = "
|
325
|
+
checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
|
292
326
|
|
293
327
|
[[package]]
|
294
328
|
name = "serde"
|
295
|
-
version = "1.0.
|
329
|
+
version = "1.0.219"
|
296
330
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
297
|
-
checksum = "
|
331
|
+
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
|
298
332
|
dependencies = [
|
299
333
|
"serde_derive",
|
300
334
|
]
|
301
335
|
|
302
336
|
[[package]]
|
303
337
|
name = "serde_derive"
|
304
|
-
version = "1.0.
|
338
|
+
version = "1.0.219"
|
305
339
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
306
|
-
checksum = "
|
340
|
+
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
|
307
341
|
dependencies = [
|
308
342
|
"proc-macro2",
|
309
343
|
"quote",
|
310
|
-
"syn
|
344
|
+
"syn 2.0.106",
|
311
345
|
]
|
312
346
|
|
313
347
|
[[package]]
|
314
348
|
name = "serde_magnus"
|
315
|
-
version = "0.
|
316
|
-
source = "git+https://github.com/ryantaylor/serde-magnus.git?branch=
|
349
|
+
version = "0.9.0"
|
350
|
+
source = "git+https://github.com/ryantaylor/serde-magnus.git?branch=magnus-8#e056a3ae0fd11958e537dbd85e63f8339052f31b"
|
317
351
|
dependencies = [
|
318
352
|
"magnus",
|
319
353
|
"serde",
|
@@ -345,9 +379,9 @@ dependencies = [
|
|
345
379
|
|
346
380
|
[[package]]
|
347
381
|
name = "syn"
|
348
|
-
version = "2.0.
|
382
|
+
version = "2.0.106"
|
349
383
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
350
|
-
checksum = "
|
384
|
+
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
351
385
|
dependencies = [
|
352
386
|
"proc-macro2",
|
353
387
|
"quote",
|
@@ -362,24 +396,26 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|
362
396
|
|
363
397
|
[[package]]
|
364
398
|
name = "unicode-ident"
|
365
|
-
version = "1.0.
|
399
|
+
version = "1.0.18"
|
366
400
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
367
|
-
checksum = "
|
401
|
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
368
402
|
|
369
403
|
[[package]]
|
370
404
|
name = "uuid"
|
371
|
-
version = "1.
|
405
|
+
version = "1.18.0"
|
372
406
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
373
|
-
checksum = "
|
407
|
+
checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be"
|
374
408
|
dependencies = [
|
409
|
+
"js-sys",
|
375
410
|
"serde",
|
411
|
+
"wasm-bindgen",
|
376
412
|
]
|
377
413
|
|
378
414
|
[[package]]
|
379
415
|
name = "vault"
|
380
|
-
version = "10.
|
416
|
+
version = "10.2.0"
|
381
417
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
382
|
-
checksum = "
|
418
|
+
checksum = "746d7814ee13975d8eb857ac881c34058aa802eae8065024bc92b7762e6d18b6"
|
383
419
|
dependencies = [
|
384
420
|
"byteorder",
|
385
421
|
"magnus",
|
@@ -400,23 +436,130 @@ dependencies = [
|
|
400
436
|
]
|
401
437
|
|
402
438
|
[[package]]
|
403
|
-
name = "
|
404
|
-
version = "0.
|
439
|
+
name = "wasm-bindgen"
|
440
|
+
version = "0.2.100"
|
405
441
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
406
|
-
checksum = "
|
442
|
+
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
407
443
|
dependencies = [
|
408
|
-
"
|
409
|
-
"
|
444
|
+
"cfg-if",
|
445
|
+
"once_cell",
|
446
|
+
"rustversion",
|
447
|
+
"wasm-bindgen-macro",
|
410
448
|
]
|
411
449
|
|
412
450
|
[[package]]
|
413
|
-
name = "
|
414
|
-
version = "0.
|
451
|
+
name = "wasm-bindgen-backend"
|
452
|
+
version = "0.2.100"
|
453
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
454
|
+
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
455
|
+
dependencies = [
|
456
|
+
"bumpalo",
|
457
|
+
"log",
|
458
|
+
"proc-macro2",
|
459
|
+
"quote",
|
460
|
+
"syn 2.0.106",
|
461
|
+
"wasm-bindgen-shared",
|
462
|
+
]
|
463
|
+
|
464
|
+
[[package]]
|
465
|
+
name = "wasm-bindgen-macro"
|
466
|
+
version = "0.2.100"
|
467
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
468
|
+
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
469
|
+
dependencies = [
|
470
|
+
"quote",
|
471
|
+
"wasm-bindgen-macro-support",
|
472
|
+
]
|
473
|
+
|
474
|
+
[[package]]
|
475
|
+
name = "wasm-bindgen-macro-support"
|
476
|
+
version = "0.2.100"
|
477
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
478
|
+
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
479
|
+
dependencies = [
|
480
|
+
"proc-macro2",
|
481
|
+
"quote",
|
482
|
+
"syn 2.0.106",
|
483
|
+
"wasm-bindgen-backend",
|
484
|
+
"wasm-bindgen-shared",
|
485
|
+
]
|
486
|
+
|
487
|
+
[[package]]
|
488
|
+
name = "wasm-bindgen-shared"
|
489
|
+
version = "0.2.100"
|
490
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
491
|
+
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
492
|
+
dependencies = [
|
493
|
+
"unicode-ident",
|
494
|
+
]
|
495
|
+
|
496
|
+
[[package]]
|
497
|
+
name = "windows-link"
|
498
|
+
version = "0.1.3"
|
499
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
500
|
+
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
|
501
|
+
|
502
|
+
[[package]]
|
503
|
+
name = "windows-targets"
|
504
|
+
version = "0.53.3"
|
505
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
506
|
+
checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
|
507
|
+
dependencies = [
|
508
|
+
"windows-link",
|
509
|
+
"windows_aarch64_gnullvm",
|
510
|
+
"windows_aarch64_msvc",
|
511
|
+
"windows_i686_gnu",
|
512
|
+
"windows_i686_gnullvm",
|
513
|
+
"windows_i686_msvc",
|
514
|
+
"windows_x86_64_gnu",
|
515
|
+
"windows_x86_64_gnullvm",
|
516
|
+
"windows_x86_64_msvc",
|
517
|
+
]
|
518
|
+
|
519
|
+
[[package]]
|
520
|
+
name = "windows_aarch64_gnullvm"
|
521
|
+
version = "0.53.0"
|
522
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
523
|
+
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
|
524
|
+
|
525
|
+
[[package]]
|
526
|
+
name = "windows_aarch64_msvc"
|
527
|
+
version = "0.53.0"
|
528
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
529
|
+
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
|
530
|
+
|
531
|
+
[[package]]
|
532
|
+
name = "windows_i686_gnu"
|
533
|
+
version = "0.53.0"
|
534
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
535
|
+
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
|
536
|
+
|
537
|
+
[[package]]
|
538
|
+
name = "windows_i686_gnullvm"
|
539
|
+
version = "0.53.0"
|
540
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
541
|
+
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
|
542
|
+
|
543
|
+
[[package]]
|
544
|
+
name = "windows_i686_msvc"
|
545
|
+
version = "0.53.0"
|
546
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
547
|
+
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
|
548
|
+
|
549
|
+
[[package]]
|
550
|
+
name = "windows_x86_64_gnu"
|
551
|
+
version = "0.53.0"
|
552
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
553
|
+
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
|
554
|
+
|
555
|
+
[[package]]
|
556
|
+
name = "windows_x86_64_gnullvm"
|
557
|
+
version = "0.53.0"
|
415
558
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
416
|
-
checksum = "
|
559
|
+
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
|
417
560
|
|
418
561
|
[[package]]
|
419
|
-
name = "
|
420
|
-
version = "0.
|
562
|
+
name = "windows_x86_64_msvc"
|
563
|
+
version = "0.53.0"
|
421
564
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
422
|
-
checksum = "
|
565
|
+
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
|
data/Gemfile
CHANGED
@@ -5,13 +5,13 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in vault_coh.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'rake', '~> 13.
|
8
|
+
gem 'rake', '~> 13.3'
|
9
9
|
|
10
10
|
gem 'rake-compiler'
|
11
11
|
gem 'rb_sys'
|
12
12
|
|
13
13
|
gem 'rspec', '~> 3.13'
|
14
14
|
|
15
|
-
gem 'rubocop', '~> 1.
|
15
|
+
gem 'rubocop', '~> 1.79'
|
16
16
|
gem 'rubocop-rake'
|
17
17
|
gem 'rubocop-rspec'
|
data/Gemfile.lock
CHANGED
@@ -1,57 +1,67 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vault_coh (6.
|
4
|
+
vault_coh (6.3.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
diff-lcs (1.
|
11
|
-
json (2.
|
12
|
-
language_server-protocol (3.17.0.
|
13
|
-
|
14
|
-
|
9
|
+
ast (2.4.3)
|
10
|
+
diff-lcs (1.6.2)
|
11
|
+
json (2.13.2)
|
12
|
+
language_server-protocol (3.17.0.5)
|
13
|
+
lint_roller (1.1.0)
|
14
|
+
parallel (1.27.0)
|
15
|
+
parser (3.3.9.0)
|
15
16
|
ast (~> 2.4.1)
|
16
17
|
racc
|
18
|
+
prism (1.4.0)
|
17
19
|
racc (1.8.1)
|
18
20
|
rainbow (3.1.1)
|
19
|
-
rake (13.
|
20
|
-
rake-compiler (1.
|
21
|
+
rake (13.3.0)
|
22
|
+
rake-compiler (1.3.0)
|
21
23
|
rake
|
22
|
-
|
23
|
-
|
24
|
-
|
24
|
+
rake-compiler-dock (1.9.1)
|
25
|
+
rb_sys (0.9.117)
|
26
|
+
rake-compiler-dock (= 1.9.1)
|
27
|
+
regexp_parser (2.11.2)
|
28
|
+
rspec (3.13.1)
|
25
29
|
rspec-core (~> 3.13.0)
|
26
30
|
rspec-expectations (~> 3.13.0)
|
27
31
|
rspec-mocks (~> 3.13.0)
|
28
|
-
rspec-core (3.13.
|
32
|
+
rspec-core (3.13.5)
|
29
33
|
rspec-support (~> 3.13.0)
|
30
|
-
rspec-expectations (3.13.
|
34
|
+
rspec-expectations (3.13.5)
|
31
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
32
36
|
rspec-support (~> 3.13.0)
|
33
|
-
rspec-mocks (3.13.
|
37
|
+
rspec-mocks (3.13.5)
|
34
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
39
|
rspec-support (~> 3.13.0)
|
36
|
-
rspec-support (3.13.
|
37
|
-
rubocop (1.
|
40
|
+
rspec-support (3.13.5)
|
41
|
+
rubocop (1.79.2)
|
38
42
|
json (~> 2.3)
|
39
|
-
language_server-protocol (
|
43
|
+
language_server-protocol (~> 3.17.0.2)
|
44
|
+
lint_roller (~> 1.1.0)
|
40
45
|
parallel (~> 1.10)
|
41
46
|
parser (>= 3.3.0.2)
|
42
47
|
rainbow (>= 2.2.2, < 4.0)
|
43
|
-
regexp_parser (>= 2.
|
44
|
-
rubocop-ast (>= 1.
|
48
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
49
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
45
50
|
ruby-progressbar (~> 1.7)
|
46
|
-
unicode-display_width (>= 2.4.0, <
|
47
|
-
rubocop-ast (1.
|
48
|
-
parser (>= 3.3.
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
rubocop (
|
51
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
52
|
+
rubocop-ast (1.46.0)
|
53
|
+
parser (>= 3.3.7.2)
|
54
|
+
prism (~> 1.4)
|
55
|
+
rubocop-rake (0.7.1)
|
56
|
+
lint_roller (~> 1.1)
|
57
|
+
rubocop (>= 1.72.1)
|
58
|
+
rubocop-rspec (3.6.0)
|
59
|
+
lint_roller (~> 1.1)
|
60
|
+
rubocop (~> 1.72, >= 1.72.1)
|
53
61
|
ruby-progressbar (1.13.0)
|
54
|
-
unicode-display_width (
|
62
|
+
unicode-display_width (3.1.5)
|
63
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
64
|
+
unicode-emoji (4.0.4)
|
55
65
|
|
56
66
|
PLATFORMS
|
57
67
|
arm64-darwin-21
|
@@ -59,14 +69,14 @@ PLATFORMS
|
|
59
69
|
x86_64-linux
|
60
70
|
|
61
71
|
DEPENDENCIES
|
62
|
-
rake (~> 13.
|
72
|
+
rake (~> 13.3)
|
63
73
|
rake-compiler
|
64
74
|
rb_sys
|
65
75
|
rspec (~> 3.13)
|
66
|
-
rubocop (~> 1.
|
76
|
+
rubocop (~> 1.79)
|
67
77
|
rubocop-rake
|
68
78
|
rubocop-rspec
|
69
79
|
vault_coh!
|
70
80
|
|
71
81
|
BUNDLED WITH
|
72
|
-
2.5.
|
82
|
+
2.5.20
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Vault
|
2
2
|
|
3
|
-
[](https://badge.fury.io/rb/vault_coh) [](https://rubydoc.info/github/ryantaylor/vault-rb/v6.
|
3
|
+
[](https://badge.fury.io/rb/vault_coh) [](https://rubydoc.info/github/ryantaylor/vault-rb/v6.3.0)
|
4
4
|
|
5
5
|
A native Ruby client wrapper for the [vault](https://github.com/ryantaylor/vault) Company of Heroes replay parser, integrated via a Rust native extension.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
First, make sure you have a relatively recent version of the Rust toolchain installed (minimum supported Rust version for `vault` is 1.
|
9
|
+
First, make sure you have a relatively recent version of the Rust toolchain installed (minimum supported Rust version for `vault` is 1.78.0). You can install Rust easily using [rustup](https://rustup.rs/).
|
10
10
|
|
11
11
|
Then you can add to Gemfile:
|
12
12
|
```
|
@@ -24,7 +24,7 @@ bytes = File.read('/path/to/replay.rec').unpack('C*')
|
|
24
24
|
replay = VaultCoh::Replay.from_bytes(bytes)
|
25
25
|
puts replay.version
|
26
26
|
```
|
27
|
-
All information available from parsing can be found in the [documentation](https://rubydoc.info/github/ryantaylor/vault-rb/v6.
|
27
|
+
All information available from parsing can be found in the [documentation](https://rubydoc.info/github/ryantaylor/vault-rb/v6.3.0).
|
28
28
|
|
29
29
|
## Contributing
|
30
30
|
|
data/ext/vault_coh/Cargo.toml
CHANGED
@@ -10,6 +10,6 @@ publish = false
|
|
10
10
|
crate-type = ["cdylib"]
|
11
11
|
|
12
12
|
[dependencies]
|
13
|
-
magnus = { version = "0.
|
14
|
-
serde_magnus = { git = "https://github.com/ryantaylor/serde-magnus.git", branch = "
|
13
|
+
magnus = { version = "0.8" }
|
14
|
+
serde_magnus = { git = "https://github.com/ryantaylor/serde-magnus.git", branch = "magnus-8" }
|
15
15
|
vault = { version = "10", features = ["magnus", "serde"] }
|
data/ext/vault_coh/src/hash.rs
CHANGED
@@ -1,138 +1,144 @@
|
|
1
|
-
use magnus::{value::ReprValue, RHash,
|
1
|
+
use magnus::{value::ReprValue, RHash, Ruby, Value};
|
2
2
|
use vault::{Command, Map, Message, Player, Replay};
|
3
3
|
|
4
4
|
pub trait HashExt {
|
5
|
-
fn to_h(&
|
5
|
+
fn to_h(ruby: &Ruby, rb_self: &Self) -> Value;
|
6
6
|
}
|
7
7
|
|
8
8
|
impl HashExt for Replay {
|
9
|
-
fn to_h(&
|
10
|
-
serde_magnus::serialize(
|
9
|
+
fn to_h(_ruby: &Ruby, rb_self: &Self) -> Value {
|
10
|
+
serde_magnus::serialize(rb_self).unwrap()
|
11
11
|
}
|
12
12
|
}
|
13
13
|
|
14
14
|
impl HashExt for Map {
|
15
|
-
fn to_h(&
|
16
|
-
serde_magnus::serialize(
|
15
|
+
fn to_h(_ruby: &Ruby, rb_self: &Self) -> Value {
|
16
|
+
serde_magnus::serialize(rb_self).unwrap()
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
20
20
|
impl HashExt for Player {
|
21
|
-
fn to_h(&
|
22
|
-
serde_magnus::serialize(
|
21
|
+
fn to_h(_ruby: &Ruby, rb_self: &Self) -> Value {
|
22
|
+
serde_magnus::serialize(rb_self).unwrap()
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
26
|
impl HashExt for Message {
|
27
|
-
fn to_h(&
|
28
|
-
serde_magnus::serialize(
|
27
|
+
fn to_h(_ruby: &Ruby, rb_self: &Self) -> Value {
|
28
|
+
serde_magnus::serialize(rb_self).unwrap()
|
29
29
|
}
|
30
30
|
}
|
31
31
|
|
32
32
|
impl HashExt for Command {
|
33
|
-
fn to_h(&
|
34
|
-
match
|
33
|
+
fn to_h(ruby: &Ruby, rb_self: &Self) -> Value {
|
34
|
+
match rb_self {
|
35
35
|
Command::AITakeover(data) => {
|
36
36
|
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
37
|
-
hash.aset(
|
37
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("AITakeover"))
|
38
38
|
.unwrap();
|
39
|
-
hash.aset(
|
39
|
+
hash.aset(ruby.to_symbol("action_type"), ruby.str_new("PCMD_AIPlayer"))
|
40
40
|
.unwrap();
|
41
41
|
hash.as_value()
|
42
42
|
}
|
43
43
|
Command::BuildGlobalUpgrade(data) => {
|
44
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
45
|
-
hash.aset(
|
44
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
45
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("BuildGlobalUpgrade"))
|
46
46
|
.unwrap();
|
47
|
-
hash.aset(
|
47
|
+
hash.aset(ruby.to_symbol("action_type"), ruby.str_new("CMD_Upgrade"))
|
48
48
|
.unwrap();
|
49
49
|
hash.as_value()
|
50
50
|
}
|
51
51
|
Command::BuildSquad(data) => {
|
52
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
53
|
-
hash.aset(
|
54
|
-
.unwrap();
|
55
|
-
hash.aset(Symbol::new("action_type"), RString::new("CMD_BuildSquad"))
|
52
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
53
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("BuildSquad"))
|
56
54
|
.unwrap();
|
55
|
+
hash.aset(
|
56
|
+
ruby.to_symbol("action_type"),
|
57
|
+
ruby.str_new("CMD_BuildSquad"),
|
58
|
+
)
|
59
|
+
.unwrap();
|
57
60
|
hash.as_value()
|
58
61
|
}
|
59
62
|
Command::CancelConstruction(data) => {
|
60
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
61
|
-
hash.aset(
|
63
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
64
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("CancelConstruction"))
|
62
65
|
.unwrap();
|
63
66
|
hash.aset(
|
64
|
-
|
65
|
-
|
67
|
+
ruby.to_symbol("action_type"),
|
68
|
+
ruby.str_new("CMD_CancelConstruction"),
|
66
69
|
)
|
67
70
|
.unwrap();
|
68
71
|
hash.as_value()
|
69
72
|
}
|
70
73
|
Command::CancelProduction(data) => {
|
71
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
72
|
-
hash.aset(
|
74
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
75
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("CancelProduction"))
|
73
76
|
.unwrap();
|
74
77
|
hash.aset(
|
75
|
-
|
76
|
-
|
78
|
+
ruby.to_symbol("action_type"),
|
79
|
+
ruby.str_new("CMD_CancelProduction"),
|
77
80
|
)
|
78
81
|
.unwrap();
|
79
82
|
hash.as_value()
|
80
83
|
}
|
81
84
|
Command::ConstructEntity(data) => {
|
82
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
83
|
-
hash.aset(
|
85
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
86
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("ConstructEntity"))
|
84
87
|
.unwrap();
|
85
88
|
hash.aset(
|
86
|
-
|
87
|
-
|
89
|
+
ruby.to_symbol("action_type"),
|
90
|
+
ruby.str_new("PCMD_PlaceAndConstructEntities"),
|
88
91
|
)
|
89
92
|
.unwrap();
|
90
93
|
hash.as_value()
|
91
94
|
}
|
92
95
|
Command::SelectBattlegroup(data) => {
|
93
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
94
|
-
hash.aset(
|
96
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
97
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("SelectBattlegroup"))
|
95
98
|
.unwrap();
|
96
99
|
hash.aset(
|
97
|
-
|
98
|
-
|
100
|
+
ruby.to_symbol("action_type"),
|
101
|
+
ruby.str_new("PCMD_InstantUpgrade"),
|
99
102
|
)
|
100
103
|
.unwrap();
|
101
104
|
hash.as_value()
|
102
105
|
}
|
103
106
|
Command::SelectBattlegroupAbility(data) => {
|
104
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
107
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
105
108
|
hash.aset(
|
106
|
-
|
107
|
-
|
109
|
+
ruby.to_symbol("type"),
|
110
|
+
ruby.str_new("SelectBattlegroupAbility"),
|
108
111
|
)
|
109
112
|
.unwrap();
|
110
113
|
hash.aset(
|
111
|
-
|
112
|
-
|
114
|
+
ruby.to_symbol("action_type"),
|
115
|
+
ruby.str_new("PCMD_TentativeUpgrade"),
|
113
116
|
)
|
114
117
|
.unwrap();
|
115
118
|
hash.as_value()
|
116
119
|
}
|
117
120
|
Command::Unknown(data) => {
|
118
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
119
|
-
hash.aset(
|
121
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
122
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("Unknown"))
|
120
123
|
.unwrap();
|
121
124
|
hash.as_value()
|
122
125
|
}
|
123
126
|
Command::UseAbility(data) => {
|
124
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
125
|
-
hash.aset(
|
127
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
128
|
+
hash.aset(ruby.to_symbol("type"), ruby.str_new("UseAbility"))
|
126
129
|
.unwrap();
|
127
|
-
hash.aset(
|
130
|
+
hash.aset(ruby.to_symbol("action_type"), ruby.str_new("CMD_Ability"))
|
128
131
|
.unwrap();
|
129
132
|
hash.as_value()
|
130
133
|
}
|
131
134
|
Command::UseBattlegroupAbility(data) => {
|
132
|
-
let hash: RHash = serde_magnus::serialize(data).unwrap();
|
133
|
-
hash.aset(
|
134
|
-
.
|
135
|
-
|
135
|
+
let hash: RHash = serde_magnus::serialize(&data).unwrap();
|
136
|
+
hash.aset(
|
137
|
+
ruby.to_symbol("type"),
|
138
|
+
ruby.str_new("UseBattlegroupAbility"),
|
139
|
+
)
|
140
|
+
.unwrap();
|
141
|
+
hash.aset(ruby.to_symbol("action_type"), ruby.str_new("PCMD_Ability"))
|
136
142
|
.unwrap();
|
137
143
|
hash.as_value()
|
138
144
|
}
|
data/ext/vault_coh/src/lib.rs
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
mod hash;
|
2
2
|
|
3
3
|
use crate::hash::HashExt;
|
4
|
-
use magnus::{
|
4
|
+
use magnus::{function, method, prelude::*, Error, Ruby};
|
5
5
|
use vault::{Command, Map, Message, Player, Replay};
|
6
6
|
|
7
7
|
#[magnus::init]
|
8
|
-
fn init() -> Result<(), Error> {
|
9
|
-
let module = define_module("VaultCoh")?;
|
8
|
+
fn init(ruby: &Ruby) -> Result<(), Error> {
|
9
|
+
let module = ruby.define_module("VaultCoh")?;
|
10
10
|
|
11
|
-
let replay = module.define_class("Replay",
|
11
|
+
let replay = module.define_class("Replay", ruby.class_object())?;
|
12
12
|
replay.define_singleton_method("from_bytes", function!(from_bytes, 1))?;
|
13
13
|
replay.define_method("version", method!(Replay::version, 0))?;
|
14
14
|
replay.define_method("timestamp", method!(Replay::timestamp, 0))?;
|
@@ -29,7 +29,7 @@ fn init() -> Result<(), Error> {
|
|
29
29
|
replay.define_method("length", method!(Replay::length, 0))?;
|
30
30
|
replay.define_method("to_h", method!(Replay::to_h, 0))?;
|
31
31
|
|
32
|
-
let map = module.define_class("Map",
|
32
|
+
let map = module.define_class("Map", ruby.class_object())?;
|
33
33
|
map.define_method("filename", method!(Map::filename, 0))?;
|
34
34
|
map.define_method("localized_name_id", method!(Map::localized_name_id, 0))?;
|
35
35
|
map.define_method(
|
@@ -38,7 +38,7 @@ fn init() -> Result<(), Error> {
|
|
38
38
|
)?;
|
39
39
|
map.define_method("to_h", method!(Map::to_h, 0))?;
|
40
40
|
|
41
|
-
let player = module.define_class("Player",
|
41
|
+
let player = module.define_class("Player", ruby.class_object())?;
|
42
42
|
player.define_method("name", method!(Player::name, 0))?;
|
43
43
|
player.define_method("human?", method!(Player::human, 0))?;
|
44
44
|
player.define_method("faction", method!(faction_string, 0))?;
|
@@ -55,20 +55,20 @@ fn init() -> Result<(), Error> {
|
|
55
55
|
)?;
|
56
56
|
player.define_method("to_h", method!(Player::to_h, 0))?;
|
57
57
|
|
58
|
-
let message = module.define_class("Message",
|
58
|
+
let message = module.define_class("Message", ruby.class_object())?;
|
59
59
|
message.define_method("tick", method!(Message::tick, 0))?;
|
60
60
|
message.define_method("message", method!(Message::message, 0))?;
|
61
61
|
message.define_method("to_h", method!(Message::to_h, 0))?;
|
62
62
|
|
63
|
-
let command = module.define_class("Command",
|
63
|
+
let command = module.define_class("Command", ruby.class_object())?;
|
64
64
|
command.define_method("to_h", method!(Command::to_h, 0))?;
|
65
65
|
|
66
66
|
Ok(())
|
67
67
|
}
|
68
68
|
|
69
|
-
fn from_bytes(input: Vec<u8>) -> Result<Replay, Error> {
|
69
|
+
fn from_bytes(ruby: &Ruby, input: Vec<u8>) -> Result<Replay, Error> {
|
70
70
|
Replay::from_bytes(&input)
|
71
|
-
.map_err(|err| Error::new(
|
71
|
+
.map_err(|err| Error::new(ruby.exception_runtime_error(), err.to_string()))
|
72
72
|
}
|
73
73
|
|
74
74
|
fn mod_uuid_string(rb_self: &Replay) -> String {
|
data/lib/vault_coh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vault_coh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryantaylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Company of Heroes replay parsing in Ruby using the vault parsing library
|
14
14
|
via a Rust native extension.
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: 3.3.11
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.5.
|
72
|
+
rubygems_version: 3.5.22
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: CoH3 replay parsing in Ruby with Rust
|