cedar_policy 0.6.2 → 0.7.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38c040a8b2a66186277adb6e3424840bc3e410444ddde470fad7f1e04a42ce61
4
- data.tar.gz: f4ee38c4f1de27d91353b4d9d9e80a85a5204f1eaa7450f67f94a417e67baf14
3
+ metadata.gz: fe7f2845fcb16229b54cebf0625824d3b3999e9ec6521de806b9fc5049ba42be
4
+ data.tar.gz: 830b3c15d0c6487ecc6ea6f5143fb4867f80e57798de17750403527ec46405c8
5
5
  SHA512:
6
- metadata.gz: b56d9cbd59da63236216dba57f539a27b9480b01aa18526463eac8d0f7299af38a1c8f52af4c2bc5c1821293cefb9a9d17c1cc62eb570e197add92f03f38dfce
7
- data.tar.gz: 6dac00819069fe90bd6dece4be28c489cd4fd9efe23ab827c59a37228f606e9ba8ffbf8b66766139a0e2cb5e6e09a2edd371dca73c9f321f4aef244311a0b4ac
6
+ metadata.gz: 54786f0bb83e1c4a5ff5bf8144fd307326fd1b73a56e10b394719e4fa34047b2b1b964d1af92d37f9158bf33f7a865335aa0d0c08ea1e0c8cb16900752fbdf13
7
+ data.tar.gz: d2a5fcbc4a4600a1bcea66486c53a29092a39b1093c4f0554224e55c8a9de031a9750c782c64098fca1d8173831af0e7b4cd13ff5585e6d1af576f296eeed53e
data/.cross_rubies CHANGED
@@ -33,3 +33,10 @@
33
33
  3.4:x86_64-darwin
34
34
  3.4:x86_64-linux-gnu
35
35
  3.4:x86_64-linux-musl
36
+ 4.0:aarch64-linux-gnu
37
+ 4.0:aarch64-linux-musl
38
+ 4.0:arm64-darwin
39
+ 4.0:x64-mingw-ucrt
40
+ 4.0:x86_64-darwin
41
+ 4.0:x86_64-linux-gnu
42
+ 4.0:x86_64-linux-musl
@@ -1 +1 @@
1
- {".":"0.6.2"}
1
+ {".":"0.7.1"}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.1](https://github.com/elct9620/cedar-policy-rb/compare/v0.7.0...v0.7.1) (2026-09-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add Ruby 4.0 to cross-compile matrix ([db45762](https://github.com/elct9620/cedar-policy-rb/commit/db457622f525cac5daae3b1f25b329aa3f9f3faf))
9
+
10
+ ## [0.7.0](https://github.com/elct9620/cedar-policy-rb/compare/v0.6.2...v0.7.0) (2026-02-26)
11
+
12
+
13
+ ### Features
14
+
15
+ * add policy_ids method to PolicySet ([3812daf](https://github.com/elct9620/cedar-policy-rb/commit/3812dafce10a6574c07316ec73e2e45c15fdcd9f))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **deps:** enable stable-api-compiled-fallback for Ruby 4.0 support ([c3603ec](https://github.com/elct9620/cedar-policy-rb/commit/c3603ec67e0aa25cba9f57a08c2906a1bb43ccce))
21
+
3
22
  ## [0.6.2](https://github.com/elct9620/cedar-policy-rb/compare/v0.6.1...v0.6.2) (2025-08-26)
4
23
 
5
24
 
data/Cargo.lock CHANGED
@@ -11,12 +11,6 @@ dependencies = [
11
11
  "memchr",
12
12
  ]
13
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
14
  [[package]]
21
15
  name = "android_system_properties"
22
16
  version = "0.1.5"
@@ -53,30 +47,22 @@ version = "0.22.1"
53
47
  source = "registry+https://github.com/rust-lang/crates.io-index"
54
48
  checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
55
49
 
56
- [[package]]
57
- name = "beef"
58
- version = "0.5.2"
59
- source = "registry+https://github.com/rust-lang/crates.io-index"
60
- checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
61
-
62
50
  [[package]]
63
51
  name = "bindgen"
64
- version = "0.69.5"
52
+ version = "0.72.1"
65
53
  source = "registry+https://github.com/rust-lang/crates.io-index"
66
- checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
54
+ checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
67
55
  dependencies = [
68
56
  "bitflags",
69
57
  "cexpr",
70
58
  "clang-sys",
71
59
  "itertools 0.12.1",
72
- "lazy_static",
73
- "lazycell",
74
60
  "proc-macro2",
75
61
  "quote",
76
62
  "regex",
77
63
  "rustc-hash",
78
64
  "shlex",
79
- "syn",
65
+ "syn 2.0.106",
80
66
  ]
81
67
 
82
68
  [[package]]
@@ -118,6 +104,15 @@ dependencies = [
118
104
  "cfg_aliases",
119
105
  ]
120
106
 
107
+ [[package]]
108
+ name = "bs58"
109
+ version = "0.5.1"
110
+ source = "registry+https://github.com/rust-lang/crates.io-index"
111
+ checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
112
+ dependencies = [
113
+ "tinyvec",
114
+ ]
115
+
121
116
  [[package]]
122
117
  name = "bumpalo"
123
118
  version = "3.19.0"
@@ -135,17 +130,16 @@ dependencies = [
135
130
 
136
131
  [[package]]
137
132
  name = "cedar-policy"
138
- version = "4.5.1"
133
+ version = "4.12.0"
139
134
  source = "registry+https://github.com/rust-lang/crates.io-index"
140
- checksum = "c48e6e6d7a17aabe41cf70c5613413ce0cc82f5f651357843bd02b8d41ca08a4"
135
+ checksum = "f73547a0114dff845fcb8d4877548a665fb8ff949a30cb0963444d6c30ffd962"
141
136
  dependencies = [
142
137
  "cedar-policy-core",
143
138
  "cedar-policy-formatter",
144
- "itertools 0.14.0",
145
- "lalrpop-util",
146
- "lazy_static",
139
+ "itertools 0.15.0",
140
+ "linked-hash-map",
141
+ "linked_hash_set",
147
142
  "miette",
148
- "nonempty",
149
143
  "ref-cast",
150
144
  "semver",
151
145
  "serde",
@@ -157,22 +151,23 @@ dependencies = [
157
151
 
158
152
  [[package]]
159
153
  name = "cedar-policy-core"
160
- version = "4.5.1"
154
+ version = "4.12.0"
161
155
  source = "registry+https://github.com/rust-lang/crates.io-index"
162
- checksum = "02b45be5c965ce63bec3d284fefe0e042342f4e77f149a1e7aafc045119df738"
156
+ checksum = "c9d9ec16707c7b60aa73b922dc255ec0b97b6892e8e58e45188b15d874ca3590"
163
157
  dependencies = [
164
158
  "chrono",
165
159
  "educe",
166
160
  "either",
167
- "itertools 0.14.0",
161
+ "itertools 0.15.0",
168
162
  "lalrpop",
169
163
  "lalrpop-util",
170
- "lazy_static",
164
+ "linked-hash-map",
165
+ "linked_hash_set",
171
166
  "miette",
172
167
  "nonempty",
173
168
  "ref-cast",
174
169
  "regex",
175
- "rustc_lexer",
170
+ "rustc-literal-escaper",
176
171
  "serde",
177
172
  "serde_json",
178
173
  "serde_with",
@@ -184,13 +179,12 @@ dependencies = [
184
179
 
185
180
  [[package]]
186
181
  name = "cedar-policy-formatter"
187
- version = "4.5.1"
182
+ version = "4.12.0"
188
183
  source = "registry+https://github.com/rust-lang/crates.io-index"
189
- checksum = "ddec9c888e3afff8000f92d7c93e20a32559301c65fb80683335fb8bb8bf2f35"
184
+ checksum = "2483b2fa74f74b1b3945bec59feb7a3fc0ea56b6fb35564ef300884dd8415d4b"
190
185
  dependencies = [
191
186
  "cedar-policy-core",
192
- "itertools 0.14.0",
193
- "lazy_static",
187
+ "itertools 0.15.0",
194
188
  "logos",
195
189
  "miette",
196
190
  "pretty",
@@ -200,10 +194,11 @@ dependencies = [
200
194
 
201
195
  [[package]]
202
196
  name = "cedar_policy"
203
- version = "0.6.2"
197
+ version = "0.7.1"
204
198
  dependencies = [
205
199
  "cedar-policy",
206
200
  "magnus",
201
+ "rb-sys",
207
202
  "serde_magnus",
208
203
  ]
209
204
 
@@ -230,15 +225,14 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
230
225
 
231
226
  [[package]]
232
227
  name = "chrono"
233
- version = "0.4.41"
228
+ version = "0.4.45"
234
229
  source = "registry+https://github.com/rust-lang/crates.io-index"
235
- checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
230
+ checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
236
231
  dependencies = [
237
- "android-tzdata",
238
232
  "iana-time-zone",
239
233
  "num-traits",
240
234
  "serde",
241
- "windows-link",
235
+ "windows-link 0.2.1",
242
236
  ]
243
237
 
244
238
  [[package]]
@@ -279,9 +273,9 @@ dependencies = [
279
273
 
280
274
  [[package]]
281
275
  name = "darling"
282
- version = "0.20.11"
276
+ version = "0.23.0"
283
277
  source = "registry+https://github.com/rust-lang/crates.io-index"
284
- checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
278
+ checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
285
279
  dependencies = [
286
280
  "darling_core",
287
281
  "darling_macro",
@@ -289,37 +283,36 @@ dependencies = [
289
283
 
290
284
  [[package]]
291
285
  name = "darling_core"
292
- version = "0.20.11"
286
+ version = "0.23.0"
293
287
  source = "registry+https://github.com/rust-lang/crates.io-index"
294
- checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
288
+ checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
295
289
  dependencies = [
296
- "fnv",
297
290
  "ident_case",
298
291
  "proc-macro2",
299
292
  "quote",
300
293
  "strsim",
301
- "syn",
294
+ "syn 2.0.106",
302
295
  ]
303
296
 
304
297
  [[package]]
305
298
  name = "darling_macro"
306
- version = "0.20.11"
299
+ version = "0.23.0"
307
300
  source = "registry+https://github.com/rust-lang/crates.io-index"
308
- checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
301
+ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
309
302
  dependencies = [
310
303
  "darling_core",
311
304
  "quote",
312
- "syn",
305
+ "syn 2.0.106",
313
306
  ]
314
307
 
315
308
  [[package]]
316
309
  name = "deranged"
317
- version = "0.4.0"
310
+ version = "0.5.5"
318
311
  source = "registry+https://github.com/rust-lang/crates.io-index"
319
- checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
312
+ checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
320
313
  dependencies = [
321
314
  "powerfmt",
322
- "serde",
315
+ "serde_core",
323
316
  ]
324
317
 
325
318
  [[package]]
@@ -340,21 +333,21 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
340
333
 
341
334
  [[package]]
342
335
  name = "educe"
343
- version = "0.6.0"
336
+ version = "0.7.6"
344
337
  source = "registry+https://github.com/rust-lang/crates.io-index"
345
- checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417"
338
+ checksum = "e451fac8dd8dece16234604bf1efce6e90fddd8ab6ad4d66eec0eca5160959dd"
346
339
  dependencies = [
347
340
  "enum-ordinalize",
348
341
  "proc-macro2",
349
342
  "quote",
350
- "syn",
343
+ "syn 3.0.3",
351
344
  ]
352
345
 
353
346
  [[package]]
354
347
  name = "either"
355
- version = "1.15.0"
348
+ version = "1.17.0"
356
349
  source = "registry+https://github.com/rust-lang/crates.io-index"
357
- checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
350
+ checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
358
351
 
359
352
  [[package]]
360
353
  name = "ena"
@@ -367,22 +360,22 @@ dependencies = [
367
360
 
368
361
  [[package]]
369
362
  name = "enum-ordinalize"
370
- version = "4.3.0"
363
+ version = "4.4.2"
371
364
  source = "registry+https://github.com/rust-lang/crates.io-index"
372
- checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5"
365
+ checksum = "89dd01549b09589510cf0647475075d12071456586d70f5c75c98ae2a5537677"
373
366
  dependencies = [
374
367
  "enum-ordinalize-derive",
375
368
  ]
376
369
 
377
370
  [[package]]
378
371
  name = "enum-ordinalize-derive"
379
- version = "4.3.1"
372
+ version = "4.4.2"
380
373
  source = "registry+https://github.com/rust-lang/crates.io-index"
381
- checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff"
374
+ checksum = "a65863d15a4ce2888bd2f0f543cc963d3879c3a022c8ee43f6141d479a3ac815"
382
375
  dependencies = [
383
376
  "proc-macro2",
384
377
  "quote",
385
- "syn",
378
+ "syn 3.0.3",
386
379
  ]
387
380
 
388
381
  [[package]]
@@ -507,6 +500,15 @@ dependencies = [
507
500
  "either",
508
501
  ]
509
502
 
503
+ [[package]]
504
+ name = "itertools"
505
+ version = "0.15.0"
506
+ source = "registry+https://github.com/rust-lang/crates.io-index"
507
+ checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"
508
+ dependencies = [
509
+ "either",
510
+ ]
511
+
510
512
  [[package]]
511
513
  name = "itoa"
512
514
  version = "1.0.15"
@@ -525,9 +527,9 @@ dependencies = [
525
527
 
526
528
  [[package]]
527
529
  name = "keccak"
528
- version = "0.1.5"
530
+ version = "0.1.6"
529
531
  source = "registry+https://github.com/rust-lang/crates.io-index"
530
- checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654"
532
+ checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653"
531
533
  dependencies = [
532
534
  "cpufeatures",
533
535
  ]
@@ -570,12 +572,6 @@ version = "1.5.0"
570
572
  source = "registry+https://github.com/rust-lang/crates.io-index"
571
573
  checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
572
574
 
573
- [[package]]
574
- name = "lazycell"
575
- version = "1.3.0"
576
- source = "registry+https://github.com/rust-lang/crates.io-index"
577
- checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
578
-
579
575
  [[package]]
580
576
  name = "libc"
581
577
  version = "0.2.175"
@@ -592,6 +588,24 @@ dependencies = [
592
588
  "windows-targets 0.53.3",
593
589
  ]
594
590
 
591
+ [[package]]
592
+ name = "linked-hash-map"
593
+ version = "0.5.6"
594
+ source = "registry+https://github.com/rust-lang/crates.io-index"
595
+ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
596
+ dependencies = [
597
+ "serde",
598
+ ]
599
+
600
+ [[package]]
601
+ name = "linked_hash_set"
602
+ version = "0.1.6"
603
+ source = "registry+https://github.com/rust-lang/crates.io-index"
604
+ checksum = "984fb35d06508d1e69fc91050cceba9c0b748f983e6739fa2c7a9237154c52c8"
605
+ dependencies = [
606
+ "linked-hash-map",
607
+ ]
608
+
595
609
  [[package]]
596
610
  name = "lock_api"
597
611
  version = "0.4.13"
@@ -610,43 +624,41 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
610
624
 
611
625
  [[package]]
612
626
  name = "logos"
613
- version = "0.15.1"
627
+ version = "0.16.1"
614
628
  source = "registry+https://github.com/rust-lang/crates.io-index"
615
- checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154"
629
+ checksum = "eb2c55a318a87600ea870ff8c2012148b44bf18b74fad48d0f835c38c7d07c5f"
616
630
  dependencies = [
617
631
  "logos-derive",
618
632
  ]
619
633
 
620
634
  [[package]]
621
635
  name = "logos-codegen"
622
- version = "0.15.1"
636
+ version = "0.16.1"
623
637
  source = "registry+https://github.com/rust-lang/crates.io-index"
624
- checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c"
638
+ checksum = "58b3ffaa284e1350d017a57d04ada118c4583cf260c8fb01e0fe28a2e9cf8970"
625
639
  dependencies = [
626
- "beef",
627
640
  "fnv",
628
- "lazy_static",
629
641
  "proc-macro2",
630
642
  "quote",
643
+ "regex-automata",
631
644
  "regex-syntax",
632
- "rustc_version",
633
- "syn",
645
+ "syn 2.0.106",
634
646
  ]
635
647
 
636
648
  [[package]]
637
649
  name = "logos-derive"
638
- version = "0.15.1"
650
+ version = "0.16.1"
639
651
  source = "registry+https://github.com/rust-lang/crates.io-index"
640
- checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470"
652
+ checksum = "52d3a9855747c17eaf4383823f135220716ab49bea5fbea7dd42cc9a92f8aa31"
641
653
  dependencies = [
642
654
  "logos-codegen",
643
655
  ]
644
656
 
645
657
  [[package]]
646
658
  name = "magnus"
647
- version = "0.7.1"
659
+ version = "0.8.2"
648
660
  source = "registry+https://github.com/rust-lang/crates.io-index"
649
- checksum = "3d87ae53030f3a22e83879e666cb94e58a7bdf31706878a0ba48752994146dab"
661
+ checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
650
662
  dependencies = [
651
663
  "magnus-macros",
652
664
  "rb-sys",
@@ -656,13 +668,13 @@ dependencies = [
656
668
 
657
669
  [[package]]
658
670
  name = "magnus-macros"
659
- version = "0.6.0"
671
+ version = "0.8.0"
660
672
  source = "registry+https://github.com/rust-lang/crates.io-index"
661
- checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
673
+ checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
662
674
  dependencies = [
663
675
  "proc-macro2",
664
676
  "quote",
665
- "syn",
677
+ "syn 2.0.106",
666
678
  ]
667
679
 
668
680
  [[package]]
@@ -680,7 +692,7 @@ dependencies = [
680
692
  "cfg-if",
681
693
  "miette-derive",
682
694
  "serde",
683
- "unicode-width",
695
+ "unicode-width 0.1.14",
684
696
  ]
685
697
 
686
698
  [[package]]
@@ -691,7 +703,7 @@ checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b"
691
703
  dependencies = [
692
704
  "proc-macro2",
693
705
  "quote",
694
- "syn",
706
+ "syn 2.0.106",
695
707
  ]
696
708
 
697
709
  [[package]]
@@ -718,18 +730,18 @@ dependencies = [
718
730
 
719
731
  [[package]]
720
732
  name = "nonempty"
721
- version = "0.10.0"
733
+ version = "0.12.0"
722
734
  source = "registry+https://github.com/rust-lang/crates.io-index"
723
- checksum = "303e8749c804ccd6ca3b428de7fe0d86cb86bc7606bc15291f100fd487960bb8"
735
+ checksum = "9737e026353e5cd0736f98eddae28665118eb6f6600902a7f50db585621fecb6"
724
736
  dependencies = [
725
737
  "serde",
726
738
  ]
727
739
 
728
740
  [[package]]
729
741
  name = "num-conv"
730
- version = "0.1.0"
742
+ version = "0.2.0"
731
743
  source = "registry+https://github.com/rust-lang/crates.io-index"
732
- checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
744
+ checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
733
745
 
734
746
  [[package]]
735
747
  name = "num-traits"
@@ -808,13 +820,13 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
808
820
 
809
821
  [[package]]
810
822
  name = "pretty"
811
- version = "0.12.4"
823
+ version = "0.12.5"
812
824
  source = "registry+https://github.com/rust-lang/crates.io-index"
813
- checksum = "ac98773b7109bc75f475ab5a134c9b64b87e59d776d31098d8f346922396a477"
825
+ checksum = "0d22152487193190344590e4f30e219cf3fe140d9e7a3fdb683d82aa2c5f4156"
814
826
  dependencies = [
815
827
  "arrayvec",
816
828
  "typed-arena",
817
- "unicode-width",
829
+ "unicode-width 0.2.2",
818
830
  ]
819
831
 
820
832
  [[package]]
@@ -837,27 +849,27 @@ dependencies = [
837
849
 
838
850
  [[package]]
839
851
  name = "quote"
840
- version = "1.0.40"
852
+ version = "1.0.47"
841
853
  source = "registry+https://github.com/rust-lang/crates.io-index"
842
- checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
854
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
843
855
  dependencies = [
844
856
  "proc-macro2",
845
857
  ]
846
858
 
847
859
  [[package]]
848
860
  name = "rb-sys"
849
- version = "0.9.117"
861
+ version = "0.9.130"
850
862
  source = "registry+https://github.com/rust-lang/crates.io-index"
851
- checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
863
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
852
864
  dependencies = [
853
865
  "rb-sys-build",
854
866
  ]
855
867
 
856
868
  [[package]]
857
869
  name = "rb-sys-build"
858
- version = "0.9.117"
870
+ version = "0.9.130"
859
871
  source = "registry+https://github.com/rust-lang/crates.io-index"
860
- checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
872
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
861
873
  dependencies = [
862
874
  "bindgen",
863
875
  "lazy_static",
@@ -865,14 +877,14 @@ dependencies = [
865
877
  "quote",
866
878
  "regex",
867
879
  "shell-words",
868
- "syn",
880
+ "syn 2.0.106",
869
881
  ]
870
882
 
871
883
  [[package]]
872
884
  name = "rb-sys-env"
873
- version = "0.1.2"
885
+ version = "0.2.2"
874
886
  source = "registry+https://github.com/rust-lang/crates.io-index"
875
- checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
887
+ checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
876
888
 
877
889
  [[package]]
878
890
  name = "redox_syscall"
@@ -900,14 +912,14 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7"
900
912
  dependencies = [
901
913
  "proc-macro2",
902
914
  "quote",
903
- "syn",
915
+ "syn 2.0.106",
904
916
  ]
905
917
 
906
918
  [[package]]
907
919
  name = "regex"
908
- version = "1.11.2"
920
+ version = "1.13.1"
909
921
  source = "registry+https://github.com/rust-lang/crates.io-index"
910
- checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
922
+ checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
911
923
  dependencies = [
912
924
  "aho-corasick",
913
925
  "memchr",
@@ -917,9 +929,9 @@ dependencies = [
917
929
 
918
930
  [[package]]
919
931
  name = "regex-automata"
920
- version = "0.4.10"
932
+ version = "0.4.16"
921
933
  source = "registry+https://github.com/rust-lang/crates.io-index"
922
- checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
934
+ checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
923
935
  dependencies = [
924
936
  "aho-corasick",
925
937
  "memchr",
@@ -928,33 +940,21 @@ dependencies = [
928
940
 
929
941
  [[package]]
930
942
  name = "regex-syntax"
931
- version = "0.8.6"
943
+ version = "0.8.11"
932
944
  source = "registry+https://github.com/rust-lang/crates.io-index"
933
- checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
945
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
934
946
 
935
947
  [[package]]
936
948
  name = "rustc-hash"
937
- version = "1.1.0"
949
+ version = "2.1.2"
938
950
  source = "registry+https://github.com/rust-lang/crates.io-index"
939
- checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
951
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
940
952
 
941
953
  [[package]]
942
- name = "rustc_lexer"
943
- version = "0.1.0"
954
+ name = "rustc-literal-escaper"
955
+ version = "0.0.8"
944
956
  source = "registry+https://github.com/rust-lang/crates.io-index"
945
- checksum = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5"
946
- dependencies = [
947
- "unicode-xid",
948
- ]
949
-
950
- [[package]]
951
- name = "rustc_version"
952
- version = "0.4.1"
953
- source = "registry+https://github.com/rust-lang/crates.io-index"
954
- checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
955
- dependencies = [
956
- "semver",
957
- ]
957
+ checksum = "bfe6f213fb658c8fb95baabd5420393438cf5a98d707f5dd701d9197c705f71e"
958
958
 
959
959
  [[package]]
960
960
  name = "rustversion"
@@ -1009,9 +1009,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1009
1009
 
1010
1010
  [[package]]
1011
1011
  name = "semver"
1012
- version = "1.0.26"
1012
+ version = "1.0.28"
1013
1013
  source = "registry+https://github.com/rust-lang/crates.io-index"
1014
- checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
1014
+ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
1015
1015
 
1016
1016
  [[package]]
1017
1017
  name = "seq-macro"
@@ -1021,42 +1021,53 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
1021
1021
 
1022
1022
  [[package]]
1023
1023
  name = "serde"
1024
- version = "1.0.219"
1024
+ version = "1.0.228"
1025
1025
  source = "registry+https://github.com/rust-lang/crates.io-index"
1026
- checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
1026
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
1027
+ dependencies = [
1028
+ "serde_core",
1029
+ "serde_derive",
1030
+ ]
1031
+
1032
+ [[package]]
1033
+ name = "serde_core"
1034
+ version = "1.0.228"
1035
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1036
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
1027
1037
  dependencies = [
1028
1038
  "serde_derive",
1029
1039
  ]
1030
1040
 
1031
1041
  [[package]]
1032
1042
  name = "serde_derive"
1033
- version = "1.0.219"
1043
+ version = "1.0.228"
1034
1044
  source = "registry+https://github.com/rust-lang/crates.io-index"
1035
- checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
1045
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
1036
1046
  dependencies = [
1037
1047
  "proc-macro2",
1038
1048
  "quote",
1039
- "syn",
1049
+ "syn 2.0.106",
1040
1050
  ]
1041
1051
 
1042
1052
  [[package]]
1043
1053
  name = "serde_json"
1044
- version = "1.0.143"
1054
+ version = "1.0.145"
1045
1055
  source = "registry+https://github.com/rust-lang/crates.io-index"
1046
- checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
1056
+ checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
1047
1057
  dependencies = [
1048
1058
  "indexmap 2.11.0",
1049
1059
  "itoa",
1050
1060
  "memchr",
1051
1061
  "ryu",
1052
1062
  "serde",
1063
+ "serde_core",
1053
1064
  ]
1054
1065
 
1055
1066
  [[package]]
1056
1067
  name = "serde_magnus"
1057
- version = "0.9.0"
1068
+ version = "0.11.0"
1058
1069
  source = "registry+https://github.com/rust-lang/crates.io-index"
1059
- checksum = "51b8b945a2dadb221f1c5490cfb411cab6c3821446b8eca50ee07e5a3893ec51"
1070
+ checksum = "8ff64c88ddd26acdcad5a501f18bcc339927b77b69f4a03bfaf2a6fc5ba2ac4b"
1060
1071
  dependencies = [
1061
1072
  "magnus",
1062
1073
  "serde",
@@ -1065,19 +1076,19 @@ dependencies = [
1065
1076
 
1066
1077
  [[package]]
1067
1078
  name = "serde_with"
1068
- version = "3.14.0"
1079
+ version = "3.21.0"
1069
1080
  source = "registry+https://github.com/rust-lang/crates.io-index"
1070
- checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5"
1081
+ checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c"
1071
1082
  dependencies = [
1072
1083
  "base64",
1084
+ "bs58",
1073
1085
  "chrono",
1074
1086
  "hex",
1075
1087
  "indexmap 1.9.3",
1076
1088
  "indexmap 2.11.0",
1077
1089
  "schemars 0.9.0",
1078
1090
  "schemars 1.0.4",
1079
- "serde",
1080
- "serde_derive",
1091
+ "serde_core",
1081
1092
  "serde_json",
1082
1093
  "serde_with_macros",
1083
1094
  "time",
@@ -1085,14 +1096,14 @@ dependencies = [
1085
1096
 
1086
1097
  [[package]]
1087
1098
  name = "serde_with_macros"
1088
- version = "3.14.0"
1099
+ version = "3.21.0"
1089
1100
  source = "registry+https://github.com/rust-lang/crates.io-index"
1090
- checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f"
1101
+ checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660"
1091
1102
  dependencies = [
1092
1103
  "darling",
1093
1104
  "proc-macro2",
1094
1105
  "quote",
1095
- "syn",
1106
+ "syn 2.0.106",
1096
1107
  ]
1097
1108
 
1098
1109
  [[package]]
@@ -1141,15 +1152,15 @@ dependencies = [
1141
1152
 
1142
1153
  [[package]]
1143
1154
  name = "stacker"
1144
- version = "0.1.21"
1155
+ version = "0.1.24"
1145
1156
  source = "registry+https://github.com/rust-lang/crates.io-index"
1146
- checksum = "cddb07e32ddb770749da91081d8d0ac3a16f1a569a18b20348cd371f5dead06b"
1157
+ checksum = "640c8cdd92b6b12f5bcb1803ca3bbf5ab96e5e6b6b96b9ab77dabe9e880b3190"
1147
1158
  dependencies = [
1148
1159
  "cc",
1149
1160
  "cfg-if",
1150
1161
  "libc",
1151
1162
  "psm",
1152
- "windows-sys 0.59.0",
1163
+ "windows-sys",
1153
1164
  ]
1154
1165
 
1155
1166
  [[package]]
@@ -1181,6 +1192,17 @@ dependencies = [
1181
1192
  "unicode-ident",
1182
1193
  ]
1183
1194
 
1195
+ [[package]]
1196
+ name = "syn"
1197
+ version = "3.0.3"
1198
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1199
+ checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
1200
+ dependencies = [
1201
+ "proc-macro2",
1202
+ "quote",
1203
+ "unicode-ident",
1204
+ ]
1205
+
1184
1206
  [[package]]
1185
1207
  name = "tap"
1186
1208
  version = "1.0.1"
@@ -1193,7 +1215,7 @@ version = "1.1.0"
1193
1215
  source = "registry+https://github.com/rust-lang/crates.io-index"
1194
1216
  checksum = "a43bddab41f8626c7bdaab872bbba75f8df5847b516d77c569c746e2ae5eb746"
1195
1217
  dependencies = [
1196
- "windows-sys 0.60.2",
1218
+ "windows-sys",
1197
1219
  ]
1198
1220
 
1199
1221
  [[package]]
@@ -1213,35 +1235,35 @@ checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
1213
1235
  dependencies = [
1214
1236
  "proc-macro2",
1215
1237
  "quote",
1216
- "syn",
1238
+ "syn 2.0.106",
1217
1239
  ]
1218
1240
 
1219
1241
  [[package]]
1220
1242
  name = "time"
1221
- version = "0.3.41"
1243
+ version = "0.3.47"
1222
1244
  source = "registry+https://github.com/rust-lang/crates.io-index"
1223
- checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
1245
+ checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
1224
1246
  dependencies = [
1225
1247
  "deranged",
1226
1248
  "itoa",
1227
1249
  "num-conv",
1228
1250
  "powerfmt",
1229
- "serde",
1251
+ "serde_core",
1230
1252
  "time-core",
1231
1253
  "time-macros",
1232
1254
  ]
1233
1255
 
1234
1256
  [[package]]
1235
1257
  name = "time-core"
1236
- version = "0.1.4"
1258
+ version = "0.1.8"
1237
1259
  source = "registry+https://github.com/rust-lang/crates.io-index"
1238
- checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
1260
+ checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
1239
1261
 
1240
1262
  [[package]]
1241
1263
  name = "time-macros"
1242
- version = "0.2.22"
1264
+ version = "0.2.27"
1243
1265
  source = "registry+https://github.com/rust-lang/crates.io-index"
1244
- checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
1266
+ checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
1245
1267
  dependencies = [
1246
1268
  "num-conv",
1247
1269
  "time-core",
@@ -1311,6 +1333,12 @@ version = "0.1.14"
1311
1333
  source = "registry+https://github.com/rust-lang/crates.io-index"
1312
1334
  checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
1313
1335
 
1336
+ [[package]]
1337
+ name = "unicode-width"
1338
+ version = "0.2.2"
1339
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1340
+ checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
1341
+
1314
1342
  [[package]]
1315
1343
  name = "unicode-xid"
1316
1344
  version = "0.2.6"
@@ -1355,7 +1383,7 @@ dependencies = [
1355
1383
  "log",
1356
1384
  "proc-macro2",
1357
1385
  "quote",
1358
- "syn",
1386
+ "syn 2.0.106",
1359
1387
  "wasm-bindgen-shared",
1360
1388
  ]
1361
1389
 
@@ -1377,7 +1405,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
1377
1405
  dependencies = [
1378
1406
  "proc-macro2",
1379
1407
  "quote",
1380
- "syn",
1408
+ "syn 2.0.106",
1381
1409
  "wasm-bindgen-backend",
1382
1410
  "wasm-bindgen-shared",
1383
1411
  ]
@@ -1397,7 +1425,7 @@ version = "0.1.10"
1397
1425
  source = "registry+https://github.com/rust-lang/crates.io-index"
1398
1426
  checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22"
1399
1427
  dependencies = [
1400
- "windows-sys 0.60.2",
1428
+ "windows-sys",
1401
1429
  ]
1402
1430
 
1403
1431
  [[package]]
@@ -1408,7 +1436,7 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
1408
1436
  dependencies = [
1409
1437
  "windows-implement",
1410
1438
  "windows-interface",
1411
- "windows-link",
1439
+ "windows-link 0.1.3",
1412
1440
  "windows-result",
1413
1441
  "windows-strings",
1414
1442
  ]
@@ -1421,7 +1449,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
1421
1449
  dependencies = [
1422
1450
  "proc-macro2",
1423
1451
  "quote",
1424
- "syn",
1452
+ "syn 2.0.106",
1425
1453
  ]
1426
1454
 
1427
1455
  [[package]]
@@ -1432,7 +1460,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
1432
1460
  dependencies = [
1433
1461
  "proc-macro2",
1434
1462
  "quote",
1435
- "syn",
1463
+ "syn 2.0.106",
1436
1464
  ]
1437
1465
 
1438
1466
  [[package]]
@@ -1441,13 +1469,19 @@ version = "0.1.3"
1441
1469
  source = "registry+https://github.com/rust-lang/crates.io-index"
1442
1470
  checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
1443
1471
 
1472
+ [[package]]
1473
+ name = "windows-link"
1474
+ version = "0.2.1"
1475
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1476
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
1477
+
1444
1478
  [[package]]
1445
1479
  name = "windows-result"
1446
1480
  version = "0.3.4"
1447
1481
  source = "registry+https://github.com/rust-lang/crates.io-index"
1448
1482
  checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
1449
1483
  dependencies = [
1450
- "windows-link",
1484
+ "windows-link 0.1.3",
1451
1485
  ]
1452
1486
 
1453
1487
  [[package]]
@@ -1456,16 +1490,7 @@ version = "0.4.2"
1456
1490
  source = "registry+https://github.com/rust-lang/crates.io-index"
1457
1491
  checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
1458
1492
  dependencies = [
1459
- "windows-link",
1460
- ]
1461
-
1462
- [[package]]
1463
- name = "windows-sys"
1464
- version = "0.59.0"
1465
- source = "registry+https://github.com/rust-lang/crates.io-index"
1466
- checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
1467
- dependencies = [
1468
- "windows-targets 0.52.6",
1493
+ "windows-link 0.1.3",
1469
1494
  ]
1470
1495
 
1471
1496
  [[package]]
@@ -1499,7 +1524,7 @@ version = "0.53.3"
1499
1524
  source = "registry+https://github.com/rust-lang/crates.io-index"
1500
1525
  checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
1501
1526
  dependencies = [
1502
- "windows-link",
1527
+ "windows-link 0.1.3",
1503
1528
  "windows_aarch64_gnullvm 0.53.0",
1504
1529
  "windows_aarch64_msvc 0.53.0",
1505
1530
  "windows_i686_gnu 0.53.0",
data/README.md CHANGED
@@ -40,7 +40,7 @@ policy_set = CedarPolicy::PolicySet.new(policy)
40
40
  Prepare the Entity's ID via `EntityUid` or an object with `#to_hash` method which returns a hash with `:type` and `:id` keys.
41
41
 
42
42
  ```ruby
43
- principal = CedarPolicy::EntityUid.new("User", "1") # or { type: "User", id: "1" }
43
+ principal = CedarPolicy::EntityUid.new("AdminUser", "1") # or { type: "AdminUser", id: "1" }
44
44
  action = CedarPolicy::EntityUid.new("Action", "view")
45
45
  resource = CedarPolicy::EntityUid.new("Image", "1")
46
46
  ```
@@ -85,10 +85,10 @@ Create an `Authorizer` object and authorize the request with the policy set and
85
85
  authorizer = CedarPolicy::Authorizer.new
86
86
  ```
87
87
 
88
- If boolean result is enough, use `#authorize?` method.
88
+ If boolean result is enough, use `#authorized?` method.
89
89
 
90
90
  ```ruby
91
- authorizer.authorize?(request, policy_set, entities) # => true
91
+ authorizer.authorized?(request, policy_set, entities) # => true
92
92
  ```
93
93
 
94
94
  If you want to get the decision object, use `#authorize` method.
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "cedar_policy"
3
- version = "0.6.2"
3
+ version = "0.7.1"
4
4
  edition = "2021"
5
5
  authors = ["Aotokitsuruya <contact@aotoki.me>"]
6
6
  license = "Apache-2.0"
@@ -10,6 +10,7 @@ publish = false
10
10
  crate-type = ["cdylib"]
11
11
 
12
12
  [dependencies]
13
- cedar-policy = "4.5.1"
14
- magnus = "0.7.1"
15
- serde_magnus = "0.9.0"
13
+ cedar-policy = "4.11.0"
14
+ magnus = "0.8.2"
15
+ rb-sys = { version = ">=0.9.113", features = ["stable-api-compiled-fallback"] }
16
+ serde_magnus = "0.11.0"
@@ -28,7 +28,7 @@ impl TryConvert for ContextWrapper {
28
28
  match value.respond_to("to_hash", false) {
29
29
  Ok(true) => {
30
30
  let value: Value = value.funcall_public("to_hash", ())?;
31
- let value: JsonValueWithNoDuplicateKeys = deserialize(value)?;
31
+ let value: JsonValueWithNoDuplicateKeys = deserialize(&handle, value)?;
32
32
  Ok(Self(Context::from_json_value(value.into(), None).map_err(
33
33
  |e| Error::new(handle.exception_runtime_error(), e.to_string()),
34
34
  )?))
@@ -12,12 +12,9 @@ impl RDiagnostics {
12
12
  }
13
13
 
14
14
  fn errors(&self) -> RArray {
15
- let errors = self
16
- .0
17
- .errors()
18
- .map(|e| RAuthorizationError::from(e.clone()));
19
-
20
- RArray::from_iter(errors)
15
+ let ruby = Ruby::get()
16
+ .expect("errors() can only be called from a Ruby thread");
17
+ ruby.ary_from_iter(self.0.errors().cloned().map(RAuthorizationError::from))
21
18
  }
22
19
  }
23
20
 
@@ -28,7 +28,7 @@ impl TryConvert for EntitiesWrapper {
28
28
  match value.respond_to("to_ary", false) {
29
29
  Ok(true) => {
30
30
  let value: Value = value.funcall_public("to_ary", ())?;
31
- let value: JsonValueWithNoDuplicateKeys = deserialize(value)?;
31
+ let value: JsonValueWithNoDuplicateKeys = deserialize(&handle, value)?;
32
32
  Ok(Self(
33
33
  Entities::from_json_value(value.into(), None)
34
34
  .map_err(|e| Error::new(handle.exception_arg_error(), e.to_string()))?,
@@ -34,7 +34,7 @@ impl IntoValue for EntityUidWrapper {
34
34
  let id = self.0.id().escaped().to_string();
35
35
  let class = handle.get_inner(&ENTITY_UID);
36
36
 
37
- return class.new_instance((type_name, id)).unwrap().into();
37
+ class.new_instance((type_name, id)).unwrap().into()
38
38
  }
39
39
  }
40
40
 
@@ -44,7 +44,7 @@ impl TryConvert for EntityUidWrapper {
44
44
  match value.respond_to("to_hash", false) {
45
45
  Ok(true) => {
46
46
  let value: Value = value.funcall_public("to_hash", ())?;
47
- let value: JsonValueWithNoDuplicateKeys = deserialize(value)?;
47
+ let value: JsonValueWithNoDuplicateKeys = deserialize(&ruby, value)?;
48
48
  Ok(Self(EntityUid::from_json(value.into()).map_err(|e| {
49
49
  Error::new(ruby.get_inner(&PARSE_ERROR), e.to_string())
50
50
  })?))
@@ -61,7 +61,9 @@ impl TryConvert for EntityUidWrapper {
61
61
  }
62
62
 
63
63
  pub fn to_euid_value(euid: &EntityUid) -> Value {
64
- EntityUidWrapper::new(euid.clone()).into_value_with(&Ruby::get().unwrap())
64
+ let ruby = Ruby::get()
65
+ .expect("to_euid_value() can only be called from a Ruby thread");
66
+ EntityUidWrapper::new(euid.clone()).into_value_with(&ruby)
65
67
  }
66
68
 
67
69
  pub fn init(ruby: &Ruby) -> Result<(), Error> {
@@ -23,6 +23,17 @@ impl RPolicySet {
23
23
  fn is_empty(&self) -> bool {
24
24
  self.0.is_empty()
25
25
  }
26
+
27
+ fn policy_ids(&self) -> Vec<String> {
28
+ self.0.policies()
29
+ .map(|policy| {
30
+ // Try to get the @id annotation first, fall back to auto-generated ID
31
+ policy.annotation("id")
32
+ .map(|s| s.to_string())
33
+ .unwrap_or_else(|| policy.id().to_string())
34
+ })
35
+ .collect()
36
+ }
26
37
  }
27
38
 
28
39
  impl From<&RPolicySet> for PolicySet {
@@ -43,6 +54,7 @@ pub fn init(ruby: &Ruby, module: &RModule) -> Result<(), Error> {
43
54
  let class = module.define_class("PolicySet", ruby.class_object())?;
44
55
  class.define_singleton_method("new", function!(RPolicySet::new, -1))?;
45
56
  class.define_method("empty?", method!(RPolicySet::is_empty, 0))?;
57
+ class.define_method("policy_ids", method!(RPolicySet::policy_ids, 0))?;
46
58
 
47
59
  Ok(())
48
60
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CedarPolicy
4
- VERSION = "0.6.2"
4
+ VERSION = "0.7.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cedar_policy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aotokitsuruya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-26 00:00:00.000000000 Z
11
+ date: 2026-09-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby bindings for Cedar policy evaluation engine.
14
14
  email: