@smbcloud / cli / commits / bdf2aeb

add smbcloud-model gem

Seto Elkahfi committed May 31, 2025 at 18:32 UTC bdf2aebdba41455752293fafdf55a2351e695c82
18 files changed +981
gems/model/.gitignore new
+14
@@ -0,0 +1,14 @@
1 +/.bundle/
2 +/.yardoc
3 +/_yardoc/
4 +/coverage/
5 +/doc/
6 +/pkg/
7 +/spec/reports/
8 +/tmp/
9 +*.bundle
10 +*.so
11 +*.o
12 +*.a
13 +mkmf.log
14 +target/
gems/model/.ruby-version new
+1
@@ -0,0 +1 @@
1 +3.4.2
\ No newline at end of file
gems/model/CHANGELOG.md
gems/model/Cargo.lock new
+754
@@ -0,0 +1,754 @@
1 +# This file is automatically @generated by Cargo.
2 +# It is not intended for manual editing.
3 +version = 4
4 +
5 +[[package]]
6 +name = "aho-corasick"
7 +version = "1.1.3"
8 +source = "registry+https://github.com/rust-lang/crates.io-index"
9 +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
10 +dependencies = [
11 + "memchr",
12 +]
13 +
14 +[[package]]
15 +name = "android-tzdata"
16 +version = "0.1.1"
17 +source = "registry+https://github.com/rust-lang/crates.io-index"
18 +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
19 +
20 +[[package]]
21 +name = "android_system_properties"
22 +version = "0.1.5"
23 +source = "registry+https://github.com/rust-lang/crates.io-index"
24 +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
25 +dependencies = [
26 + "libc",
27 +]
28 +
29 +[[package]]
30 +name = "autocfg"
31 +version = "1.4.0"
32 +source = "registry+https://github.com/rust-lang/crates.io-index"
33 +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
34 +
35 +[[package]]
36 +name = "bindgen"
37 +version = "0.69.5"
38 +source = "registry+https://github.com/rust-lang/crates.io-index"
39 +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
40 +dependencies = [
41 + "bitflags",
42 + "cexpr",
43 + "clang-sys",
44 + "itertools",
45 + "lazy_static",
46 + "lazycell",
47 + "proc-macro2",
48 + "quote",
49 + "regex",
50 + "rustc-hash",
51 + "shlex",
52 + "syn 2.0.101",
53 +]
54 +
55 +[[package]]
56 +name = "bitflags"
57 +version = "2.9.1"
58 +source = "registry+https://github.com/rust-lang/crates.io-index"
59 +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
60 +
61 +[[package]]
62 +name = "bumpalo"
63 +version = "3.17.0"
64 +source = "registry+https://github.com/rust-lang/crates.io-index"
65 +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
66 +
67 +[[package]]
68 +name = "cc"
69 +version = "1.2.24"
70 +source = "registry+https://github.com/rust-lang/crates.io-index"
71 +checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7"
72 +dependencies = [
73 + "shlex",
74 +]
75 +
76 +[[package]]
77 +name = "cexpr"
78 +version = "0.6.0"
79 +source = "registry+https://github.com/rust-lang/crates.io-index"
80 +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
81 +dependencies = [
82 + "nom",
83 +]
84 +
85 +[[package]]
86 +name = "cfg-if"
87 +version = "1.0.0"
88 +source = "registry+https://github.com/rust-lang/crates.io-index"
89 +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
90 +
91 +[[package]]
92 +name = "chrono"
93 +version = "0.4.41"
94 +source = "registry+https://github.com/rust-lang/crates.io-index"
95 +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
96 +dependencies = [
97 + "android-tzdata",
98 + "iana-time-zone",
99 + "js-sys",
100 + "num-traits",
101 + "serde",
102 + "wasm-bindgen",
103 + "windows-link",
104 +]
105 +
106 +[[package]]
107 +name = "clang-sys"
108 +version = "1.8.1"
109 +source = "registry+https://github.com/rust-lang/crates.io-index"
110 +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
111 +dependencies = [
112 + "glob",
113 + "libc",
114 + "libloading",
115 +]
116 +
117 +[[package]]
118 +name = "core-foundation-sys"
119 +version = "0.8.7"
120 +source = "registry+https://github.com/rust-lang/crates.io-index"
121 +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
122 +
123 +[[package]]
124 +name = "either"
125 +version = "1.15.0"
126 +source = "registry+https://github.com/rust-lang/crates.io-index"
127 +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
128 +
129 +[[package]]
130 +name = "glob"
131 +version = "0.3.2"
132 +source = "registry+https://github.com/rust-lang/crates.io-index"
133 +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
134 +
135 +[[package]]
136 +name = "heck"
137 +version = "0.4.1"
138 +source = "registry+https://github.com/rust-lang/crates.io-index"
139 +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
140 +
141 +[[package]]
142 +name = "heck"
143 +version = "0.5.0"
144 +source = "registry+https://github.com/rust-lang/crates.io-index"
145 +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
146 +
147 +[[package]]
148 +name = "iana-time-zone"
149 +version = "0.1.63"
150 +source = "registry+https://github.com/rust-lang/crates.io-index"
151 +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
152 +dependencies = [
153 + "android_system_properties",
154 + "core-foundation-sys",
155 + "iana-time-zone-haiku",
156 + "js-sys",
157 + "log",
158 + "wasm-bindgen",
159 + "windows-core",
160 +]
161 +
162 +[[package]]
163 +name = "iana-time-zone-haiku"
164 +version = "0.1.2"
165 +source = "registry+https://github.com/rust-lang/crates.io-index"
166 +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
167 +dependencies = [
168 + "cc",
169 +]
170 +
171 +[[package]]
172 +name = "itertools"
173 +version = "0.12.1"
174 +source = "registry+https://github.com/rust-lang/crates.io-index"
175 +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
176 +dependencies = [
177 + "either",
178 +]
179 +
180 +[[package]]
181 +name = "itoa"
182 +version = "1.0.15"
183 +source = "registry+https://github.com/rust-lang/crates.io-index"
184 +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
185 +
186 +[[package]]
187 +name = "js-sys"
188 +version = "0.3.77"
189 +source = "registry+https://github.com/rust-lang/crates.io-index"
190 +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
191 +dependencies = [
192 + "once_cell",
193 + "wasm-bindgen",
194 +]
195 +
196 +[[package]]
197 +name = "lazy_static"
198 +version = "1.5.0"
199 +source = "registry+https://github.com/rust-lang/crates.io-index"
200 +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
201 +
202 +[[package]]
203 +name = "lazycell"
204 +version = "1.3.0"
205 +source = "registry+https://github.com/rust-lang/crates.io-index"
206 +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
207 +
208 +[[package]]
209 +name = "libc"
210 +version = "0.2.172"
211 +source = "registry+https://github.com/rust-lang/crates.io-index"
212 +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
213 +
214 +[[package]]
215 +name = "libloading"
216 +version = "0.8.8"
217 +source = "registry+https://github.com/rust-lang/crates.io-index"
218 +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
219 +dependencies = [
220 + "cfg-if",
221 + "windows-targets",
222 +]
223 +
224 +[[package]]
225 +name = "log"
226 +version = "0.4.27"
227 +source = "registry+https://github.com/rust-lang/crates.io-index"
228 +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
229 +
230 +[[package]]
231 +name = "magnus"
232 +version = "0.7.1"
233 +source = "registry+https://github.com/rust-lang/crates.io-index"
234 +checksum = "3d87ae53030f3a22e83879e666cb94e58a7bdf31706878a0ba48752994146dab"
235 +dependencies = [
236 + "magnus-macros",
237 + "rb-sys",
238 + "rb-sys-env",
239 + "seq-macro",
240 +]
241 +
242 +[[package]]
243 +name = "magnus-macros"
244 +version = "0.6.0"
245 +source = "registry+https://github.com/rust-lang/crates.io-index"
246 +checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
247 +dependencies = [
248 + "proc-macro2",
249 + "quote",
250 + "syn 2.0.101",
251 +]
252 +
253 +[[package]]
254 +name = "maplit"
255 +version = "1.0.2"
256 +source = "registry+https://github.com/rust-lang/crates.io-index"
257 +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
258 +
259 +[[package]]
260 +name = "memchr"
261 +version = "2.7.4"
262 +source = "registry+https://github.com/rust-lang/crates.io-index"
263 +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
264 +
265 +[[package]]
266 +name = "minimal-lexical"
267 +version = "0.2.1"
268 +source = "registry+https://github.com/rust-lang/crates.io-index"
269 +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
270 +
271 +[[package]]
272 +name = "model"
273 +version = "0.1.0"
274 +dependencies = [
275 + "magnus",
276 + "smbcloud-model",
277 + "strum 0.27.1",
278 +]
279 +
280 +[[package]]
281 +name = "nom"
282 +version = "7.1.3"
283 +source = "registry+https://github.com/rust-lang/crates.io-index"
284 +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
285 +dependencies = [
286 + "memchr",
287 + "minimal-lexical",
288 +]
289 +
290 +[[package]]
291 +name = "num-traits"
292 +version = "0.2.19"
293 +source = "registry+https://github.com/rust-lang/crates.io-index"
294 +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
295 +dependencies = [
296 + "autocfg",
297 +]
298 +
299 +[[package]]
300 +name = "once_cell"
301 +version = "1.21.3"
302 +source = "registry+https://github.com/rust-lang/crates.io-index"
303 +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
304 +
305 +[[package]]
306 +name = "proc-macro2"
307 +version = "1.0.95"
308 +source = "registry+https://github.com/rust-lang/crates.io-index"
309 +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
310 +dependencies = [
311 + "unicode-ident",
312 +]
313 +
314 +[[package]]
315 +name = "quote"
316 +version = "1.0.40"
317 +source = "registry+https://github.com/rust-lang/crates.io-index"
318 +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
319 +dependencies = [
320 + "proc-macro2",
321 +]
322 +
323 +[[package]]
324 +name = "rb-sys"
325 +version = "0.9.115"
326 +source = "registry+https://github.com/rust-lang/crates.io-index"
327 +checksum = "99ca6726be0eca74687047fed7dcbc2d509571f3962e190c343ac1eb40e482b3"
328 +dependencies = [
329 + "rb-sys-build",
330 +]
331 +
332 +[[package]]
333 +name = "rb-sys-build"
334 +version = "0.9.115"
335 +source = "registry+https://github.com/rust-lang/crates.io-index"
336 +checksum = "9f2390cfc87b7513656656faad6567291e581542d3ec41dd0a2bf381896e0880"
337 +dependencies = [
338 + "bindgen",
339 + "lazy_static",
340 + "proc-macro2",
341 + "quote",
342 + "regex",
343 + "shell-words",
344 + "syn 2.0.101",
345 +]
346 +
347 +[[package]]
348 +name = "rb-sys-env"
349 +version = "0.1.2"
350 +source = "registry+https://github.com/rust-lang/crates.io-index"
351 +checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
352 +
353 +[[package]]
354 +name = "regex"
355 +version = "1.11.1"
356 +source = "registry+https://github.com/rust-lang/crates.io-index"
357 +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
358 +dependencies = [
359 + "aho-corasick",
360 + "memchr",
361 + "regex-automata",
362 + "regex-syntax",
363 +]
364 +
365 +[[package]]
366 +name = "regex-automata"
367 +version = "0.4.9"
368 +source = "registry+https://github.com/rust-lang/crates.io-index"
369 +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
370 +dependencies = [
371 + "aho-corasick",
372 + "memchr",
373 + "regex-syntax",
374 +]
375 +
376 +[[package]]
377 +name = "regex-syntax"
378 +version = "0.8.5"
379 +source = "registry+https://github.com/rust-lang/crates.io-index"
380 +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
381 +
382 +[[package]]
383 +name = "rustc-hash"
384 +version = "1.1.0"
385 +source = "registry+https://github.com/rust-lang/crates.io-index"
386 +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
387 +
388 +[[package]]
389 +name = "rustversion"
390 +version = "1.0.21"
391 +source = "registry+https://github.com/rust-lang/crates.io-index"
392 +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
393 +
394 +[[package]]
395 +name = "ryu"
396 +version = "1.0.20"
397 +source = "registry+https://github.com/rust-lang/crates.io-index"
398 +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
399 +
400 +[[package]]
401 +name = "seq-macro"
402 +version = "0.3.6"
403 +source = "registry+https://github.com/rust-lang/crates.io-index"
404 +checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
405 +
406 +[[package]]
407 +name = "serde"
408 +version = "1.0.219"
409 +source = "registry+https://github.com/rust-lang/crates.io-index"
410 +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
411 +dependencies = [
412 + "serde_derive",
413 +]
414 +
415 +[[package]]
416 +name = "serde_derive"
417 +version = "1.0.219"
418 +source = "registry+https://github.com/rust-lang/crates.io-index"
419 +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
420 +dependencies = [
421 + "proc-macro2",
422 + "quote",
423 + "syn 2.0.101",
424 +]
425 +
426 +[[package]]
427 +name = "serde_json"
428 +version = "1.0.140"
429 +source = "registry+https://github.com/rust-lang/crates.io-index"
430 +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
431 +dependencies = [
432 + "itoa",
433 + "memchr",
434 + "ryu",
435 + "serde",
436 +]
437 +
438 +[[package]]
439 +name = "serde_repr"
440 +version = "0.1.20"
441 +source = "registry+https://github.com/rust-lang/crates.io-index"
442 +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
443 +dependencies = [
444 + "proc-macro2",
445 + "quote",
446 + "syn 2.0.101",
447 +]
448 +
449 +[[package]]
450 +name = "shell-words"
451 +version = "1.1.0"
452 +source = "registry+https://github.com/rust-lang/crates.io-index"
453 +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
454 +
455 +[[package]]
456 +name = "shlex"
457 +version = "1.3.0"
458 +source = "registry+https://github.com/rust-lang/crates.io-index"
459 +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
460 +
461 +[[package]]
462 +name = "smbcloud-model"
463 +version = "0.3.13"
464 +dependencies = [
465 + "chrono",
466 + "serde",
467 + "serde_json",
468 + "serde_repr",
469 + "spinners",
470 + "strum 0.27.1",
471 + "strum_macros 0.27.1",
472 + "thiserror",
473 +]
474 +
475 +[[package]]
476 +name = "spinners"
477 +version = "4.1.1"
478 +source = "registry+https://github.com/rust-lang/crates.io-index"
479 +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82"
480 +dependencies = [
481 + "lazy_static",
482 + "maplit",
483 + "strum 0.24.1",
484 +]
485 +
486 +[[package]]
487 +name = "strum"
488 +version = "0.24.1"
489 +source = "registry+https://github.com/rust-lang/crates.io-index"
490 +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
491 +dependencies = [
492 + "strum_macros 0.24.3",
493 +]
494 +
495 +[[package]]
496 +name = "strum"
497 +version = "0.27.1"
498 +source = "registry+https://github.com/rust-lang/crates.io-index"
499 +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32"
500 +
501 +[[package]]
502 +name = "strum_macros"
503 +version = "0.24.3"
504 +source = "registry+https://github.com/rust-lang/crates.io-index"
505 +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
506 +dependencies = [
507 + "heck 0.4.1",
508 + "proc-macro2",
509 + "quote",
510 + "rustversion",
511 + "syn 1.0.109",
512 +]
513 +
514 +[[package]]
515 +name = "strum_macros"
516 +version = "0.27.1"
517 +source = "registry+https://github.com/rust-lang/crates.io-index"
518 +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8"
519 +dependencies = [
520 + "heck 0.5.0",
521 + "proc-macro2",
522 + "quote",
523 + "rustversion",
524 + "syn 2.0.101",
525 +]
526 +
527 +[[package]]
528 +name = "syn"
529 +version = "1.0.109"
530 +source = "registry+https://github.com/rust-lang/crates.io-index"
531 +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
532 +dependencies = [
533 + "proc-macro2",
534 + "quote",
535 + "unicode-ident",
536 +]
537 +
538 +[[package]]
539 +name = "syn"
540 +version = "2.0.101"
541 +source = "registry+https://github.com/rust-lang/crates.io-index"
542 +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
543 +dependencies = [
544 + "proc-macro2",
545 + "quote",
546 + "unicode-ident",
547 +]
548 +
549 +[[package]]
550 +name = "thiserror"
551 +version = "2.0.12"
552 +source = "registry+https://github.com/rust-lang/crates.io-index"
553 +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
554 +dependencies = [
555 + "thiserror-impl",
556 +]
557 +
558 +[[package]]
559 +name = "thiserror-impl"
560 +version = "2.0.12"
561 +source = "registry+https://github.com/rust-lang/crates.io-index"
562 +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
563 +dependencies = [
564 + "proc-macro2",
565 + "quote",
566 + "syn 2.0.101",
567 +]
568 +
569 +[[package]]
570 +name = "unicode-ident"
571 +version = "1.0.18"
572 +source = "registry+https://github.com/rust-lang/crates.io-index"
573 +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
574 +
575 +[[package]]
576 +name = "wasm-bindgen"
577 +version = "0.2.100"
578 +source = "registry+https://github.com/rust-lang/crates.io-index"
579 +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
580 +dependencies = [
581 + "cfg-if",
582 + "once_cell",
583 + "rustversion",
584 + "wasm-bindgen-macro",
585 +]
586 +
587 +[[package]]
588 +name = "wasm-bindgen-backend"
589 +version = "0.2.100"
590 +source = "registry+https://github.com/rust-lang/crates.io-index"
591 +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
592 +dependencies = [
593 + "bumpalo",
594 + "log",
595 + "proc-macro2",
596 + "quote",
597 + "syn 2.0.101",
598 + "wasm-bindgen-shared",
599 +]
600 +
601 +[[package]]
602 +name = "wasm-bindgen-macro"
603 +version = "0.2.100"
604 +source = "registry+https://github.com/rust-lang/crates.io-index"
605 +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
606 +dependencies = [
607 + "quote",
608 + "wasm-bindgen-macro-support",
609 +]
610 +
611 +[[package]]
612 +name = "wasm-bindgen-macro-support"
613 +version = "0.2.100"
614 +source = "registry+https://github.com/rust-lang/crates.io-index"
615 +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
616 +dependencies = [
617 + "proc-macro2",
618 + "quote",
619 + "syn 2.0.101",
620 + "wasm-bindgen-backend",
621 + "wasm-bindgen-shared",
622 +]
623 +
624 +[[package]]
625 +name = "wasm-bindgen-shared"
626 +version = "0.2.100"
627 +source = "registry+https://github.com/rust-lang/crates.io-index"
628 +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
629 +dependencies = [
630 + "unicode-ident",
631 +]
632 +
633 +[[package]]
634 +name = "windows-core"
635 +version = "0.61.2"
636 +source = "registry+https://github.com/rust-lang/crates.io-index"
637 +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
638 +dependencies = [
639 + "windows-implement",
640 + "windows-interface",
641 + "windows-link",
642 + "windows-result",
643 + "windows-strings",
644 +]
645 +
646 +[[package]]
647 +name = "windows-implement"
648 +version = "0.60.0"
649 +source = "registry+https://github.com/rust-lang/crates.io-index"
650 +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
651 +dependencies = [
652 + "proc-macro2",
653 + "quote",
654 + "syn 2.0.101",
655 +]
656 +
657 +[[package]]
658 +name = "windows-interface"
659 +version = "0.59.1"
660 +source = "registry+https://github.com/rust-lang/crates.io-index"
661 +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
662 +dependencies = [
663 + "proc-macro2",
664 + "quote",
665 + "syn 2.0.101",
666 +]
667 +
668 +[[package]]
669 +name = "windows-link"
670 +version = "0.1.1"
671 +source = "registry+https://github.com/rust-lang/crates.io-index"
672 +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
673 +
674 +[[package]]
675 +name = "windows-result"
676 +version = "0.3.4"
677 +source = "registry+https://github.com/rust-lang/crates.io-index"
678 +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
679 +dependencies = [
680 + "windows-link",
681 +]
682 +
683 +[[package]]
684 +name = "windows-strings"
685 +version = "0.4.2"
686 +source = "registry+https://github.com/rust-lang/crates.io-index"
687 +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
688 +dependencies = [
689 + "windows-link",
690 +]
691 +
692 +[[package]]
693 +name = "windows-targets"
694 +version = "0.53.0"
695 +source = "registry+https://github.com/rust-lang/crates.io-index"
696 +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
697 +dependencies = [
698 + "windows_aarch64_gnullvm",
699 + "windows_aarch64_msvc",
700 + "windows_i686_gnu",
701 + "windows_i686_gnullvm",
702 + "windows_i686_msvc",
703 + "windows_x86_64_gnu",
704 + "windows_x86_64_gnullvm",
705 + "windows_x86_64_msvc",
706 +]
707 +
708 +[[package]]
709 +name = "windows_aarch64_gnullvm"
710 +version = "0.53.0"
711 +source = "registry+https://github.com/rust-lang/crates.io-index"
712 +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
713 +
714 +[[package]]
715 +name = "windows_aarch64_msvc"
716 +version = "0.53.0"
717 +source = "registry+https://github.com/rust-lang/crates.io-index"
718 +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
719 +
720 +[[package]]
721 +name = "windows_i686_gnu"
722 +version = "0.53.0"
723 +source = "registry+https://github.com/rust-lang/crates.io-index"
724 +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
725 +
726 +[[package]]
727 +name = "windows_i686_gnullvm"
728 +version = "0.53.0"
729 +source = "registry+https://github.com/rust-lang/crates.io-index"
730 +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
731 +
732 +[[package]]
733 +name = "windows_i686_msvc"
734 +version = "0.53.0"
735 +source = "registry+https://github.com/rust-lang/crates.io-index"
736 +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
737 +
738 +[[package]]
739 +name = "windows_x86_64_gnu"
740 +version = "0.53.0"
741 +source = "registry+https://github.com/rust-lang/crates.io-index"
742 +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
743 +
744 +[[package]]
745 +name = "windows_x86_64_gnullvm"
746 +version = "0.53.0"
747 +source = "registry+https://github.com/rust-lang/crates.io-index"
748 +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
749 +
750 +[[package]]
751 +name = "windows_x86_64_msvc"
752 +version = "0.53.0"
753 +source = "registry+https://github.com/rust-lang/crates.io-index"
754 +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
gems/model/Cargo.toml new
+7
@@ -0,0 +1,7 @@
1 +# This Cargo.toml is here to let externals tools (IDEs, etc.) know that this is
2 +# a Rust project. Your extensions dependencies should be added to the Cargo.toml
3 +# in the ext/ directory.
4 +
5 +[workspace]
6 +members = ["./ext/model"]
7 +resolver = "2"
gems/model/Gemfile new
+10
@@ -0,0 +1,10 @@
1 +# frozen_string_literal: true
2 +
3 +source "https://rubygems.org"
4 +
5 +# Specify your gem's dependencies in model.gemspec
6 +gemspec
7 +
8 +gem "rake", "~> 13.0"
9 +
10 +gem "rake-compiler"
gems/model/Gemfile.lock new
+27
@@ -0,0 +1,27 @@
1 +PATH
2 + remote: .
3 + specs:
4 + smbcloud-model (0.1.0)
5 + rb_sys (~> 0.9.91)
6 +
7 +GEM
8 + remote: https://rubygems.org/
9 + specs:
10 + rake (13.2.1)
11 + rake-compiler (1.3.0)
12 + rake
13 + rake-compiler-dock (1.9.1)
14 + rb_sys (0.9.115)
15 + rake-compiler-dock (= 1.9.1)
16 +
17 +PLATFORMS
18 + arm64-darwin-24
19 + ruby
20 +
21 +DEPENDENCIES
22 + rake (~> 13.0)
23 + rake-compiler
24 + smbcloud-model!
25 +
26 +BUNDLED WITH
27 + 2.6.2
gems/model/README.md new
+35
@@ -0,0 +1,35 @@
1 +# Model
2 +
3 +TODO: Delete this and the text below, and describe your gem
4 +
5 +Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/model`. To experiment with that code, run `bin/console` for an interactive prompt.
6 +
7 +## Installation
8 +
9 +TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10 +
11 +Install the gem and add to the application's Gemfile by executing:
12 +
13 +```bash
14 +bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15 +```
16 +
17 +If bundler is not being used to manage dependencies, install the gem by executing:
18 +
19 +```bash
20 +gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21 +```
22 +
23 +## Usage
24 +
25 +TODO: Write usage instructions here
26 +
27 +## Development
28 +
29 +After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30 +
31 +To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32 +
33 +## Contributing
34 +
35 +Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/model.
gems/model/Rakefile new
+14
@@ -0,0 +1,14 @@
1 +# frozen_string_literal: true
2 +
3 +require "bundler/gem_tasks"
4 +require "rb_sys/extensiontask"
5 +
6 +task build: :compile
7 +
8 +GEMSPEC = Gem::Specification.load("model.gemspec")
9 +
10 +RbSys::ExtensionTask.new("model", GEMSPEC) do |ext|
11 + ext.lib_dir = "lib/model"
12 +end
13 +
14 +task default: :compile
gems/model/bin/console new
+11
@@ -0,0 +1,11 @@
1 +#!/usr/bin/env ruby
2 +# frozen_string_literal: true
3 +
4 +require "bundler/setup"
5 +require "model"
6 +
7 +# You can add fixtures and/or initialization code here to make experimenting
8 +# with your gem easier. You can also use a different console, if you like.
9 +
10 +require "irb"
11 +IRB.start(__FILE__)
gems/model/bin/setup new
+8
@@ -0,0 +1,8 @@
1 +#!/usr/bin/env bash
2 +set -euo pipefail
3 +IFS=$'\n\t'
4 +set -vx
5 +
6 +bundle install
7 +
8 +# Do any other automated setup that you need to do here
gems/model/ext/model/Cargo.toml new
+14
@@ -0,0 +1,14 @@
1 +[package]
2 +name = "model"
3 +version = "0.1.0"
4 +edition = "2021"
5 +authors = ["paydii <hej@setoelkahfi.se>"]
6 +publish = false
7 +
8 +[lib]
9 +crate-type = ["cdylib"]
10 +
11 +[dependencies]
12 +magnus = { version = "0.7.1" }
13 +strum = "0.27"
14 +smbcloud-model = { path = "./../../../../crates/smbcloud-model"}
\ No newline at end of file
gems/model/ext/model/extconf.rb new
+6
@@ -0,0 +1,6 @@
1 +# frozen_string_literal: true
2 +
3 +require "mkmf"
4 +require "rb_sys/mkmf"
5 +
6 +create_rust_makefile("model/model")
gems/model/ext/model/src/lib.rs new
+19
@@ -0,0 +1,19 @@
1 +use magnus::{function, prelude::*, Error, Ruby};
2 +use smbcloud_model::error_codes::ErrorCode;
3 +use strum::IntoEnumIterator;
4 +
5 +fn t(e: i32, l: Option<String>) -> String {
6 + ErrorCode::from_i32(e).message(l).to_string()
7 +}
8 +
9 +#[magnus::init]
10 +fn init(ruby: &Ruby) -> Result<(), Error> {
11 + let module = ruby.define_module("SmbCloud")?;
12 + let error_code_mod = module.define_module("ErrorCode")?;
13 + error_code_mod.define_singleton_method("t", function!(t, 2))?;
14 + // Define all error codes as constants
15 + for e in ErrorCode::iter() {
16 + error_code_mod.const_set(e.rb_constant_name(), e as i32)?;
17 + }
18 + Ok(())
19 +}
gems/model/lib/model.rb new
+9
@@ -0,0 +1,9 @@
1 +# frozen_string_literal: true
2 +
3 +require_relative "model/version"
4 +require_relative "model/model"
5 +
6 +module Model
7 + class Error < StandardError; end
8 + # Your code goes here...
9 +end
gems/model/lib/model/version.rb new
+5
@@ -0,0 +1,5 @@
1 +# frozen_string_literal: true
2 +
3 +module Model
4 + VERSION = "0.1.0"
5 +end
gems/model/model.gemspec new
+43
@@ -0,0 +1,43 @@
1 +# frozen_string_literal: true
2 +
3 +require_relative "lib/model/version"
4 +
5 +Gem::Specification.new do |spec|
6 + spec.name = "smbcloud-model"
7 + spec.version = Model::VERSION
8 + spec.authors = ["paydii"]
9 + spec.email = ["hej@setoelkahfi.se"]
10 +
11 + spec.summary = "Ruby binding for smbcloud-cli model."
12 + spec.description = "Ruby binding for smbcloud-cli modellllllllllll."
13 + spec.homepage = "https://github.com/smbcloudXYZ/smbcloud-cli/gems/model"
14 + spec.required_ruby_version = ">= 3.1.0"
15 + spec.required_rubygems_version = ">= 3.3.11"
16 +
17 + spec.metadata["allowed_push_host"] = "https://rubygems.org"
18 +
19 + spec.metadata["homepage_uri"] = spec.homepage
20 + spec.metadata["source_code_uri"] = "https://github.com/smbcloudXYZ/smbcloud-cli"
21 + spec.metadata["changelog_uri"] = "https://github.com/smbcloudXYZ/smbcloud-cli/CHANGELOG.md"
22 +
23 + # Specify which files should be added to the gem when it is released.
24 + # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25 + gemspec = File.basename(__FILE__)
26 + spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
27 + ls.readlines("\x0", chomp: true).reject do |f|
28 + (f == gemspec) ||
29 + f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
30 + end
31 + end
32 + spec.bindir = "exe"
33 + spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
34 + spec.require_paths = ["lib"]
35 + spec.extensions = ["ext/model/extconf.rb"]
36 +
37 + # Uncomment to register a new dependency of your gem
38 + # spec.add_dependency "example-gem", "~> 1.0"
39 + spec.add_dependency "rb_sys", "~> 0.9.91"
40 +
41 + # For more information and examples about making a new gem, check out our
42 + # guide at: https://bundler.io/guides/creating_gem.html
43 +end
gems/model/sig/model.rbs new
+4
@@ -0,0 +1,4 @@
1 +module Model
2 + VERSION: String
3 + # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4 +end