crawlberg 1.0.5 → 1.0.6
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/ext/crawlberg_rb/native/Cargo.lock +109 -98
- data/ext/crawlberg_rb/native/Cargo.toml +1 -1
- data/ext/crawlberg_rb/native/extconf.rb +0 -3
- data/ext/crawlberg_rb/src/lib.rs +9 -63
- data/lib/crawlberg/native.rb +0 -41
- data/lib/crawlberg/version.rb +2 -2
- data/lib/crawlberg.rb +0 -8
- data/lib/crawlberg_rb.so +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17731c92c829736d33bf67628c468090b0c26eb7c954400f903c26a218d847a6
|
|
4
|
+
data.tar.gz: 3cff6ead7fe4fd614cf1b146c335b62003fc56afe72371cc5e33904763007eb0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26999a0d5e86b342346efe9bac77d3df83eab4bc711975b3fd13fbd8ffa9dba4fe4b6e7e6a0e9b6d7f5817d00693b297848afd8b437a39b5e86f51ee164bd7e6
|
|
7
|
+
data.tar.gz: 5e706e14c721f98aead1188e6802adcfa6c23139c47a2e5939c00d4c663b1d6fecc9e29437775f69a813644b8d1abd479dce5a088e4e756bf6519b00b6327feb
|
|
@@ -111,7 +111,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
|
|
|
111
111
|
dependencies = [
|
|
112
112
|
"proc-macro2",
|
|
113
113
|
"quote",
|
|
114
|
-
"syn",
|
|
114
|
+
"syn 2.0.119",
|
|
115
115
|
]
|
|
116
116
|
|
|
117
117
|
[[package]]
|
|
@@ -187,14 +187,14 @@ dependencies = [
|
|
|
187
187
|
"regex",
|
|
188
188
|
"rustc-hash",
|
|
189
189
|
"shlex 1.3.0",
|
|
190
|
-
"syn",
|
|
190
|
+
"syn 2.0.119",
|
|
191
191
|
]
|
|
192
192
|
|
|
193
193
|
[[package]]
|
|
194
194
|
name = "bitflags"
|
|
195
|
-
version = "2.13.
|
|
195
|
+
version = "2.13.1"
|
|
196
196
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
197
|
-
checksum = "
|
|
197
|
+
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
|
|
198
198
|
|
|
199
199
|
[[package]]
|
|
200
200
|
name = "blake3"
|
|
@@ -269,15 +269,15 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
|
|
|
269
269
|
|
|
270
270
|
[[package]]
|
|
271
271
|
name = "bytes"
|
|
272
|
-
version = "1.12.
|
|
272
|
+
version = "1.12.1"
|
|
273
273
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
-
checksum = "
|
|
274
|
+
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
275
275
|
|
|
276
276
|
[[package]]
|
|
277
277
|
name = "cc"
|
|
278
|
-
version = "1.
|
|
278
|
+
version = "1.3.0"
|
|
279
279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
-
checksum = "
|
|
280
|
+
checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"
|
|
281
281
|
dependencies = [
|
|
282
282
|
"find-msvc-tools",
|
|
283
283
|
"jobserver",
|
|
@@ -545,9 +545,9 @@ dependencies = [
|
|
|
545
545
|
|
|
546
546
|
[[package]]
|
|
547
547
|
name = "crawlberg"
|
|
548
|
-
version = "1.0.
|
|
548
|
+
version = "1.0.6"
|
|
549
549
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
550
|
-
checksum = "
|
|
550
|
+
checksum = "891e3e09fe06aa50b422b9c42b1393693c80a3a1bd544e9b9c7036259f470640"
|
|
551
551
|
dependencies = [
|
|
552
552
|
"ahash",
|
|
553
553
|
"aho-corasick",
|
|
@@ -714,7 +714,7 @@ checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"
|
|
|
714
714
|
dependencies = [
|
|
715
715
|
"proc-macro2",
|
|
716
716
|
"quote",
|
|
717
|
-
"syn",
|
|
717
|
+
"syn 2.0.119",
|
|
718
718
|
]
|
|
719
719
|
|
|
720
720
|
[[package]]
|
|
@@ -832,9 +832,9 @@ dependencies = [
|
|
|
832
832
|
|
|
833
833
|
[[package]]
|
|
834
834
|
name = "futures"
|
|
835
|
-
version = "0.3.
|
|
835
|
+
version = "0.3.33"
|
|
836
836
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
837
|
-
checksum = "
|
|
837
|
+
checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218"
|
|
838
838
|
dependencies = [
|
|
839
839
|
"futures-channel",
|
|
840
840
|
"futures-core",
|
|
@@ -847,9 +847,9 @@ dependencies = [
|
|
|
847
847
|
|
|
848
848
|
[[package]]
|
|
849
849
|
name = "futures-channel"
|
|
850
|
-
version = "0.3.
|
|
850
|
+
version = "0.3.33"
|
|
851
851
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
852
|
-
checksum = "
|
|
852
|
+
checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
|
|
853
853
|
dependencies = [
|
|
854
854
|
"futures-core",
|
|
855
855
|
"futures-sink",
|
|
@@ -857,15 +857,15 @@ dependencies = [
|
|
|
857
857
|
|
|
858
858
|
[[package]]
|
|
859
859
|
name = "futures-core"
|
|
860
|
-
version = "0.3.
|
|
860
|
+
version = "0.3.33"
|
|
861
861
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
862
|
-
checksum = "
|
|
862
|
+
checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
|
|
863
863
|
|
|
864
864
|
[[package]]
|
|
865
865
|
name = "futures-executor"
|
|
866
|
-
version = "0.3.
|
|
866
|
+
version = "0.3.33"
|
|
867
867
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
868
|
-
checksum = "
|
|
868
|
+
checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458"
|
|
869
869
|
dependencies = [
|
|
870
870
|
"futures-core",
|
|
871
871
|
"futures-task",
|
|
@@ -874,32 +874,32 @@ dependencies = [
|
|
|
874
874
|
|
|
875
875
|
[[package]]
|
|
876
876
|
name = "futures-io"
|
|
877
|
-
version = "0.3.
|
|
877
|
+
version = "0.3.33"
|
|
878
878
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
879
|
-
checksum = "
|
|
879
|
+
checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"
|
|
880
880
|
|
|
881
881
|
[[package]]
|
|
882
882
|
name = "futures-macro"
|
|
883
|
-
version = "0.3.
|
|
883
|
+
version = "0.3.33"
|
|
884
884
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
885
|
-
checksum = "
|
|
885
|
+
checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"
|
|
886
886
|
dependencies = [
|
|
887
887
|
"proc-macro2",
|
|
888
888
|
"quote",
|
|
889
|
-
"syn",
|
|
889
|
+
"syn 2.0.119",
|
|
890
890
|
]
|
|
891
891
|
|
|
892
892
|
[[package]]
|
|
893
893
|
name = "futures-sink"
|
|
894
|
-
version = "0.3.
|
|
894
|
+
version = "0.3.33"
|
|
895
895
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
896
|
-
checksum = "
|
|
896
|
+
checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
|
|
897
897
|
|
|
898
898
|
[[package]]
|
|
899
899
|
name = "futures-task"
|
|
900
|
-
version = "0.3.
|
|
900
|
+
version = "0.3.33"
|
|
901
901
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
902
|
-
checksum = "
|
|
902
|
+
checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
|
|
903
903
|
|
|
904
904
|
[[package]]
|
|
905
905
|
name = "futures-timer"
|
|
@@ -909,9 +909,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
|
|
|
909
909
|
|
|
910
910
|
[[package]]
|
|
911
911
|
name = "futures-util"
|
|
912
|
-
version = "0.3.
|
|
912
|
+
version = "0.3.33"
|
|
913
913
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
914
|
-
checksum = "
|
|
914
|
+
checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
|
|
915
915
|
dependencies = [
|
|
916
916
|
"futures-channel",
|
|
917
917
|
"futures-core",
|
|
@@ -1086,9 +1086,9 @@ dependencies = [
|
|
|
1086
1086
|
|
|
1087
1087
|
[[package]]
|
|
1088
1088
|
name = "http-body"
|
|
1089
|
-
version = "1.0
|
|
1089
|
+
version = "1.1.0"
|
|
1090
1090
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1091
|
-
checksum = "
|
|
1091
|
+
checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c"
|
|
1092
1092
|
dependencies = [
|
|
1093
1093
|
"bytes",
|
|
1094
1094
|
"http",
|
|
@@ -1096,9 +1096,9 @@ dependencies = [
|
|
|
1096
1096
|
|
|
1097
1097
|
[[package]]
|
|
1098
1098
|
name = "http-body-util"
|
|
1099
|
-
version = "0.1.
|
|
1099
|
+
version = "0.1.4"
|
|
1100
1100
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1101
|
-
checksum = "
|
|
1101
|
+
checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2"
|
|
1102
1102
|
dependencies = [
|
|
1103
1103
|
"bytes",
|
|
1104
1104
|
"futures-core",
|
|
@@ -1416,7 +1416,7 @@ dependencies = [
|
|
|
1416
1416
|
"quote",
|
|
1417
1417
|
"rustc_version",
|
|
1418
1418
|
"simd_cesu8",
|
|
1419
|
-
"syn",
|
|
1419
|
+
"syn 2.0.119",
|
|
1420
1420
|
]
|
|
1421
1421
|
|
|
1422
1422
|
[[package]]
|
|
@@ -1435,16 +1435,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1435
1435
|
checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
|
|
1436
1436
|
dependencies = [
|
|
1437
1437
|
"quote",
|
|
1438
|
-
"syn",
|
|
1438
|
+
"syn 2.0.119",
|
|
1439
1439
|
]
|
|
1440
1440
|
|
|
1441
1441
|
[[package]]
|
|
1442
1442
|
name = "jobserver"
|
|
1443
|
-
version = "0.1.
|
|
1443
|
+
version = "0.1.35"
|
|
1444
1444
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1445
|
-
checksum = "
|
|
1445
|
+
checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
|
|
1446
1446
|
dependencies = [
|
|
1447
|
-
"getrandom 0.3
|
|
1447
|
+
"getrandom 0.4.3",
|
|
1448
1448
|
"libc",
|
|
1449
1449
|
]
|
|
1450
1450
|
|
|
@@ -1539,9 +1539,9 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
|
|
|
1539
1539
|
|
|
1540
1540
|
[[package]]
|
|
1541
1541
|
name = "lru"
|
|
1542
|
-
version = "0.18.
|
|
1542
|
+
version = "0.18.1"
|
|
1543
1543
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1544
|
-
checksum = "
|
|
1544
|
+
checksum = "0b6180140927ee907000b0aa540091f6ea512ead4447c92b8fc35bc72788a5a6"
|
|
1545
1545
|
dependencies = [
|
|
1546
1546
|
"hashbrown 0.17.1",
|
|
1547
1547
|
]
|
|
@@ -1572,7 +1572,7 @@ checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
|
|
|
1572
1572
|
dependencies = [
|
|
1573
1573
|
"proc-macro2",
|
|
1574
1574
|
"quote",
|
|
1575
|
-
"syn",
|
|
1575
|
+
"syn 2.0.119",
|
|
1576
1576
|
]
|
|
1577
1577
|
|
|
1578
1578
|
[[package]]
|
|
@@ -1588,9 +1588,9 @@ dependencies = [
|
|
|
1588
1588
|
|
|
1589
1589
|
[[package]]
|
|
1590
1590
|
name = "memchr"
|
|
1591
|
-
version = "2.8.
|
|
1591
|
+
version = "2.8.3"
|
|
1592
1592
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1593
|
-
checksum = "
|
|
1593
|
+
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
1594
1594
|
|
|
1595
1595
|
[[package]]
|
|
1596
1596
|
name = "mime"
|
|
@@ -1616,9 +1616,9 @@ dependencies = [
|
|
|
1616
1616
|
|
|
1617
1617
|
[[package]]
|
|
1618
1618
|
name = "mio"
|
|
1619
|
-
version = "1.2.
|
|
1619
|
+
version = "1.2.2"
|
|
1620
1620
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1621
|
-
checksum = "
|
|
1621
|
+
checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"
|
|
1622
1622
|
dependencies = [
|
|
1623
1623
|
"libc",
|
|
1624
1624
|
"log",
|
|
@@ -1822,7 +1822,7 @@ dependencies = [
|
|
|
1822
1822
|
"phf_shared 0.14.0",
|
|
1823
1823
|
"proc-macro2",
|
|
1824
1824
|
"quote",
|
|
1825
|
-
"syn",
|
|
1825
|
+
"syn 2.0.119",
|
|
1826
1826
|
]
|
|
1827
1827
|
|
|
1828
1828
|
[[package]]
|
|
@@ -1900,9 +1900,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
|
|
1900
1900
|
|
|
1901
1901
|
[[package]]
|
|
1902
1902
|
name = "proc-macro2"
|
|
1903
|
-
version = "1.0.
|
|
1903
|
+
version = "1.0.107"
|
|
1904
1904
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1905
|
-
checksum = "
|
|
1905
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
1906
1906
|
dependencies = [
|
|
1907
1907
|
"unicode-ident",
|
|
1908
1908
|
]
|
|
@@ -2002,9 +2002,9 @@ dependencies = [
|
|
|
2002
2002
|
|
|
2003
2003
|
[[package]]
|
|
2004
2004
|
name = "quote"
|
|
2005
|
-
version = "1.0.
|
|
2005
|
+
version = "1.0.47"
|
|
2006
2006
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2007
|
-
checksum = "
|
|
2007
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
2008
2008
|
dependencies = [
|
|
2009
2009
|
"proc-macro2",
|
|
2010
2010
|
]
|
|
@@ -2071,7 +2071,7 @@ dependencies = [
|
|
|
2071
2071
|
"quote",
|
|
2072
2072
|
"regex",
|
|
2073
2073
|
"shell-words",
|
|
2074
|
-
"syn",
|
|
2074
|
+
"syn 2.0.119",
|
|
2075
2075
|
]
|
|
2076
2076
|
|
|
2077
2077
|
[[package]]
|
|
@@ -2102,9 +2102,9 @@ dependencies = [
|
|
|
2102
2102
|
|
|
2103
2103
|
[[package]]
|
|
2104
2104
|
name = "regex"
|
|
2105
|
-
version = "1.
|
|
2105
|
+
version = "1.13.1"
|
|
2106
2106
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2107
|
-
checksum = "
|
|
2107
|
+
checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
|
|
2108
2108
|
dependencies = [
|
|
2109
2109
|
"aho-corasick",
|
|
2110
2110
|
"memchr",
|
|
@@ -2114,9 +2114,9 @@ dependencies = [
|
|
|
2114
2114
|
|
|
2115
2115
|
[[package]]
|
|
2116
2116
|
name = "regex-automata"
|
|
2117
|
-
version = "0.4.
|
|
2117
|
+
version = "0.4.16"
|
|
2118
2118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2119
|
-
checksum = "
|
|
2119
|
+
checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
|
|
2120
2120
|
dependencies = [
|
|
2121
2121
|
"aho-corasick",
|
|
2122
2122
|
"memchr",
|
|
@@ -2275,9 +2275,9 @@ dependencies = [
|
|
|
2275
2275
|
|
|
2276
2276
|
[[package]]
|
|
2277
2277
|
name = "rustversion"
|
|
2278
|
-
version = "1.0.
|
|
2278
|
+
version = "1.0.23"
|
|
2279
2279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2280
|
-
checksum = "
|
|
2280
|
+
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
|
2281
2281
|
|
|
2282
2282
|
[[package]]
|
|
2283
2283
|
name = "same-file"
|
|
@@ -2340,9 +2340,9 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
|
|
|
2340
2340
|
|
|
2341
2341
|
[[package]]
|
|
2342
2342
|
name = "serde"
|
|
2343
|
-
version = "1.0.
|
|
2343
|
+
version = "1.0.229"
|
|
2344
2344
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2345
|
-
checksum = "
|
|
2345
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
2346
2346
|
dependencies = [
|
|
2347
2347
|
"serde_core",
|
|
2348
2348
|
"serde_derive",
|
|
@@ -2350,22 +2350,22 @@ dependencies = [
|
|
|
2350
2350
|
|
|
2351
2351
|
[[package]]
|
|
2352
2352
|
name = "serde_core"
|
|
2353
|
-
version = "1.0.
|
|
2353
|
+
version = "1.0.229"
|
|
2354
2354
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2355
|
-
checksum = "
|
|
2355
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
2356
2356
|
dependencies = [
|
|
2357
2357
|
"serde_derive",
|
|
2358
2358
|
]
|
|
2359
2359
|
|
|
2360
2360
|
[[package]]
|
|
2361
2361
|
name = "serde_derive"
|
|
2362
|
-
version = "1.0.
|
|
2362
|
+
version = "1.0.229"
|
|
2363
2363
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2364
|
-
checksum = "
|
|
2364
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
2365
2365
|
dependencies = [
|
|
2366
2366
|
"proc-macro2",
|
|
2367
2367
|
"quote",
|
|
2368
|
-
"syn",
|
|
2368
|
+
"syn 3.0.0",
|
|
2369
2369
|
]
|
|
2370
2370
|
|
|
2371
2371
|
[[package]]
|
|
@@ -2442,9 +2442,9 @@ dependencies = [
|
|
|
2442
2442
|
|
|
2443
2443
|
[[package]]
|
|
2444
2444
|
name = "simd-adler32"
|
|
2445
|
-
version = "0.3.
|
|
2445
|
+
version = "0.3.10"
|
|
2446
2446
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2447
|
-
checksum = "
|
|
2447
|
+
checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
|
|
2448
2448
|
|
|
2449
2449
|
[[package]]
|
|
2450
2450
|
name = "simd_cesu8"
|
|
@@ -2482,9 +2482,9 @@ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
|
|
|
2482
2482
|
|
|
2483
2483
|
[[package]]
|
|
2484
2484
|
name = "socket2"
|
|
2485
|
-
version = "0.6.
|
|
2485
|
+
version = "0.6.5"
|
|
2486
2486
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2487
|
-
checksum = "
|
|
2487
|
+
checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
|
|
2488
2488
|
dependencies = [
|
|
2489
2489
|
"libc",
|
|
2490
2490
|
"windows-sys 0.61.2",
|
|
@@ -2528,9 +2528,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
|
2528
2528
|
|
|
2529
2529
|
[[package]]
|
|
2530
2530
|
name = "syn"
|
|
2531
|
-
version = "2.0.
|
|
2531
|
+
version = "2.0.119"
|
|
2532
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2533
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
2534
|
+
dependencies = [
|
|
2535
|
+
"proc-macro2",
|
|
2536
|
+
"quote",
|
|
2537
|
+
"unicode-ident",
|
|
2538
|
+
]
|
|
2539
|
+
|
|
2540
|
+
[[package]]
|
|
2541
|
+
name = "syn"
|
|
2542
|
+
version = "3.0.0"
|
|
2532
2543
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2533
|
-
checksum = "
|
|
2544
|
+
checksum = "f2fac314a64dc9a36e61a9eb4261a5e9bbfbc922b27e518af97bc32b926cf967"
|
|
2534
2545
|
dependencies = [
|
|
2535
2546
|
"proc-macro2",
|
|
2536
2547
|
"quote",
|
|
@@ -2554,7 +2565,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
|
|
|
2554
2565
|
dependencies = [
|
|
2555
2566
|
"proc-macro2",
|
|
2556
2567
|
"quote",
|
|
2557
|
-
"syn",
|
|
2568
|
+
"syn 2.0.119",
|
|
2558
2569
|
]
|
|
2559
2570
|
|
|
2560
2571
|
[[package]]
|
|
@@ -2590,22 +2601,22 @@ dependencies = [
|
|
|
2590
2601
|
|
|
2591
2602
|
[[package]]
|
|
2592
2603
|
name = "thiserror"
|
|
2593
|
-
version = "2.0.
|
|
2604
|
+
version = "2.0.19"
|
|
2594
2605
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2595
|
-
checksum = "
|
|
2606
|
+
checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
|
|
2596
2607
|
dependencies = [
|
|
2597
2608
|
"thiserror-impl",
|
|
2598
2609
|
]
|
|
2599
2610
|
|
|
2600
2611
|
[[package]]
|
|
2601
2612
|
name = "thiserror-impl"
|
|
2602
|
-
version = "2.0.
|
|
2613
|
+
version = "2.0.19"
|
|
2603
2614
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2604
|
-
checksum = "
|
|
2615
|
+
checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
|
|
2605
2616
|
dependencies = [
|
|
2606
2617
|
"proc-macro2",
|
|
2607
2618
|
"quote",
|
|
2608
|
-
"syn",
|
|
2619
|
+
"syn 3.0.0",
|
|
2609
2620
|
]
|
|
2610
2621
|
|
|
2611
2622
|
[[package]]
|
|
@@ -2674,9 +2685,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
|
2674
2685
|
|
|
2675
2686
|
[[package]]
|
|
2676
2687
|
name = "tokio"
|
|
2677
|
-
version = "1.
|
|
2688
|
+
version = "1.53.0"
|
|
2678
2689
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2679
|
-
checksum = "
|
|
2690
|
+
checksum = "d988bcd52dbe076d3d46903332f58c912b87a2c49b1428419a5845154762ffee"
|
|
2680
2691
|
dependencies = [
|
|
2681
2692
|
"bytes",
|
|
2682
2693
|
"libc",
|
|
@@ -2690,13 +2701,13 @@ dependencies = [
|
|
|
2690
2701
|
|
|
2691
2702
|
[[package]]
|
|
2692
2703
|
name = "tokio-macros"
|
|
2693
|
-
version = "2.7.
|
|
2704
|
+
version = "2.7.1"
|
|
2694
2705
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2695
|
-
checksum = "
|
|
2706
|
+
checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba"
|
|
2696
2707
|
dependencies = [
|
|
2697
2708
|
"proc-macro2",
|
|
2698
2709
|
"quote",
|
|
2699
|
-
"syn",
|
|
2710
|
+
"syn 2.0.119",
|
|
2700
2711
|
]
|
|
2701
2712
|
|
|
2702
2713
|
[[package]]
|
|
@@ -2843,7 +2854,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
|
|
|
2843
2854
|
dependencies = [
|
|
2844
2855
|
"proc-macro2",
|
|
2845
2856
|
"quote",
|
|
2846
|
-
"syn",
|
|
2857
|
+
"syn 2.0.119",
|
|
2847
2858
|
]
|
|
2848
2859
|
|
|
2849
2860
|
[[package]]
|
|
@@ -3008,7 +3019,7 @@ dependencies = [
|
|
|
3008
3019
|
"bumpalo",
|
|
3009
3020
|
"proc-macro2",
|
|
3010
3021
|
"quote",
|
|
3011
|
-
"syn",
|
|
3022
|
+
"syn 2.0.119",
|
|
3012
3023
|
"wasm-bindgen-shared",
|
|
3013
3024
|
]
|
|
3014
3025
|
|
|
@@ -3055,9 +3066,9 @@ dependencies = [
|
|
|
3055
3066
|
|
|
3056
3067
|
[[package]]
|
|
3057
3068
|
name = "webpki-root-certs"
|
|
3058
|
-
version = "1.0.
|
|
3069
|
+
version = "1.0.9"
|
|
3059
3070
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3060
|
-
checksum = "
|
|
3071
|
+
checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b"
|
|
3061
3072
|
dependencies = [
|
|
3062
3073
|
"rustls-pki-types",
|
|
3063
3074
|
]
|
|
@@ -3107,7 +3118,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
|
|
|
3107
3118
|
dependencies = [
|
|
3108
3119
|
"proc-macro2",
|
|
3109
3120
|
"quote",
|
|
3110
|
-
"syn",
|
|
3121
|
+
"syn 2.0.119",
|
|
3111
3122
|
]
|
|
3112
3123
|
|
|
3113
3124
|
[[package]]
|
|
@@ -3118,7 +3129,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
|
|
|
3118
3129
|
dependencies = [
|
|
3119
3130
|
"proc-macro2",
|
|
3120
3131
|
"quote",
|
|
3121
|
-
"syn",
|
|
3132
|
+
"syn 2.0.119",
|
|
3122
3133
|
]
|
|
3123
3134
|
|
|
3124
3135
|
[[package]]
|
|
@@ -3349,28 +3360,28 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
|
|
|
3349
3360
|
dependencies = [
|
|
3350
3361
|
"proc-macro2",
|
|
3351
3362
|
"quote",
|
|
3352
|
-
"syn",
|
|
3363
|
+
"syn 2.0.119",
|
|
3353
3364
|
"synstructure",
|
|
3354
3365
|
]
|
|
3355
3366
|
|
|
3356
3367
|
[[package]]
|
|
3357
3368
|
name = "zerocopy"
|
|
3358
|
-
version = "0.8.
|
|
3369
|
+
version = "0.8.54"
|
|
3359
3370
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3360
|
-
checksum = "
|
|
3371
|
+
checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19"
|
|
3361
3372
|
dependencies = [
|
|
3362
3373
|
"zerocopy-derive",
|
|
3363
3374
|
]
|
|
3364
3375
|
|
|
3365
3376
|
[[package]]
|
|
3366
3377
|
name = "zerocopy-derive"
|
|
3367
|
-
version = "0.8.
|
|
3378
|
+
version = "0.8.54"
|
|
3368
3379
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3369
|
-
checksum = "
|
|
3380
|
+
checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5"
|
|
3370
3381
|
dependencies = [
|
|
3371
3382
|
"proc-macro2",
|
|
3372
3383
|
"quote",
|
|
3373
|
-
"syn",
|
|
3384
|
+
"syn 2.0.119",
|
|
3374
3385
|
]
|
|
3375
3386
|
|
|
3376
3387
|
[[package]]
|
|
@@ -3390,7 +3401,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
|
|
|
3390
3401
|
dependencies = [
|
|
3391
3402
|
"proc-macro2",
|
|
3392
3403
|
"quote",
|
|
3393
|
-
"syn",
|
|
3404
|
+
"syn 2.0.119",
|
|
3394
3405
|
"synstructure",
|
|
3395
3406
|
]
|
|
3396
3407
|
|
|
@@ -3430,14 +3441,14 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
|
|
|
3430
3441
|
dependencies = [
|
|
3431
3442
|
"proc-macro2",
|
|
3432
3443
|
"quote",
|
|
3433
|
-
"syn",
|
|
3444
|
+
"syn 2.0.119",
|
|
3434
3445
|
]
|
|
3435
3446
|
|
|
3436
3447
|
[[package]]
|
|
3437
3448
|
name = "zmij"
|
|
3438
|
-
version = "1.0.
|
|
3449
|
+
version = "1.0.23"
|
|
3439
3450
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3440
|
-
checksum = "
|
|
3451
|
+
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
3441
3452
|
|
|
3442
3453
|
[[package]]
|
|
3443
3454
|
name = "zune-core"
|
|
@@ -17,7 +17,7 @@ path = "../src/lib.rs"
|
|
|
17
17
|
crate-type = ["cdylib"]
|
|
18
18
|
|
|
19
19
|
[dependencies]
|
|
20
|
-
crawlberg = { version = "1.0.
|
|
20
|
+
crawlberg = { version = "1.0.6", features = ["interact", "browser-chromiumoxide"] }
|
|
21
21
|
futures = "0.3"
|
|
22
22
|
magnus = "0.8"
|
|
23
23
|
rb-sys = ">=0.9, <0.9.128"
|
|
@@ -7,8 +7,5 @@ default_profile = ENV.fetch("CARGO_PROFILE", "release")
|
|
|
7
7
|
|
|
8
8
|
create_rust_makefile("crawlberg_rb") do |config|
|
|
9
9
|
config.profile = default_profile.to_sym
|
|
10
|
-
# extconf.rb and Cargo.toml are siblings under ext/crawlberg_rb/native/; rb_sys interprets
|
|
11
|
-
# ext_dir relative to extconf.rb, so "." finds the sibling Cargo.toml. "native" would
|
|
12
|
-
# resolve to native/native/Cargo.toml and break `gem install` on end-user machines.
|
|
13
10
|
config.ext_dir = "."
|
|
14
11
|
end
|
data/ext/crawlberg_rb/src/lib.rs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:ed6753aa35e27ad4764a749b35d849473835fb530fcba666ac607635b1333c06
|
|
3
|
-
// Re-generate with: alef generate
|
|
4
2
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
3
|
#![allow(
|
|
6
4
|
clippy::too_many_arguments,
|
|
@@ -3983,7 +3981,6 @@ impl CrawlEngineHandle {
|
|
|
3983
3981
|
};
|
|
3984
3982
|
let ruby = unsafe { Ruby::get_unchecked() };
|
|
3985
3983
|
if ruby.block_given() {
|
|
3986
|
-
// Drive the stream synchronously, yielding each chunk to the block.
|
|
3987
3984
|
iterator.each()?;
|
|
3988
3985
|
Ok(ruby.qnil().as_value())
|
|
3989
3986
|
} else {
|
|
@@ -4018,7 +4015,6 @@ impl CrawlEngineHandle {
|
|
|
4018
4015
|
};
|
|
4019
4016
|
let ruby = unsafe { Ruby::get_unchecked() };
|
|
4020
4017
|
if ruby.block_given() {
|
|
4021
|
-
// Drive the stream synchronously, yielding each chunk to the block.
|
|
4022
4018
|
iterator.each()?;
|
|
4023
4019
|
Ok(ruby.qnil().as_value())
|
|
4024
4020
|
} else {
|
|
@@ -4452,8 +4448,6 @@ impl magnus::IntoValue for BrowserMode {
|
|
|
4452
4448
|
impl magnus::TryConvert for BrowserMode {
|
|
4453
4449
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4454
4450
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4455
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4456
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4457
4451
|
match s.as_str() {
|
|
4458
4452
|
"auto" | "Auto" => Ok(BrowserMode::Auto),
|
|
4459
4453
|
"always" | "Always" => Ok(BrowserMode::Always),
|
|
@@ -4498,8 +4492,6 @@ impl magnus::IntoValue for BrowserWait {
|
|
|
4498
4492
|
impl magnus::TryConvert for BrowserWait {
|
|
4499
4493
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4500
4494
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4501
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4502
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4503
4495
|
match s.as_str() {
|
|
4504
4496
|
"network_idle" | "NetworkIdle" => Ok(BrowserWait::NetworkIdle),
|
|
4505
4497
|
"selector" | "Selector" => Ok(BrowserWait::Selector),
|
|
@@ -4541,8 +4533,6 @@ impl magnus::IntoValue for BrowserBackend {
|
|
|
4541
4533
|
impl magnus::TryConvert for BrowserBackend {
|
|
4542
4534
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4543
4535
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4544
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4545
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4546
4536
|
match s.as_str() {
|
|
4547
4537
|
"chromiumoxide" | "Chromiumoxide" => Ok(BrowserBackend::Chromiumoxide),
|
|
4548
4538
|
"native" | "Native" => Ok(BrowserBackend::Native),
|
|
@@ -4588,8 +4578,6 @@ impl magnus::IntoValue for AuthConfig {
|
|
|
4588
4578
|
|
|
4589
4579
|
impl magnus::TryConvert for AuthConfig {
|
|
4590
4580
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4591
|
-
// For data enums with fields (e.g., PageAction), try to deserialize from JSON first.
|
|
4592
|
-
// For unit enums or when passed as a string, fall back to string-based conversion.
|
|
4593
4581
|
let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
|
|
4594
4582
|
s
|
|
4595
4583
|
} else {
|
|
@@ -4600,19 +4588,12 @@ impl magnus::TryConvert for AuthConfig {
|
|
|
4600
4588
|
)
|
|
4601
4589
|
})?
|
|
4602
4590
|
};
|
|
4603
|
-
// Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
|
|
4604
|
-
// For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
|
|
4605
|
-
// If that fails, try treating it as a plain string value and wrap in quotes
|
|
4606
|
-
// If both fail, try as Custom variant (for untagged enum support)
|
|
4607
4591
|
serde_json::from_str(&json_str)
|
|
4608
4592
|
.or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
|
|
4609
4593
|
.or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
|
|
4610
|
-
.or_else(|_| {
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
Ok(val) => serde_json::from_value(val),
|
|
4614
|
-
Err(e) => Err(e),
|
|
4615
|
-
}
|
|
4594
|
+
.or_else(|_| match serde_json::to_value(&json_str) {
|
|
4595
|
+
Ok(val) => serde_json::from_value(val),
|
|
4596
|
+
Err(e) => Err(e),
|
|
4616
4597
|
})
|
|
4617
4598
|
.map_err(|e| magnus::Error::new(unsafe { Ruby::get_unchecked() }.exception_type_error(), e.to_string()))
|
|
4618
4599
|
}
|
|
@@ -4652,8 +4633,6 @@ impl magnus::IntoValue for LinkType {
|
|
|
4652
4633
|
impl magnus::TryConvert for LinkType {
|
|
4653
4634
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4654
4635
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4655
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4656
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4657
4636
|
match s.as_str() {
|
|
4658
4637
|
"internal" | "Internal" => Ok(LinkType::Internal),
|
|
4659
4638
|
"external" | "External" => Ok(LinkType::External),
|
|
@@ -4702,8 +4681,6 @@ impl magnus::IntoValue for ImageSource {
|
|
|
4702
4681
|
impl magnus::TryConvert for ImageSource {
|
|
4703
4682
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4704
4683
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4705
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4706
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4707
4684
|
match s.as_str() {
|
|
4708
4685
|
"img" | "Img" => Ok(ImageSource::Img),
|
|
4709
4686
|
"picture_source" | "PictureSource" => Ok(ImageSource::PictureSource),
|
|
@@ -4748,8 +4725,6 @@ impl magnus::IntoValue for FeedType {
|
|
|
4748
4725
|
impl magnus::TryConvert for FeedType {
|
|
4749
4726
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4750
4727
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4751
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4752
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4753
4728
|
match s.as_str() {
|
|
4754
4729
|
"rss" | "Rss" => Ok(FeedType::Rss),
|
|
4755
4730
|
"atom" | "Atom" => Ok(FeedType::Atom),
|
|
@@ -4807,8 +4782,6 @@ impl magnus::IntoValue for AssetCategory {
|
|
|
4807
4782
|
impl magnus::TryConvert for AssetCategory {
|
|
4808
4783
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4809
4784
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
4810
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
4811
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
4812
4785
|
match s.as_str() {
|
|
4813
4786
|
"document" | "Document" => Ok(AssetCategory::Document),
|
|
4814
4787
|
"image" | "Image" => Ok(AssetCategory::Image),
|
|
@@ -4859,8 +4832,6 @@ impl magnus::IntoValue for CrawlEvent {
|
|
|
4859
4832
|
|
|
4860
4833
|
impl magnus::TryConvert for CrawlEvent {
|
|
4861
4834
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4862
|
-
// For data enums with fields (e.g., PageAction), try to deserialize from JSON first.
|
|
4863
|
-
// For unit enums or when passed as a string, fall back to string-based conversion.
|
|
4864
4835
|
let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
|
|
4865
4836
|
s
|
|
4866
4837
|
} else {
|
|
@@ -4871,19 +4842,12 @@ impl magnus::TryConvert for CrawlEvent {
|
|
|
4871
4842
|
)
|
|
4872
4843
|
})?
|
|
4873
4844
|
};
|
|
4874
|
-
// Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
|
|
4875
|
-
// For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
|
|
4876
|
-
// If that fails, try treating it as a plain string value and wrap in quotes
|
|
4877
|
-
// If both fail, try as Custom variant (for untagged enum support)
|
|
4878
4845
|
serde_json::from_str(&json_str)
|
|
4879
4846
|
.or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
|
|
4880
4847
|
.or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
|
|
4881
|
-
.or_else(|_| {
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
Ok(val) => serde_json::from_value(val),
|
|
4885
|
-
Err(e) => Err(e),
|
|
4886
|
-
}
|
|
4848
|
+
.or_else(|_| match serde_json::to_value(&json_str) {
|
|
4849
|
+
Ok(val) => serde_json::from_value(val),
|
|
4850
|
+
Err(e) => Err(e),
|
|
4887
4851
|
})
|
|
4888
4852
|
.map_err(|e| magnus::Error::new(unsafe { Ruby::get_unchecked() }.exception_type_error(), e.to_string()))
|
|
4889
4853
|
}
|
|
@@ -4944,8 +4908,6 @@ impl magnus::IntoValue for PageAction {
|
|
|
4944
4908
|
|
|
4945
4909
|
impl magnus::TryConvert for PageAction {
|
|
4946
4910
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
4947
|
-
// For data enums with fields (e.g., PageAction), try to deserialize from JSON first.
|
|
4948
|
-
// For unit enums or when passed as a string, fall back to string-based conversion.
|
|
4949
4911
|
let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
|
|
4950
4912
|
s
|
|
4951
4913
|
} else {
|
|
@@ -4956,19 +4918,12 @@ impl magnus::TryConvert for PageAction {
|
|
|
4956
4918
|
)
|
|
4957
4919
|
})?
|
|
4958
4920
|
};
|
|
4959
|
-
// Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
|
|
4960
|
-
// For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
|
|
4961
|
-
// If that fails, try treating it as a plain string value and wrap in quotes
|
|
4962
|
-
// If both fail, try as Custom variant (for untagged enum support)
|
|
4963
4921
|
serde_json::from_str(&json_str)
|
|
4964
4922
|
.or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
|
|
4965
4923
|
.or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
|
|
4966
|
-
.or_else(|_| {
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
Ok(val) => serde_json::from_value(val),
|
|
4970
|
-
Err(e) => Err(e),
|
|
4971
|
-
}
|
|
4924
|
+
.or_else(|_| match serde_json::to_value(&json_str) {
|
|
4925
|
+
Ok(val) => serde_json::from_value(val),
|
|
4926
|
+
Err(e) => Err(e),
|
|
4972
4927
|
})
|
|
4973
4928
|
.map_err(|e| magnus::Error::new(unsafe { Ruby::get_unchecked() }.exception_type_error(), e.to_string()))
|
|
4974
4929
|
}
|
|
@@ -5004,8 +4959,6 @@ impl magnus::IntoValue for ScrollDirection {
|
|
|
5004
4959
|
impl magnus::TryConvert for ScrollDirection {
|
|
5005
4960
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
5006
4961
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
5007
|
-
// Accept the serde wire name (snake_case), the PascalCase Rust variant name,
|
|
5008
|
-
// and a lowercase fallback so fixtures written in any of those styles work.
|
|
5009
4962
|
match s.as_str() {
|
|
5010
4963
|
"up" | "Up" => Ok(ScrollDirection::Up),
|
|
5011
4964
|
"down" | "Down" => Ok(ScrollDirection::Down),
|
|
@@ -6829,7 +6782,6 @@ impl CrawlStreamIterator {
|
|
|
6829
6782
|
}
|
|
6830
6783
|
Some(Err(e)) => Err(Error::new(ruby.exception_runtime_error(), e.to_string())),
|
|
6831
6784
|
None => {
|
|
6832
|
-
// Drop the stream to release any resources.
|
|
6833
6785
|
let inner = self.inner.clone();
|
|
6834
6786
|
let runtime = self.runtime.clone();
|
|
6835
6787
|
runtime.block_on(async move {
|
|
@@ -6847,8 +6799,6 @@ impl CrawlStreamIterator {
|
|
|
6847
6799
|
use magnus::value::ReprValue;
|
|
6848
6800
|
let ruby = unsafe { Ruby::get_unchecked() };
|
|
6849
6801
|
if !ruby.block_given() {
|
|
6850
|
-
// Without a block, return an Enumerator over `each` so the caller can
|
|
6851
|
-
// call `.to_a`, `.lazy`, etc.
|
|
6852
6802
|
let self_val: magnus::Value = self.clone().into_value_with(&ruby);
|
|
6853
6803
|
let enumerator = self_val.enumeratorize(ruby.to_symbol("each"), ());
|
|
6854
6804
|
return Ok(enumerator.as_value());
|
|
@@ -6911,7 +6861,6 @@ impl BatchCrawlStreamIterator {
|
|
|
6911
6861
|
}
|
|
6912
6862
|
Some(Err(e)) => Err(Error::new(ruby.exception_runtime_error(), e.to_string())),
|
|
6913
6863
|
None => {
|
|
6914
|
-
// Drop the stream to release any resources.
|
|
6915
6864
|
let inner = self.inner.clone();
|
|
6916
6865
|
let runtime = self.runtime.clone();
|
|
6917
6866
|
runtime.block_on(async move {
|
|
@@ -6929,8 +6878,6 @@ impl BatchCrawlStreamIterator {
|
|
|
6929
6878
|
use magnus::value::ReprValue;
|
|
6930
6879
|
let ruby = unsafe { Ruby::get_unchecked() };
|
|
6931
6880
|
if !ruby.block_given() {
|
|
6932
|
-
// Without a block, return an Enumerator over `each` so the caller can
|
|
6933
|
-
// call `.to_a`, `.lazy`, etc.
|
|
6934
6881
|
let self_val: magnus::Value = self.clone().into_value_with(&ruby);
|
|
6935
6882
|
let enumerator = self_val.enumeratorize(ruby.to_symbol("each"), ());
|
|
6936
6883
|
return Ok(enumerator.as_value());
|
|
@@ -6950,7 +6897,6 @@ impl BatchCrawlStreamIterator {
|
|
|
6950
6897
|
fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
6951
6898
|
let module = ruby.define_module("Crawlberg")?;
|
|
6952
6899
|
|
|
6953
|
-
// Ensure JSON library is loaded for Hash#to_json
|
|
6954
6900
|
let _ = ruby.eval::<magnus::Value>("require \"json\"");
|
|
6955
6901
|
|
|
6956
6902
|
let class = module.define_class("ExtractionMeta", ruby.class_object())?;
|
data/lib/crawlberg/native.rb
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:ed6753aa35e27ad4764a749b35d849473835fb530fcba666ac607635b1333c06
|
|
3
|
-
# To regenerate: alef generate
|
|
4
|
-
# To verify freshness: alef verify --exit-code
|
|
5
2
|
# frozen_string_literal: true
|
|
6
3
|
|
|
7
4
|
require "json"
|
|
@@ -9,14 +6,12 @@ require "sorbet-runtime"
|
|
|
9
6
|
require "crawlberg_rb"
|
|
10
7
|
|
|
11
8
|
module Crawlberg
|
|
12
|
-
# Authentication configuration.
|
|
13
9
|
module AuthConfig
|
|
14
10
|
extend T::Helpers
|
|
15
11
|
extend T::Sig
|
|
16
12
|
|
|
17
13
|
interface!
|
|
18
14
|
|
|
19
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
20
15
|
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
21
16
|
# @return [variant_class] an instance of the appropriate variant
|
|
22
17
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
@@ -39,11 +34,9 @@ module Crawlberg
|
|
|
39
34
|
include AuthConfig
|
|
40
35
|
extend T::Sig
|
|
41
36
|
|
|
42
|
-
# Username sent in the `Authorization: Basic` header.
|
|
43
37
|
sig { returns(String) }
|
|
44
38
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
45
39
|
def username = super
|
|
46
|
-
# Password sent in the `Authorization: Basic` header.
|
|
47
40
|
sig { returns(String) }
|
|
48
41
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
49
42
|
def password = super
|
|
@@ -65,7 +58,6 @@ module Crawlberg
|
|
|
65
58
|
include AuthConfig
|
|
66
59
|
extend T::Sig
|
|
67
60
|
|
|
68
|
-
# Token sent in the `Authorization: Bearer` header.
|
|
69
61
|
sig { returns(String) }
|
|
70
62
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
71
63
|
def token = super
|
|
@@ -87,11 +79,9 @@ module Crawlberg
|
|
|
87
79
|
include AuthConfig
|
|
88
80
|
extend T::Sig
|
|
89
81
|
|
|
90
|
-
# HTTP header name to set on each request.
|
|
91
82
|
sig { returns(String) }
|
|
92
83
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
93
84
|
def name = super
|
|
94
|
-
# HTTP header value to send.
|
|
95
85
|
sig { returns(String) }
|
|
96
86
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
97
87
|
def value = super
|
|
@@ -111,19 +101,12 @@ module Crawlberg
|
|
|
111
101
|
end
|
|
112
102
|
|
|
113
103
|
module Crawlberg
|
|
114
|
-
# An event emitted during a streaming crawl operation.
|
|
115
|
-
#
|
|
116
|
-
# Not available on `wasm32` targets — streaming requires native concurrency
|
|
117
|
-
# primitives (tokio channels, `JoinSet`) that are not supported on wasm32.
|
|
118
|
-
#
|
|
119
|
-
# Delivered to bindings through each target's native streaming idiom.
|
|
120
104
|
module CrawlEvent
|
|
121
105
|
extend T::Helpers
|
|
122
106
|
extend T::Sig
|
|
123
107
|
|
|
124
108
|
interface!
|
|
125
109
|
|
|
126
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
127
110
|
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
128
111
|
# @return [variant_class] an instance of the appropriate variant
|
|
129
112
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
@@ -146,7 +129,6 @@ module Crawlberg
|
|
|
146
129
|
include CrawlEvent
|
|
147
130
|
extend T::Sig
|
|
148
131
|
|
|
149
|
-
# The crawled page result.
|
|
150
132
|
sig { returns(CrawlPageResult) }
|
|
151
133
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
152
134
|
def result = super
|
|
@@ -168,11 +150,9 @@ module Crawlberg
|
|
|
168
150
|
include CrawlEvent
|
|
169
151
|
extend T::Sig
|
|
170
152
|
|
|
171
|
-
# The URL that failed.
|
|
172
153
|
sig { returns(String) }
|
|
173
154
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
174
155
|
def url = super
|
|
175
|
-
# The error message.
|
|
176
156
|
sig { returns(String) }
|
|
177
157
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
178
158
|
def error = super
|
|
@@ -194,7 +174,6 @@ module Crawlberg
|
|
|
194
174
|
include CrawlEvent
|
|
195
175
|
extend T::Sig
|
|
196
176
|
|
|
197
|
-
# Total number of pages crawled.
|
|
198
177
|
sig { returns(Integer) }
|
|
199
178
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
200
179
|
def pages_crawled = super
|
|
@@ -214,17 +193,12 @@ module Crawlberg
|
|
|
214
193
|
end
|
|
215
194
|
|
|
216
195
|
module Crawlberg
|
|
217
|
-
# A single page interaction action.
|
|
218
|
-
#
|
|
219
|
-
# Actions are serialized with a `type` tag using camelCase naming,
|
|
220
|
-
# except `ExecuteJs` which is explicitly renamed to `"executeJs"`.
|
|
221
196
|
module PageAction
|
|
222
197
|
extend T::Helpers
|
|
223
198
|
extend T::Sig
|
|
224
199
|
|
|
225
200
|
interface!
|
|
226
201
|
|
|
227
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
228
202
|
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
229
203
|
# @return [variant_class] an instance of the appropriate variant
|
|
230
204
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
@@ -257,7 +231,6 @@ module Crawlberg
|
|
|
257
231
|
include PageAction
|
|
258
232
|
extend T::Sig
|
|
259
233
|
|
|
260
|
-
# CSS selector for the element to click.
|
|
261
234
|
sig { returns(String) }
|
|
262
235
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
263
236
|
def selector = super
|
|
@@ -289,11 +262,9 @@ module Crawlberg
|
|
|
289
262
|
include PageAction
|
|
290
263
|
extend T::Sig
|
|
291
264
|
|
|
292
|
-
# CSS selector for the input element.
|
|
293
265
|
sig { returns(String) }
|
|
294
266
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
295
267
|
def selector = super
|
|
296
|
-
# Text to type into the element.
|
|
297
268
|
sig { returns(String) }
|
|
298
269
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
299
270
|
def text = super
|
|
@@ -325,7 +296,6 @@ module Crawlberg
|
|
|
325
296
|
include PageAction
|
|
326
297
|
extend T::Sig
|
|
327
298
|
|
|
328
|
-
# Key name to press.
|
|
329
299
|
sig { returns(String) }
|
|
330
300
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
331
301
|
def key = super
|
|
@@ -357,15 +327,12 @@ module Crawlberg
|
|
|
357
327
|
include PageAction
|
|
358
328
|
extend T::Sig
|
|
359
329
|
|
|
360
|
-
# Direction to scroll.
|
|
361
330
|
sig { returns(ScrollDirection) }
|
|
362
331
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
363
332
|
def direction = super
|
|
364
|
-
# Optional CSS selector for a scrollable element. Scrolls the page if absent.
|
|
365
333
|
sig { returns(T.nilable(String)) }
|
|
366
334
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
367
335
|
def selector = super
|
|
368
|
-
# Optional pixel amount to scroll. Uses a default if absent.
|
|
369
336
|
sig { returns(T.nilable(Integer)) }
|
|
370
337
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
371
338
|
def amount = super
|
|
@@ -401,11 +368,9 @@ module Crawlberg
|
|
|
401
368
|
include PageAction
|
|
402
369
|
extend T::Sig
|
|
403
370
|
|
|
404
|
-
# Milliseconds to wait. Ignored if `selector` is provided.
|
|
405
371
|
sig { returns(T.nilable(Integer)) }
|
|
406
372
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
407
373
|
def milliseconds = super
|
|
408
|
-
# CSS selector to wait for.
|
|
409
374
|
sig { returns(T.nilable(String)) }
|
|
410
375
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
411
376
|
def selector = super
|
|
@@ -437,11 +402,6 @@ module Crawlberg
|
|
|
437
402
|
include PageAction
|
|
438
403
|
extend T::Sig
|
|
439
404
|
|
|
440
|
-
# Whether to capture the full scrollable page. Defaults to viewport only.
|
|
441
|
-
#
|
|
442
|
-
# Accepts both the canonical `fullPage` (camelCase) form and the
|
|
443
|
-
# `full_page` (snake_case) alias so language bindings and fixtures can
|
|
444
|
-
# use either convention without error.
|
|
445
405
|
sig { returns(T.nilable(T::Boolean)) }
|
|
446
406
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
447
407
|
def full_page = super
|
|
@@ -478,7 +438,6 @@ module Crawlberg
|
|
|
478
438
|
include PageAction
|
|
479
439
|
extend T::Sig
|
|
480
440
|
|
|
481
|
-
# JavaScript source code to execute. Max 1 MB.
|
|
482
441
|
sig { returns(String) }
|
|
483
442
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
484
443
|
def script = super
|
data/lib/crawlberg/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:92a180744c0d0e145d6003de8523add09cce0f06ebcd24bc488f462d22913444
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module Crawlberg
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.0.
|
|
9
|
+
VERSION = "1.0.6"
|
|
10
10
|
end
|
data/lib/crawlberg.rb
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:ed6753aa35e27ad4764a749b35d849473835fb530fcba666ac607635b1333c06
|
|
3
|
-
# To regenerate: alef generate
|
|
4
|
-
# To verify freshness: alef verify --exit-code
|
|
5
2
|
# frozen_string_literal: true
|
|
6
3
|
|
|
7
4
|
require_relative "crawlberg/version"
|
|
@@ -14,13 +11,8 @@ require_relative "crawlberg/native"
|
|
|
14
11
|
# {file:README.md} for usage examples and the upstream documentation
|
|
15
12
|
# for the full API reference.
|
|
16
13
|
module Crawlberg
|
|
17
|
-
# Re-export all types and functions from native extension
|
|
18
14
|
end
|
|
19
15
|
|
|
20
|
-
# Bring top-level Crawlberg classes into the global namespace so callers
|
|
21
|
-
# (and the generated e2e suite) can reference them unqualified. The native
|
|
22
|
-
# extension has already been required above, so every type constant is defined
|
|
23
|
-
# under Crawlberg by this point.
|
|
24
16
|
Crawlberg.constants.each do |const_name|
|
|
25
17
|
value = Crawlberg.const_get(const_name)
|
|
26
18
|
::Object.const_set(const_name, value) if value.is_a?(Module) && !::Object.const_defined?(const_name)
|
data/lib/crawlberg_rb.so
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crawlberg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Xberg Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|