eppo-server-sdk 3.0.0 → 3.1.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/Cargo.lock +136 -84
- data/ext/eppo_client/Cargo.toml +2 -2
- data/ext/eppo_client/src/client.rs +71 -12
- data/ext/eppo_client/src/lib.rs +8 -0
- data/lib/eppo_client/client.rb +53 -2
- data/lib/eppo_client/version.rb +2 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13377928dbb61c86f0f55c300cce4fd1bbd9298014c34d6e766e6807eec306bb
|
4
|
+
data.tar.gz: cbaefafb70a5e1267092d7d01a816ffc2520e8cc5b9e21fb22ccd30fc26f6ea0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9edcdd5df7dd9abc465abc275ed46b3e16edc541a5f7eaf5108cc2d21e42a293fbee4d93ad7b0e5db9625397ceb1df0cbdda4558686ee5313cb7c2812b58ca8
|
7
|
+
data.tar.gz: add2316372855812a3b54c024b171c85a0a87124ff8645ee4bf352897c46b26b2b47627d96726c9b93d4fd8407b3488cf6845de7fe9edae55e0efaf423a44d6f
|
data/Cargo.lock
CHANGED
@@ -43,9 +43,9 @@ dependencies = [
|
|
43
43
|
|
44
44
|
[[package]]
|
45
45
|
name = "anstream"
|
46
|
-
version = "0.6.
|
46
|
+
version = "0.6.15"
|
47
47
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
48
|
-
checksum = "
|
48
|
+
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
|
49
49
|
dependencies = [
|
50
50
|
"anstyle",
|
51
51
|
"anstyle-parse",
|
@@ -58,33 +58,33 @@ dependencies = [
|
|
58
58
|
|
59
59
|
[[package]]
|
60
60
|
name = "anstyle"
|
61
|
-
version = "1.0.
|
61
|
+
version = "1.0.8"
|
62
62
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
63
|
-
checksum = "
|
63
|
+
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
|
64
64
|
|
65
65
|
[[package]]
|
66
66
|
name = "anstyle-parse"
|
67
|
-
version = "0.2.
|
67
|
+
version = "0.2.5"
|
68
68
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
69
|
-
checksum = "
|
69
|
+
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
|
70
70
|
dependencies = [
|
71
71
|
"utf8parse",
|
72
72
|
]
|
73
73
|
|
74
74
|
[[package]]
|
75
75
|
name = "anstyle-query"
|
76
|
-
version = "1.1.
|
76
|
+
version = "1.1.1"
|
77
77
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
78
|
-
checksum = "
|
78
|
+
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
|
79
79
|
dependencies = [
|
80
80
|
"windows-sys 0.52.0",
|
81
81
|
]
|
82
82
|
|
83
83
|
[[package]]
|
84
84
|
name = "anstyle-wincon"
|
85
|
-
version = "3.0.
|
85
|
+
version = "3.0.4"
|
86
86
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
87
|
-
checksum = "
|
87
|
+
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
|
88
88
|
dependencies = [
|
89
89
|
"anstyle",
|
90
90
|
"windows-sys 0.52.0",
|
@@ -161,17 +161,26 @@ version = "3.16.0"
|
|
161
161
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
162
162
|
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
163
163
|
|
164
|
+
[[package]]
|
165
|
+
name = "byteorder"
|
166
|
+
version = "1.5.0"
|
167
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
168
|
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
169
|
+
|
164
170
|
[[package]]
|
165
171
|
name = "bytes"
|
166
|
-
version = "1.
|
172
|
+
version = "1.7.1"
|
167
173
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
168
|
-
checksum = "
|
174
|
+
checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
|
169
175
|
|
170
176
|
[[package]]
|
171
177
|
name = "cc"
|
172
|
-
version = "1.1.
|
178
|
+
version = "1.1.11"
|
173
179
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
174
|
-
checksum = "
|
180
|
+
checksum = "5fb8dd288a69fc53a1996d7ecfbf4a20d59065bff137ce7e56bbd620de191189"
|
181
|
+
dependencies = [
|
182
|
+
"shlex",
|
183
|
+
]
|
175
184
|
|
176
185
|
[[package]]
|
177
186
|
name = "cexpr"
|
@@ -216,9 +225,9 @@ dependencies = [
|
|
216
225
|
|
217
226
|
[[package]]
|
218
227
|
name = "colorchoice"
|
219
|
-
version = "1.0.
|
228
|
+
version = "1.0.2"
|
220
229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
221
|
-
checksum = "
|
230
|
+
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
222
231
|
|
223
232
|
[[package]]
|
224
233
|
name = "convert_case"
|
@@ -238,9 +247,9 @@ dependencies = [
|
|
238
247
|
|
239
248
|
[[package]]
|
240
249
|
name = "core-foundation-sys"
|
241
|
-
version = "0.8.
|
250
|
+
version = "0.8.7"
|
242
251
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
243
|
-
checksum = "
|
252
|
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
244
253
|
|
245
254
|
[[package]]
|
246
255
|
name = "derive_more"
|
@@ -272,9 +281,9 @@ dependencies = [
|
|
272
281
|
|
273
282
|
[[package]]
|
274
283
|
name = "env_filter"
|
275
|
-
version = "0.1.
|
284
|
+
version = "0.1.2"
|
276
285
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
277
|
-
checksum = "
|
286
|
+
checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
|
278
287
|
dependencies = [
|
279
288
|
"log",
|
280
289
|
"regex",
|
@@ -282,9 +291,9 @@ dependencies = [
|
|
282
291
|
|
283
292
|
[[package]]
|
284
293
|
name = "env_logger"
|
285
|
-
version = "0.11.
|
294
|
+
version = "0.11.5"
|
286
295
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
287
|
-
checksum = "
|
296
|
+
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
|
288
297
|
dependencies = [
|
289
298
|
"anstream",
|
290
299
|
"anstyle",
|
@@ -295,7 +304,7 @@ dependencies = [
|
|
295
304
|
|
296
305
|
[[package]]
|
297
306
|
name = "eppo_client"
|
298
|
-
version = "3.
|
307
|
+
version = "3.1.0"
|
299
308
|
dependencies = [
|
300
309
|
"env_logger",
|
301
310
|
"eppo_core",
|
@@ -308,9 +317,9 @@ dependencies = [
|
|
308
317
|
|
309
318
|
[[package]]
|
310
319
|
name = "eppo_core"
|
311
|
-
version = "
|
320
|
+
version = "2.0.0"
|
312
321
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
313
|
-
checksum = "
|
322
|
+
checksum = "aff693ab3cd82f61d90249aa02c6f7e173202d92727d1036b8fc1468201f9848"
|
314
323
|
dependencies = [
|
315
324
|
"chrono",
|
316
325
|
"derive_more",
|
@@ -486,6 +495,12 @@ version = "0.14.5"
|
|
486
495
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
487
496
|
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
488
497
|
|
498
|
+
[[package]]
|
499
|
+
name = "hermit-abi"
|
500
|
+
version = "0.3.9"
|
501
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
502
|
+
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
503
|
+
|
489
504
|
[[package]]
|
490
505
|
name = "http"
|
491
506
|
version = "1.1.0"
|
@@ -587,9 +602,9 @@ dependencies = [
|
|
587
602
|
|
588
603
|
[[package]]
|
589
604
|
name = "hyper-util"
|
590
|
-
version = "0.1.
|
605
|
+
version = "0.1.7"
|
591
606
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
592
|
-
checksum = "
|
607
|
+
checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9"
|
593
608
|
dependencies = [
|
594
609
|
"bytes",
|
595
610
|
"futures-channel",
|
@@ -640,9 +655,9 @@ dependencies = [
|
|
640
655
|
|
641
656
|
[[package]]
|
642
657
|
name = "indexmap"
|
643
|
-
version = "2.
|
658
|
+
version = "2.4.0"
|
644
659
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
645
|
-
checksum = "
|
660
|
+
checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
|
646
661
|
dependencies = [
|
647
662
|
"equivalent",
|
648
663
|
"hashbrown",
|
@@ -656,9 +671,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
|
|
656
671
|
|
657
672
|
[[package]]
|
658
673
|
name = "is_terminal_polyfill"
|
659
|
-
version = "1.70.
|
674
|
+
version = "1.70.1"
|
660
675
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
661
|
-
checksum = "
|
676
|
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
662
677
|
|
663
678
|
[[package]]
|
664
679
|
name = "itertools"
|
@@ -677,9 +692,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
|
|
677
692
|
|
678
693
|
[[package]]
|
679
694
|
name = "js-sys"
|
680
|
-
version = "0.3.
|
695
|
+
version = "0.3.70"
|
681
696
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
682
|
-
checksum = "
|
697
|
+
checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
|
683
698
|
dependencies = [
|
684
699
|
"wasm-bindgen",
|
685
700
|
]
|
@@ -786,13 +801,14 @@ dependencies = [
|
|
786
801
|
|
787
802
|
[[package]]
|
788
803
|
name = "mio"
|
789
|
-
version = "0.
|
804
|
+
version = "1.0.2"
|
790
805
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
791
|
-
checksum = "
|
806
|
+
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
|
792
807
|
dependencies = [
|
808
|
+
"hermit-abi",
|
793
809
|
"libc",
|
794
810
|
"wasi",
|
795
|
-
"windows-sys 0.
|
811
|
+
"windows-sys 0.52.0",
|
796
812
|
]
|
797
813
|
|
798
814
|
[[package]]
|
@@ -833,9 +849,9 @@ dependencies = [
|
|
833
849
|
|
834
850
|
[[package]]
|
835
851
|
name = "object"
|
836
|
-
version = "0.36.
|
852
|
+
version = "0.36.3"
|
837
853
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
838
|
-
checksum = "
|
854
|
+
checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9"
|
839
855
|
dependencies = [
|
840
856
|
"memchr",
|
841
857
|
]
|
@@ -936,9 +952,12 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
|
|
936
952
|
|
937
953
|
[[package]]
|
938
954
|
name = "ppv-lite86"
|
939
|
-
version = "0.2.
|
955
|
+
version = "0.2.20"
|
940
956
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
941
|
-
checksum = "
|
957
|
+
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
|
958
|
+
dependencies = [
|
959
|
+
"zerocopy",
|
960
|
+
]
|
942
961
|
|
943
962
|
[[package]]
|
944
963
|
name = "proc-macro2"
|
@@ -990,18 +1009,18 @@ dependencies = [
|
|
990
1009
|
|
991
1010
|
[[package]]
|
992
1011
|
name = "rb-sys"
|
993
|
-
version = "0.9.
|
1012
|
+
version = "0.9.100"
|
994
1013
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
995
|
-
checksum = "
|
1014
|
+
checksum = "87f2ba20be84b32fad6b0ce397764bcdd0f2dca4431cf7035f6a6721e5747565"
|
996
1015
|
dependencies = [
|
997
1016
|
"rb-sys-build",
|
998
1017
|
]
|
999
1018
|
|
1000
1019
|
[[package]]
|
1001
1020
|
name = "rb-sys-build"
|
1002
|
-
version = "0.9.
|
1021
|
+
version = "0.9.100"
|
1003
1022
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1004
|
-
checksum = "
|
1023
|
+
checksum = "7ecae2bdcb118ee721d9a3929f89e8578237fade298dfcf8c928609aa88abc48"
|
1005
1024
|
dependencies = [
|
1006
1025
|
"bindgen",
|
1007
1026
|
"lazy_static",
|
@@ -1020,9 +1039,9 @@ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
|
|
1020
1039
|
|
1021
1040
|
[[package]]
|
1022
1041
|
name = "regex"
|
1023
|
-
version = "1.10.
|
1042
|
+
version = "1.10.6"
|
1024
1043
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1025
|
-
checksum = "
|
1044
|
+
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
|
1026
1045
|
dependencies = [
|
1027
1046
|
"aho-corasick",
|
1028
1047
|
"memchr",
|
@@ -1142,9 +1161,9 @@ dependencies = [
|
|
1142
1161
|
|
1143
1162
|
[[package]]
|
1144
1163
|
name = "rustls"
|
1145
|
-
version = "0.23.
|
1164
|
+
version = "0.23.12"
|
1146
1165
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1147
|
-
checksum = "
|
1166
|
+
checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044"
|
1148
1167
|
dependencies = [
|
1149
1168
|
"once_cell",
|
1150
1169
|
"rustls-pki-types",
|
@@ -1155,9 +1174,9 @@ dependencies = [
|
|
1155
1174
|
|
1156
1175
|
[[package]]
|
1157
1176
|
name = "rustls-pemfile"
|
1158
|
-
version = "2.1.
|
1177
|
+
version = "2.1.3"
|
1159
1178
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1160
|
-
checksum = "
|
1179
|
+
checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425"
|
1161
1180
|
dependencies = [
|
1162
1181
|
"base64",
|
1163
1182
|
"rustls-pki-types",
|
@@ -1165,9 +1184,9 @@ dependencies = [
|
|
1165
1184
|
|
1166
1185
|
[[package]]
|
1167
1186
|
name = "rustls-pki-types"
|
1168
|
-
version = "1.
|
1187
|
+
version = "1.8.0"
|
1169
1188
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1170
|
-
checksum = "
|
1189
|
+
checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0"
|
1171
1190
|
|
1172
1191
|
[[package]]
|
1173
1192
|
name = "rustls-webpki"
|
@@ -1235,18 +1254,18 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
|
|
1235
1254
|
|
1236
1255
|
[[package]]
|
1237
1256
|
name = "serde"
|
1238
|
-
version = "1.0.
|
1257
|
+
version = "1.0.207"
|
1239
1258
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1240
|
-
checksum = "
|
1259
|
+
checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2"
|
1241
1260
|
dependencies = [
|
1242
1261
|
"serde_derive",
|
1243
1262
|
]
|
1244
1263
|
|
1245
1264
|
[[package]]
|
1246
1265
|
name = "serde_derive"
|
1247
|
-
version = "1.0.
|
1266
|
+
version = "1.0.207"
|
1248
1267
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1249
|
-
checksum = "
|
1268
|
+
checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e"
|
1250
1269
|
dependencies = [
|
1251
1270
|
"proc-macro2",
|
1252
1271
|
"quote",
|
@@ -1264,11 +1283,12 @@ dependencies = [
|
|
1264
1283
|
|
1265
1284
|
[[package]]
|
1266
1285
|
name = "serde_json"
|
1267
|
-
version = "1.0.
|
1286
|
+
version = "1.0.124"
|
1268
1287
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1269
|
-
checksum = "
|
1288
|
+
checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d"
|
1270
1289
|
dependencies = [
|
1271
1290
|
"itoa",
|
1291
|
+
"memchr",
|
1272
1292
|
"ryu",
|
1273
1293
|
"serde",
|
1274
1294
|
]
|
@@ -1425,9 +1445,9 @@ dependencies = [
|
|
1425
1445
|
|
1426
1446
|
[[package]]
|
1427
1447
|
name = "syn"
|
1428
|
-
version = "2.0.
|
1448
|
+
version = "2.0.74"
|
1429
1449
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1430
|
-
checksum = "
|
1450
|
+
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
|
1431
1451
|
dependencies = [
|
1432
1452
|
"proc-macro2",
|
1433
1453
|
"quote",
|
@@ -1469,14 +1489,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|
1469
1489
|
|
1470
1490
|
[[package]]
|
1471
1491
|
name = "tempfile"
|
1472
|
-
version = "3.
|
1492
|
+
version = "3.12.0"
|
1473
1493
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1474
|
-
checksum = "
|
1494
|
+
checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
|
1475
1495
|
dependencies = [
|
1476
1496
|
"cfg-if",
|
1477
1497
|
"fastrand",
|
1498
|
+
"once_cell",
|
1478
1499
|
"rustix",
|
1479
|
-
"windows-sys 0.
|
1500
|
+
"windows-sys 0.59.0",
|
1480
1501
|
]
|
1481
1502
|
|
1482
1503
|
[[package]]
|
@@ -1516,9 +1537,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
1516
1537
|
|
1517
1538
|
[[package]]
|
1518
1539
|
name = "tokio"
|
1519
|
-
version = "1.
|
1540
|
+
version = "1.39.2"
|
1520
1541
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1521
|
-
checksum = "
|
1542
|
+
checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1"
|
1522
1543
|
dependencies = [
|
1523
1544
|
"backtrace",
|
1524
1545
|
"bytes",
|
@@ -1526,7 +1547,7 @@ dependencies = [
|
|
1526
1547
|
"mio",
|
1527
1548
|
"pin-project-lite",
|
1528
1549
|
"socket2",
|
1529
|
-
"windows-sys 0.
|
1550
|
+
"windows-sys 0.52.0",
|
1530
1551
|
]
|
1531
1552
|
|
1532
1553
|
[[package]]
|
@@ -1580,15 +1601,15 @@ dependencies = [
|
|
1580
1601
|
|
1581
1602
|
[[package]]
|
1582
1603
|
name = "tower-layer"
|
1583
|
-
version = "0.3.
|
1604
|
+
version = "0.3.3"
|
1584
1605
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1585
|
-
checksum = "
|
1606
|
+
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
|
1586
1607
|
|
1587
1608
|
[[package]]
|
1588
1609
|
name = "tower-service"
|
1589
|
-
version = "0.3.
|
1610
|
+
version = "0.3.3"
|
1590
1611
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1591
|
-
checksum = "
|
1612
|
+
checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
|
1592
1613
|
|
1593
1614
|
[[package]]
|
1594
1615
|
name = "tracing"
|
@@ -1724,19 +1745,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|
1724
1745
|
|
1725
1746
|
[[package]]
|
1726
1747
|
name = "wasm-bindgen"
|
1727
|
-
version = "0.2.
|
1748
|
+
version = "0.2.93"
|
1728
1749
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1729
|
-
checksum = "
|
1750
|
+
checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
|
1730
1751
|
dependencies = [
|
1731
1752
|
"cfg-if",
|
1753
|
+
"once_cell",
|
1732
1754
|
"wasm-bindgen-macro",
|
1733
1755
|
]
|
1734
1756
|
|
1735
1757
|
[[package]]
|
1736
1758
|
name = "wasm-bindgen-backend"
|
1737
|
-
version = "0.2.
|
1759
|
+
version = "0.2.93"
|
1738
1760
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1739
|
-
checksum = "
|
1761
|
+
checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
|
1740
1762
|
dependencies = [
|
1741
1763
|
"bumpalo",
|
1742
1764
|
"log",
|
@@ -1749,9 +1771,9 @@ dependencies = [
|
|
1749
1771
|
|
1750
1772
|
[[package]]
|
1751
1773
|
name = "wasm-bindgen-futures"
|
1752
|
-
version = "0.4.
|
1774
|
+
version = "0.4.43"
|
1753
1775
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1754
|
-
checksum = "
|
1776
|
+
checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed"
|
1755
1777
|
dependencies = [
|
1756
1778
|
"cfg-if",
|
1757
1779
|
"js-sys",
|
@@ -1761,9 +1783,9 @@ dependencies = [
|
|
1761
1783
|
|
1762
1784
|
[[package]]
|
1763
1785
|
name = "wasm-bindgen-macro"
|
1764
|
-
version = "0.2.
|
1786
|
+
version = "0.2.93"
|
1765
1787
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1766
|
-
checksum = "
|
1788
|
+
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
|
1767
1789
|
dependencies = [
|
1768
1790
|
"quote",
|
1769
1791
|
"wasm-bindgen-macro-support",
|
@@ -1771,9 +1793,9 @@ dependencies = [
|
|
1771
1793
|
|
1772
1794
|
[[package]]
|
1773
1795
|
name = "wasm-bindgen-macro-support"
|
1774
|
-
version = "0.2.
|
1796
|
+
version = "0.2.93"
|
1775
1797
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1776
|
-
checksum = "
|
1798
|
+
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
|
1777
1799
|
dependencies = [
|
1778
1800
|
"proc-macro2",
|
1779
1801
|
"quote",
|
@@ -1784,15 +1806,15 @@ dependencies = [
|
|
1784
1806
|
|
1785
1807
|
[[package]]
|
1786
1808
|
name = "wasm-bindgen-shared"
|
1787
|
-
version = "0.2.
|
1809
|
+
version = "0.2.93"
|
1788
1810
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1789
|
-
checksum = "
|
1811
|
+
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
|
1790
1812
|
|
1791
1813
|
[[package]]
|
1792
1814
|
name = "web-sys"
|
1793
|
-
version = "0.3.
|
1815
|
+
version = "0.3.70"
|
1794
1816
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1795
|
-
checksum = "
|
1817
|
+
checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0"
|
1796
1818
|
dependencies = [
|
1797
1819
|
"js-sys",
|
1798
1820
|
"wasm-bindgen",
|
@@ -1825,6 +1847,15 @@ dependencies = [
|
|
1825
1847
|
"windows-targets 0.52.6",
|
1826
1848
|
]
|
1827
1849
|
|
1850
|
+
[[package]]
|
1851
|
+
name = "windows-sys"
|
1852
|
+
version = "0.59.0"
|
1853
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1854
|
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
1855
|
+
dependencies = [
|
1856
|
+
"windows-targets 0.52.6",
|
1857
|
+
]
|
1858
|
+
|
1828
1859
|
[[package]]
|
1829
1860
|
name = "windows-targets"
|
1830
1861
|
version = "0.48.5"
|
@@ -1956,6 +1987,27 @@ dependencies = [
|
|
1956
1987
|
"windows-sys 0.48.0",
|
1957
1988
|
]
|
1958
1989
|
|
1990
|
+
[[package]]
|
1991
|
+
name = "zerocopy"
|
1992
|
+
version = "0.7.35"
|
1993
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1994
|
+
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
|
1995
|
+
dependencies = [
|
1996
|
+
"byteorder",
|
1997
|
+
"zerocopy-derive",
|
1998
|
+
]
|
1999
|
+
|
2000
|
+
[[package]]
|
2001
|
+
name = "zerocopy-derive"
|
2002
|
+
version = "0.7.35"
|
2003
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2004
|
+
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
2005
|
+
dependencies = [
|
2006
|
+
"proc-macro2",
|
2007
|
+
"quote",
|
2008
|
+
"syn",
|
2009
|
+
]
|
2010
|
+
|
1959
2011
|
[[package]]
|
1960
2012
|
name = "zeroize"
|
1961
2013
|
version = "1.8.1"
|
data/ext/eppo_client/Cargo.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[package]
|
2
2
|
name = "eppo_client"
|
3
|
-
version = "3.
|
3
|
+
version = "3.1.0"
|
4
4
|
edition = "2021"
|
5
5
|
license = "MIT"
|
6
6
|
publish = false
|
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
|
11
11
|
|
12
12
|
[dependencies]
|
13
13
|
env_logger = { version = "0.11.3", features = ["unstable-kv"] }
|
14
|
-
eppo_core = { version = "
|
14
|
+
eppo_core = { version = "2.0.0" }
|
15
15
|
log = { version = "0.4.21", features = ["kv_serde"] }
|
16
16
|
magnus = { version = "0.6.2" }
|
17
17
|
serde = { version = "1.0.203", features = ["derive"] }
|
@@ -1,8 +1,12 @@
|
|
1
1
|
use std::{cell::RefCell, sync::Arc};
|
2
2
|
|
3
3
|
use eppo_core::{
|
4
|
-
configuration_fetcher::ConfigurationFetcher,
|
5
|
-
|
4
|
+
configuration_fetcher::ConfigurationFetcher,
|
5
|
+
configuration_store::ConfigurationStore,
|
6
|
+
eval::{get_assignment, get_assignment_details, get_bandit_action, get_bandit_action_details},
|
7
|
+
poller_thread::PollerThread,
|
8
|
+
ufc::VariationType,
|
9
|
+
Attributes, ContextAttributes,
|
6
10
|
};
|
7
11
|
use magnus::{error::Result, exception, prelude::*, Error, TryConvert, Value};
|
8
12
|
|
@@ -67,15 +71,37 @@ impl Client {
|
|
67
71
|
let subject_attributes: Attributes = serde_magnus::deserialize(subject_attributes)?;
|
68
72
|
|
69
73
|
let config = self.configuration_store.get_configuration();
|
70
|
-
let result =
|
71
|
-
.
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
let result = get_assignment(
|
75
|
+
config.as_ref().map(AsRef::as_ref),
|
76
|
+
&flag_key,
|
77
|
+
&subject_key,
|
78
|
+
&subject_attributes,
|
79
|
+
Some(expected_type),
|
80
|
+
)
|
81
|
+
// TODO: maybe expose possible errors individually.
|
82
|
+
.map_err(|err| Error::new(exception::runtime_error(), err.to_string()))?;
|
83
|
+
|
84
|
+
Ok(serde_magnus::serialize(&result).expect("assignment value should be serializable"))
|
85
|
+
}
|
86
|
+
|
87
|
+
pub fn get_assignment_details(
|
88
|
+
&self,
|
89
|
+
flag_key: String,
|
90
|
+
subject_key: String,
|
91
|
+
subject_attributes: Value,
|
92
|
+
expected_type: Value,
|
93
|
+
) -> Result<Value> {
|
94
|
+
let expected_type: VariationType = serde_magnus::deserialize(expected_type)?;
|
95
|
+
let subject_attributes: Attributes = serde_magnus::deserialize(subject_attributes)?;
|
96
|
+
|
97
|
+
let config = self.configuration_store.get_configuration();
|
98
|
+
let result = get_assignment_details(
|
99
|
+
config.as_ref().map(AsRef::as_ref),
|
100
|
+
&flag_key,
|
101
|
+
&subject_key,
|
102
|
+
&subject_attributes,
|
103
|
+
Some(expected_type),
|
104
|
+
);
|
79
105
|
|
80
106
|
Ok(serde_magnus::serialize(&result).expect("assignment value should be serializable"))
|
81
107
|
}
|
@@ -100,7 +126,40 @@ impl Client {
|
|
100
126
|
let actions = serde_magnus::deserialize(actions)?;
|
101
127
|
|
102
128
|
let config = self.configuration_store.get_configuration();
|
103
|
-
let result =
|
129
|
+
let result = get_bandit_action(
|
130
|
+
config.as_ref().map(AsRef::as_ref),
|
131
|
+
&flag_key,
|
132
|
+
&subject_key,
|
133
|
+
&subject_attributes,
|
134
|
+
&actions,
|
135
|
+
&default_variation,
|
136
|
+
);
|
137
|
+
|
138
|
+
serde_magnus::serialize(&result)
|
139
|
+
}
|
140
|
+
|
141
|
+
pub fn get_bandit_action_details(
|
142
|
+
&self,
|
143
|
+
flag_key: String,
|
144
|
+
subject_key: String,
|
145
|
+
subject_attributes: Value,
|
146
|
+
actions: Value,
|
147
|
+
default_variation: String,
|
148
|
+
) -> Result<Value> {
|
149
|
+
let subject_attributes = serde_magnus::deserialize::<_, ContextAttributes>(
|
150
|
+
subject_attributes,
|
151
|
+
)
|
152
|
+
.map_err(|err| {
|
153
|
+
Error::new(
|
154
|
+
exception::runtime_error(),
|
155
|
+
format!("enexpected value for subject_attributes: {err}"),
|
156
|
+
)
|
157
|
+
})?;
|
158
|
+
let actions = serde_magnus::deserialize(actions)?;
|
159
|
+
|
160
|
+
let config = self.configuration_store.get_configuration();
|
161
|
+
let result = get_bandit_action_details(
|
162
|
+
config.as_ref().map(AsRef::as_ref),
|
104
163
|
&flag_key,
|
105
164
|
&subject_key,
|
106
165
|
&subject_attributes,
|
data/ext/eppo_client/src/lib.rs
CHANGED
@@ -14,7 +14,15 @@ fn init(ruby: &Ruby) -> Result<(), Error> {
|
|
14
14
|
let core_client = core.define_class("Client", magnus::class::object())?;
|
15
15
|
core_client.define_singleton_method("new", function!(Client::new, 1))?;
|
16
16
|
core_client.define_method("get_assignment", method!(Client::get_assignment, 4))?;
|
17
|
+
core_client.define_method(
|
18
|
+
"get_assignment_details",
|
19
|
+
method!(Client::get_assignment_details, 4),
|
20
|
+
)?;
|
17
21
|
core_client.define_method("get_bandit_action", method!(Client::get_bandit_action, 5))?;
|
22
|
+
core_client.define_method(
|
23
|
+
"get_bandit_action_details",
|
24
|
+
method!(Client::get_bandit_action_details, 5),
|
25
|
+
)?;
|
18
26
|
core_client.define_method("shutdown", method!(Client::shutdown, 0))?;
|
19
27
|
|
20
28
|
core.const_set(
|
data/lib/eppo_client/client.rb
CHANGED
@@ -48,6 +48,26 @@ module EppoClient
|
|
48
48
|
get_assignment_inner(flag_key, subject_key, subject_attributes, "JSON", default_value)
|
49
49
|
end
|
50
50
|
|
51
|
+
def get_string_assignment_details(flag_key, subject_key, subject_attributes, default_value)
|
52
|
+
get_assignment_details_inner(flag_key, subject_key, subject_attributes, "STRING", default_value)
|
53
|
+
end
|
54
|
+
|
55
|
+
def get_numeric_assignment_details(flag_key, subject_key, subject_attributes, default_value)
|
56
|
+
get_assignment_details_inner(flag_key, subject_key, subject_attributes, "NUMERIC", default_value)
|
57
|
+
end
|
58
|
+
|
59
|
+
def get_integer_assignment_details(flag_key, subject_key, subject_attributes, default_value)
|
60
|
+
get_assignment_details_inner(flag_key, subject_key, subject_attributes, "INTEGER", default_value)
|
61
|
+
end
|
62
|
+
|
63
|
+
def get_boolean_assignment_details(flag_key, subject_key, subject_attributes, default_value)
|
64
|
+
get_assignment_details_inner(flag_key, subject_key, subject_attributes, "BOOLEAN", default_value)
|
65
|
+
end
|
66
|
+
|
67
|
+
def get_json_assignment_details(flag_key, subject_key, subject_attributes, default_value)
|
68
|
+
get_assignment_details_inner(flag_key, subject_key, subject_attributes, "JSON", default_value)
|
69
|
+
end
|
70
|
+
|
51
71
|
def get_bandit_action(flag_key, subject_key, subject_attributes, actions, default_variation)
|
52
72
|
attributes = coerce_context_attributes(subject_attributes)
|
53
73
|
actions = actions.to_h { |action, attributes| [action, coerce_context_attributes(attributes)] }
|
@@ -56,7 +76,22 @@ module EppoClient
|
|
56
76
|
log_assignment(result[:assignment_event])
|
57
77
|
log_bandit_action(result[:bandit_event])
|
58
78
|
|
59
|
-
return {:variation => result[:variation], :action=>result[:action]}
|
79
|
+
return {:variation => result[:variation], :action => result[:action]}
|
80
|
+
end
|
81
|
+
|
82
|
+
def get_bandit_action_details(flag_key, subject_key, subject_attributes, actions, default_variation)
|
83
|
+
attributes = coerce_context_attributes(subject_attributes)
|
84
|
+
actions = actions.to_h { |action, attributes| [action, coerce_context_attributes(attributes)] }
|
85
|
+
result, details = @core.get_bandit_action_details(flag_key, subject_key, attributes, actions, default_variation)
|
86
|
+
|
87
|
+
log_assignment(result[:assignment_event])
|
88
|
+
log_bandit_action(result[:bandit_event])
|
89
|
+
|
90
|
+
return {
|
91
|
+
:variation => result[:variation],
|
92
|
+
:action => result[:action],
|
93
|
+
:evaluationDetails => details
|
94
|
+
}
|
60
95
|
end
|
61
96
|
|
62
97
|
private
|
@@ -72,7 +107,7 @@ module EppoClient
|
|
72
107
|
|
73
108
|
log_assignment(assignment[:event])
|
74
109
|
|
75
|
-
return assignment[:value][
|
110
|
+
return assignment[:value][:value]
|
76
111
|
rescue StandardError => error
|
77
112
|
logger.debug("[Eppo SDK] Failed to get assignment: #{error}")
|
78
113
|
|
@@ -82,6 +117,22 @@ module EppoClient
|
|
82
117
|
end
|
83
118
|
# rubocop:enable Metrics/MethodLength
|
84
119
|
|
120
|
+
# rubocop:disable Metrics/MethodLength
|
121
|
+
def get_assignment_details_inner(flag_key, subject_key, subject_attributes, expected_type, default_value)
|
122
|
+
result, event = @core.get_assignment_details(flag_key, subject_key, subject_attributes, expected_type)
|
123
|
+
log_assignment(event)
|
124
|
+
|
125
|
+
if not result[:variation] then
|
126
|
+
result[:variation] = default_value
|
127
|
+
else
|
128
|
+
# unwrap from AssignmentValue to untyped value
|
129
|
+
result[:variation] = result[:variation][:value]
|
130
|
+
end
|
131
|
+
|
132
|
+
return result
|
133
|
+
end
|
134
|
+
# rubocop:enable Metrics/MethodLength
|
135
|
+
|
85
136
|
def log_assignment(event)
|
86
137
|
if not event then return end
|
87
138
|
|
data/lib/eppo_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eppo-server-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eppo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description:
|
14
14
|
email:
|
15
15
|
- eppo-team@geteppo.com
|
16
16
|
executables: []
|
@@ -49,7 +49,7 @@ metadata:
|
|
49
49
|
homepage_uri: https://geteppo.com/
|
50
50
|
source_code_uri: https://github.com/Eppo-exp/ruby-sdk
|
51
51
|
wiki_uri: https://github.com/Eppo-exp/ruby-sdk/wiki
|
52
|
-
post_install_message:
|
52
|
+
post_install_message:
|
53
53
|
rdoc_options: []
|
54
54
|
require_paths:
|
55
55
|
- lib
|
@@ -64,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: 3.3.11
|
66
66
|
requirements: []
|
67
|
-
rubygems_version: 3.5.
|
68
|
-
signing_key:
|
67
|
+
rubygems_version: 3.5.11
|
68
|
+
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: Eppo SDK for Ruby
|
71
71
|
test_files: []
|