relaton 3.1.1 → 3.1.3

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +5 -3
  3. data/lib/relaton/3gpp.rb +1 -1
  4. data/lib/relaton/bib/converter/csl/from_csl.rb +195 -0
  5. data/lib/relaton/bib/converter/csl.rb +13 -1
  6. data/lib/relaton/bib/model/docidentifier.rb +66 -5
  7. data/lib/relaton/calconnect/hit_collection.rb +1 -1
  8. data/lib/relaton/cli/command.rb +3 -1
  9. data/lib/relaton/cli/frontend_assets.rb +7 -6
  10. data/lib/relaton/cli/subcommand_collection.rb +5 -1
  11. data/lib/relaton/core/request_error.rb +18 -0
  12. data/lib/relaton/db/config.rb +9 -1
  13. data/lib/relaton/db/workers_pool.rb +11 -1
  14. data/lib/relaton/db.rb +160 -58
  15. data/lib/relaton/ecma/bibliography.rb +2 -2
  16. data/lib/relaton/etsi/data_fetcher.rb +16 -6
  17. data/lib/relaton/iala/bibliography.rb +1 -1
  18. data/lib/relaton/iana.rb +1 -1
  19. data/lib/relaton/iec/data_parser.rb +41 -2
  20. data/lib/relaton/itu/README.adoc +1 -1
  21. data/lib/relaton/itu/data_crawler_r.rb +1 -1
  22. data/lib/relaton/jis/README.adoc +2 -0
  23. data/lib/relaton/jis/data_fetcher.rb +74 -13
  24. data/lib/relaton/jis/hit_collection.rb +2 -1
  25. data/lib/relaton/jis/processor.rb +1 -1
  26. data/lib/relaton/jis/scraper.rb +46 -5
  27. data/lib/relaton/oasis/bibliography.rb +1 -1
  28. data/lib/relaton/ogc/hit_collection.rb +1 -1
  29. data/lib/relaton/ogc.rb +1 -1
  30. data/lib/relaton/plateau/data_fetcher.rb +10 -1
  31. data/lib/relaton/plateau/handbook_parser.rb +38 -2
  32. data/lib/relaton/plateau/hit_collection.rb +20 -5
  33. data/lib/relaton/sae.rb +1 -1
  34. data/lib/relaton/version.rb +1 -1
  35. data/lib/relaton/w3c/bibliography.rb +1 -1
  36. data/lib/relaton/xsf/bibliography.rb +1 -1
  37. data/lib/relaton/xsf.rb +1 -1
  38. metadata +35 -48
  39. data/lib/relaton/3gpp/CLAUDE.md +0 -218
  40. data/lib/relaton/adobe/CLAUDE.md +0 -104
  41. data/lib/relaton/bib/CLAUDE.md +0 -150
  42. data/lib/relaton/bipm/CLAUDE.md +0 -187
  43. data/lib/relaton/bsi/CLAUDE.md +0 -35
  44. data/lib/relaton/calconnect/CLAUDE.md +0 -177
  45. data/lib/relaton/ccsds/CLAUDE.md +0 -74
  46. data/lib/relaton/cen/CLAUDE.md +0 -219
  47. data/lib/relaton/cie/CLAUDE.md +0 -90
  48. data/lib/relaton/core/CLAUDE.md +0 -140
  49. data/lib/relaton/db/CLAUDE.md +0 -385
  50. data/lib/relaton/doi/CLAUDE.md +0 -105
  51. data/lib/relaton/easc/CLAUDE.md +0 -85
  52. data/lib/relaton/ecma/CLAUDE.md +0 -217
  53. data/lib/relaton/etsi/CLAUDE.md +0 -219
  54. data/lib/relaton/evs/CLAUDE.md +0 -120
  55. data/lib/relaton/gb/CLAUDE.md +0 -47
  56. data/lib/relaton/gost/CLAUDE.md +0 -100
  57. data/lib/relaton/iala/CLAUDE.md +0 -97
  58. data/lib/relaton/iana/CLAUDE.md +0 -105
  59. data/lib/relaton/iec/CLAUDE.md +0 -13
  60. data/lib/relaton/ieee/CLAUDE.md +0 -202
  61. data/lib/relaton/ietf/CLAUDE.md +0 -382
  62. data/lib/relaton/iho/CLAUDE.md +0 -76
  63. data/lib/relaton/index/CLAUDE.md +0 -208
  64. data/lib/relaton/isbn/CLAUDE.md +0 -47
  65. data/lib/relaton/iso/CLAUDE.md +0 -38
  66. data/lib/relaton/itu/CLAUDE.md +0 -685
  67. data/lib/relaton/jcgm/CLAUDE.md +0 -107
  68. data/lib/relaton/jis/CLAUDE.md +0 -64
  69. data/lib/relaton/logger/CLAUDE.md +0 -37
  70. data/lib/relaton/nist/CLAUDE.md +0 -194
  71. data/lib/relaton/oasis/CLAUDE.md +0 -251
  72. data/lib/relaton/ogc/CLAUDE.md +0 -242
  73. data/lib/relaton/oiml/CLAUDE.md +0 -47
  74. data/lib/relaton/omg/CLAUDE.md +0 -137
  75. data/lib/relaton/plateau/CLAUDE.md +0 -126
  76. data/lib/relaton/sae/CLAUDE.md +0 -91
  77. data/lib/relaton/sdo/CLAUDE.md +0 -81
  78. data/lib/relaton/un/CLAUDE.md +0 -91
  79. data/lib/relaton/w3c/CLAUDE.md +0 -369
  80. data/lib/relaton/xsf/CLAUDE.md +0 -189
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-06 00:00:00.000000000 Z
11
+ date: 2026-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -296,14 +296,14 @@ dependencies:
296
296
  requirements:
297
297
  - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: 0.8.164
299
+ version: 0.8.171
300
300
  type: :runtime
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - "~>"
305
305
  - !ruby/object:Gem::Version
306
- version: 0.8.164
306
+ version: 0.8.171
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: lutaml-store
309
309
  requirement: !ruby/object:Gem::Requirement
@@ -388,6 +388,34 @@ dependencies:
388
388
  - - ">="
389
389
  - !ruby/object:Gem::Version
390
390
  version: '0'
391
+ - !ruby/object:Gem::Dependency
392
+ name: uri
393
+ requirement: !ruby/object:Gem::Requirement
394
+ requirements:
395
+ - - ">="
396
+ - !ruby/object:Gem::Version
397
+ version: '0'
398
+ type: :runtime
399
+ prerelease: false
400
+ version_requirements: !ruby/object:Gem::Requirement
401
+ requirements:
402
+ - - ">="
403
+ - !ruby/object:Gem::Version
404
+ version: '0'
405
+ - !ruby/object:Gem::Dependency
406
+ name: singleton
407
+ requirement: !ruby/object:Gem::Requirement
408
+ requirements:
409
+ - - ">="
410
+ - !ruby/object:Gem::Version
411
+ version: '0'
412
+ type: :runtime
413
+ prerelease: false
414
+ version_requirements: !ruby/object:Gem::Requirement
415
+ requirements:
416
+ - - ">="
417
+ - !ruby/object:Gem::Version
418
+ version: '0'
391
419
  - !ruby/object:Gem::Dependency
392
420
  name: mechanize
393
421
  requirement: !ruby/object:Gem::Requirement
@@ -492,14 +520,14 @@ dependencies:
492
520
  requirements:
493
521
  - - "~>"
494
522
  - !ruby/object:Gem::Version
495
- version: 2.0.9
523
+ version: 2.0.22
496
524
  type: :runtime
497
525
  prerelease: false
498
526
  version_requirements: !ruby/object:Gem::Requirement
499
527
  requirements:
500
528
  - - "~>"
501
529
  - !ruby/object:Gem::Version
502
- version: 2.0.9
530
+ version: 2.0.22
503
531
  - !ruby/object:Gem::Dependency
504
532
  name: yeptris
505
533
  requirement: !ruby/object:Gem::Requirement
@@ -584,7 +612,6 @@ files:
584
612
  - lib/relaton-render.rb
585
613
  - lib/relaton.rb
586
614
  - lib/relaton/3gpp.rb
587
- - lib/relaton/3gpp/CLAUDE.md
588
615
  - lib/relaton/3gpp/README.adoc
589
616
  - lib/relaton/3gpp/bibdata.rb
590
617
  - lib/relaton/3gpp/bibitem.rb
@@ -601,7 +628,6 @@ files:
601
628
  - lib/relaton/3gpp/release.rb
602
629
  - lib/relaton/3gpp/util.rb
603
630
  - lib/relaton/adobe.rb
604
- - lib/relaton/adobe/CLAUDE.md
605
631
  - lib/relaton/adobe/bibdata.rb
606
632
  - lib/relaton/adobe/bibitem.rb
607
633
  - lib/relaton/adobe/bibliography.rb
@@ -614,7 +640,6 @@ files:
614
640
  - lib/relaton/adobe/processor.rb
615
641
  - lib/relaton/adobe/util.rb
616
642
  - lib/relaton/bib.rb
617
- - lib/relaton/bib/CLAUDE.md
618
643
  - lib/relaton/bib/README.adoc
619
644
  - lib/relaton/bib/converter/asciibib.rb
620
645
  - lib/relaton/bib/converter/asciibib/to_asciibib.rb
@@ -629,6 +654,7 @@ files:
629
654
  - lib/relaton/bib/converter/bibxml/to_rfcxml_referencegroup_v3.rb
630
655
  - lib/relaton/bib/converter/bibxml/to_rfcxml_v3.rb
631
656
  - lib/relaton/bib/converter/csl.rb
657
+ - lib/relaton/bib/converter/csl/from_csl.rb
632
658
  - lib/relaton/bib/converter/ris.rb
633
659
  - lib/relaton/bib/converter/titles.rb
634
660
  - lib/relaton/bib/hash_parser_v1.rb
@@ -693,7 +719,6 @@ files:
693
719
  - lib/relaton/bibcollection.rb
694
720
  - lib/relaton/bibdata.rb
695
721
  - lib/relaton/bipm.rb
696
- - lib/relaton/bipm/CLAUDE.md
697
722
  - lib/relaton/bipm/README.adoc
698
723
  - lib/relaton/bipm/bibliography.rb
699
724
  - lib/relaton/bipm/converter/asciibib.rb
@@ -715,7 +740,6 @@ files:
715
740
  - lib/relaton/bipm/si_brochure_parser.rb
716
741
  - lib/relaton/bipm/util.rb
717
742
  - lib/relaton/bsi.rb
718
- - lib/relaton/bsi/CLAUDE.md
719
743
  - lib/relaton/bsi/README.adoc
720
744
  - lib/relaton/bsi/bibliography.rb
721
745
  - lib/relaton/bsi/hit.rb
@@ -734,7 +758,6 @@ files:
734
758
  - lib/relaton/bsi/scraper.rb
735
759
  - lib/relaton/bsi/util.rb
736
760
  - lib/relaton/calconnect.rb
737
- - lib/relaton/calconnect/CLAUDE.md
738
761
  - lib/relaton/calconnect/README.adoc
739
762
  - lib/relaton/calconnect/bibliography.rb
740
763
  - lib/relaton/calconnect/data_fetcher.rb
@@ -751,7 +774,6 @@ files:
751
774
  - lib/relaton/calconnect/scraper.rb
752
775
  - lib/relaton/calconnect/util.rb
753
776
  - lib/relaton/ccsds.rb
754
- - lib/relaton/ccsds/CLAUDE.md
755
777
  - lib/relaton/ccsds/README.adoc
756
778
  - lib/relaton/ccsds/bibliography.rb
757
779
  - lib/relaton/ccsds/data/fetcher.rb
@@ -769,7 +791,6 @@ files:
769
791
  - lib/relaton/ccsds/processor.rb
770
792
  - lib/relaton/ccsds/util.rb
771
793
  - lib/relaton/cen.rb
772
- - lib/relaton/cen/CLAUDE.md
773
794
  - lib/relaton/cen/README.adoc
774
795
  - lib/relaton/cen/bibliography.rb
775
796
  - lib/relaton/cen/committees.yaml
@@ -786,7 +807,6 @@ files:
786
807
  - lib/relaton/cen/scraper.rb
787
808
  - lib/relaton/cen/util.rb
788
809
  - lib/relaton/cie.rb
789
- - lib/relaton/cie/CLAUDE.md
790
810
  - lib/relaton/cie/README.adoc
791
811
  - lib/relaton/cie/authors_parser.rb
792
812
  - lib/relaton/cie/bibdata.rb
@@ -854,7 +874,6 @@ files:
854
874
  - lib/relaton/cli/yaml_convertor.rb
855
875
  - lib/relaton/cloud.rb
856
876
  - lib/relaton/core.rb
857
- - lib/relaton/core/CLAUDE.md
858
877
  - lib/relaton/core/README.adoc
859
878
  - lib/relaton/core/array_wrapper.rb
860
879
  - lib/relaton/core/data_fetcher.rb
@@ -868,7 +887,6 @@ files:
868
887
  - lib/relaton/core/request_error.rb
869
888
  - lib/relaton/core/workers_pool.rb
870
889
  - lib/relaton/db.rb
871
- - lib/relaton/db/CLAUDE.md
872
890
  - lib/relaton/db/cache.rb
873
891
  - lib/relaton/db/cache_entry.rb
874
892
  - lib/relaton/db/config.rb
@@ -876,14 +894,12 @@ files:
876
894
  - lib/relaton/db/util.rb
877
895
  - lib/relaton/db/workers_pool.rb
878
896
  - lib/relaton/doi.rb
879
- - lib/relaton/doi/CLAUDE.md
880
897
  - lib/relaton/doi/README.adoc
881
898
  - lib/relaton/doi/crossref.rb
882
899
  - lib/relaton/doi/parser.rb
883
900
  - lib/relaton/doi/processor.rb
884
901
  - lib/relaton/doi/util.rb
885
902
  - lib/relaton/easc.rb
886
- - lib/relaton/easc/CLAUDE.md
887
903
  - lib/relaton/easc/bibdata.rb
888
904
  - lib/relaton/easc/bibitem.rb
889
905
  - lib/relaton/easc/bibliography.rb
@@ -896,7 +912,6 @@ files:
896
912
  - lib/relaton/easc/processor.rb
897
913
  - lib/relaton/easc/util.rb
898
914
  - lib/relaton/ecma.rb
899
- - lib/relaton/ecma/CLAUDE.md
900
915
  - lib/relaton/ecma/README.adoc
901
916
  - lib/relaton/ecma/bibdata.rb
902
917
  - lib/relaton/ecma/bibitem.rb
@@ -917,7 +932,6 @@ files:
917
932
  - lib/relaton/element_finder.rb
918
933
  - lib/relaton/equivalence.rb
919
934
  - lib/relaton/etsi.rb
920
- - lib/relaton/etsi/CLAUDE.md
921
935
  - lib/relaton/etsi/README.adoc
922
936
  - lib/relaton/etsi/bibdata.rb
923
937
  - lib/relaton/etsi/bibitem.rb
@@ -933,7 +947,6 @@ files:
933
947
  - lib/relaton/etsi/status.rb
934
948
  - lib/relaton/etsi/util.rb
935
949
  - lib/relaton/evs.rb
936
- - lib/relaton/evs/CLAUDE.md
937
950
  - lib/relaton/evs/README.adoc
938
951
  - lib/relaton/evs/bibliography.rb
939
952
  - lib/relaton/evs/hit.rb
@@ -949,7 +962,6 @@ files:
949
962
  - lib/relaton/evs/scraper.rb
950
963
  - lib/relaton/evs/util.rb
951
964
  - lib/relaton/gb.rb
952
- - lib/relaton/gb/CLAUDE.md
953
965
  - lib/relaton/gb/README.adoc
954
966
  - lib/relaton/gb/bibdata.rb
955
967
  - lib/relaton/gb/bibitem.rb
@@ -975,7 +987,6 @@ files:
975
987
  - lib/relaton/gb/util.rb
976
988
  - lib/relaton/gb/yaml/prefixes.yaml
977
989
  - lib/relaton/gost.rb
978
- - lib/relaton/gost/CLAUDE.md
979
990
  - lib/relaton/gost/bibdata.rb
980
991
  - lib/relaton/gost/bibitem.rb
981
992
  - lib/relaton/gost/bibliography.rb
@@ -988,7 +999,6 @@ files:
988
999
  - lib/relaton/gost/processor.rb
989
1000
  - lib/relaton/gost/util.rb
990
1001
  - lib/relaton/iala.rb
991
- - lib/relaton/iala/CLAUDE.md
992
1002
  - lib/relaton/iala/bibdata.rb
993
1003
  - lib/relaton/iala/bibitem.rb
994
1004
  - lib/relaton/iala/bibliography.rb
@@ -1002,7 +1012,6 @@ files:
1002
1012
  - lib/relaton/iala/relation.rb
1003
1013
  - lib/relaton/iala/util.rb
1004
1014
  - lib/relaton/iana.rb
1005
- - lib/relaton/iana/CLAUDE.md
1006
1015
  - lib/relaton/iana/README.adoc
1007
1016
  - lib/relaton/iana/bibdata.rb
1008
1017
  - lib/relaton/iana/bibitem.rb
@@ -1014,7 +1023,6 @@ files:
1014
1023
  - lib/relaton/iana/processor.rb
1015
1024
  - lib/relaton/iana/util.rb
1016
1025
  - lib/relaton/iec.rb
1017
- - lib/relaton/iec/CLAUDE.md
1018
1026
  - lib/relaton/iec/README.adoc
1019
1027
  - lib/relaton/iec/bibliography.rb
1020
1028
  - lib/relaton/iec/data_fetcher.rb
@@ -1037,7 +1045,6 @@ files:
1037
1045
  - lib/relaton/iec/statuses.yml
1038
1046
  - lib/relaton/iec/util.rb
1039
1047
  - lib/relaton/ieee.rb
1040
- - lib/relaton/ieee/CLAUDE.md
1041
1048
  - lib/relaton/ieee/README.adoc
1042
1049
  - lib/relaton/ieee/balloting_group.rb
1043
1050
  - lib/relaton/ieee/bibdata.rb
@@ -1058,7 +1065,6 @@ files:
1058
1065
  - lib/relaton/ieee/rawbib_id_parser.rb
1059
1066
  - lib/relaton/ieee/util.rb
1060
1067
  - lib/relaton/ietf.rb
1061
- - lib/relaton/ietf/CLAUDE.md
1062
1068
  - lib/relaton/ietf/README.adoc
1063
1069
  - lib/relaton/ietf/bibdata.rb
1064
1070
  - lib/relaton/ietf/bibitem.rb
@@ -1086,7 +1092,6 @@ files:
1086
1092
  - lib/relaton/ietf/util.rb
1087
1093
  - lib/relaton/ietf/wg_name_resolver.rb
1088
1094
  - lib/relaton/iho.rb
1089
- - lib/relaton/iho/CLAUDE.md
1090
1095
  - lib/relaton/iho/README.adoc
1091
1096
  - lib/relaton/iho/bibdata.rb
1092
1097
  - lib/relaton/iho/bibitem.rb
@@ -1104,7 +1109,6 @@ files:
1104
1109
  - lib/relaton/iho/structured_identifier.rb
1105
1110
  - lib/relaton/iho/util.rb
1106
1111
  - lib/relaton/index.rb
1107
- - lib/relaton/index/CLAUDE.md
1108
1112
  - lib/relaton/index/README.adoc
1109
1113
  - lib/relaton/index/config.rb
1110
1114
  - lib/relaton/index/dataset_lock.rb
@@ -1117,7 +1121,6 @@ files:
1117
1121
  - lib/relaton/index/type.rb
1118
1122
  - lib/relaton/index/util.rb
1119
1123
  - lib/relaton/isbn.rb
1120
- - lib/relaton/isbn/CLAUDE.md
1121
1124
  - lib/relaton/isbn/README.adoc
1122
1125
  - lib/relaton/isbn/isbn.rb
1123
1126
  - lib/relaton/isbn/open_library.rb
@@ -1125,7 +1128,6 @@ files:
1125
1128
  - lib/relaton/isbn/processor.rb
1126
1129
  - lib/relaton/isbn/util.rb
1127
1130
  - lib/relaton/iso.rb
1128
- - lib/relaton/iso/CLAUDE.md
1129
1131
  - lib/relaton/iso/README.adoc
1130
1132
  - lib/relaton/iso/bibliography.rb
1131
1133
  - lib/relaton/iso/data_fetcher.rb
@@ -1153,7 +1155,6 @@ files:
1153
1155
  - lib/relaton/iso/type/pubid.rb
1154
1156
  - lib/relaton/iso/util.rb
1155
1157
  - lib/relaton/itu.rb
1156
- - lib/relaton/itu/CLAUDE.md
1157
1158
  - lib/relaton/itu/README.adoc
1158
1159
  - lib/relaton/itu/bibliography.rb
1159
1160
  - lib/relaton/itu/data_crawler_r.rb
@@ -1185,7 +1186,6 @@ files:
1185
1186
  - lib/relaton/itu/scraper.rb
1186
1187
  - lib/relaton/itu/util.rb
1187
1188
  - lib/relaton/jcgm.rb
1188
- - lib/relaton/jcgm/CLAUDE.md
1189
1189
  - lib/relaton/jcgm/bibdata.rb
1190
1190
  - lib/relaton/jcgm/bibitem.rb
1191
1191
  - lib/relaton/jcgm/bibliography.rb
@@ -1202,7 +1202,6 @@ files:
1202
1202
  - lib/relaton/jcgm/structured_identifier.rb
1203
1203
  - lib/relaton/jcgm/util.rb
1204
1204
  - lib/relaton/jis.rb
1205
- - lib/relaton/jis/CLAUDE.md
1206
1205
  - lib/relaton/jis/README.adoc
1207
1206
  - lib/relaton/jis/bibdata.rb
1208
1207
  - lib/relaton/jis/bibitem.rb
@@ -1223,7 +1222,6 @@ files:
1223
1222
  - lib/relaton/jis/util.rb
1224
1223
  - lib/relaton/json.rb
1225
1224
  - lib/relaton/logger.rb
1226
- - lib/relaton/logger/CLAUDE.md
1227
1225
  - lib/relaton/logger/README.adoc
1228
1226
  - lib/relaton/logger/channels/gh_issue.rb
1229
1227
  - lib/relaton/logger/config.rb
@@ -1233,7 +1231,6 @@ files:
1233
1231
  - lib/relaton/logger/log_device.rb
1234
1232
  - lib/relaton/logger/pool.rb
1235
1233
  - lib/relaton/nist.rb
1236
- - lib/relaton/nist/CLAUDE.md
1237
1234
  - lib/relaton/nist/README.adoc
1238
1235
  - lib/relaton/nist/bibdata.rb
1239
1236
  - lib/relaton/nist/bibitem.rb
@@ -1259,7 +1256,6 @@ files:
1259
1256
  - lib/relaton/nist/series.yaml
1260
1257
  - lib/relaton/nist/util.rb
1261
1258
  - lib/relaton/oasis.rb
1262
- - lib/relaton/oasis/CLAUDE.md
1263
1259
  - lib/relaton/oasis/README.adoc
1264
1260
  - lib/relaton/oasis/bibdata.rb
1265
1261
  - lib/relaton/oasis/bibitem.rb
@@ -1277,7 +1273,6 @@ files:
1277
1273
  - lib/relaton/oasis/processor.rb
1278
1274
  - lib/relaton/oasis/util.rb
1279
1275
  - lib/relaton/ogc.rb
1280
- - lib/relaton/ogc/CLAUDE.md
1281
1276
  - lib/relaton/ogc/README.adoc
1282
1277
  - lib/relaton/ogc/bibdata.rb
1283
1278
  - lib/relaton/ogc/bibitem.rb
@@ -1294,7 +1289,6 @@ files:
1294
1289
  - lib/relaton/ogc/scraper.rb
1295
1290
  - lib/relaton/ogc/util.rb
1296
1291
  - lib/relaton/oiml.rb
1297
- - lib/relaton/oiml/CLAUDE.md
1298
1292
  - lib/relaton/oiml/README.adoc
1299
1293
  - lib/relaton/oiml/bibdata.rb
1300
1294
  - lib/relaton/oiml/bibitem.rb
@@ -1309,7 +1303,6 @@ files:
1309
1303
  - lib/relaton/oiml/relation.rb
1310
1304
  - lib/relaton/oiml/util.rb
1311
1305
  - lib/relaton/omg.rb
1312
- - lib/relaton/omg/CLAUDE.md
1313
1306
  - lib/relaton/omg/README.adoc
1314
1307
  - lib/relaton/omg/bibdata.rb
1315
1308
  - lib/relaton/omg/bibitem.rb
@@ -1322,7 +1315,6 @@ files:
1322
1315
  - lib/relaton/omg/scraper.rb
1323
1316
  - lib/relaton/omg/util.rb
1324
1317
  - lib/relaton/plateau.rb
1325
- - lib/relaton/plateau/CLAUDE.md
1326
1318
  - lib/relaton/plateau/README.adoc
1327
1319
  - lib/relaton/plateau/bibdata.rb
1328
1320
  - lib/relaton/plateau/bibitem.rb
@@ -1394,7 +1386,6 @@ files:
1394
1386
  - lib/relaton/render/iso690/styles/mla.yml
1395
1387
  - lib/relaton/render/iso690/template.rb
1396
1388
  - lib/relaton/sae.rb
1397
- - lib/relaton/sae/CLAUDE.md
1398
1389
  - lib/relaton/sae/bibdata.rb
1399
1390
  - lib/relaton/sae/bibitem.rb
1400
1391
  - lib/relaton/sae/bibliography.rb
@@ -1405,7 +1396,6 @@ files:
1405
1396
  - lib/relaton/sae/processor.rb
1406
1397
  - lib/relaton/sae/util.rb
1407
1398
  - lib/relaton/sdo.rb
1408
- - lib/relaton/sdo/CLAUDE.md
1409
1399
  - lib/relaton/sdo/config.rb
1410
1400
  - lib/relaton/sdo/fetcher.rb
1411
1401
  - lib/relaton/sdo/logo.rb
@@ -1413,7 +1403,6 @@ files:
1413
1403
  - lib/relaton/sdo/organization.rb
1414
1404
  - lib/relaton/sdo/store.rb
1415
1405
  - lib/relaton/un.rb
1416
- - lib/relaton/un/CLAUDE.md
1417
1406
  - lib/relaton/un/README.adoc
1418
1407
  - lib/relaton/un/bibdata.rb
1419
1408
  - lib/relaton/un/bibitem.rb
@@ -1438,7 +1427,6 @@ files:
1438
1427
  - lib/relaton/un/wasm_v_bg.wasm
1439
1428
  - lib/relaton/version.rb
1440
1429
  - lib/relaton/w3c.rb
1441
- - lib/relaton/w3c/CLAUDE.md
1442
1430
  - lib/relaton/w3c/README.adoc
1443
1431
  - lib/relaton/w3c/bibdata.rb
1444
1432
  - lib/relaton/w3c/bibitem.rb
@@ -1456,7 +1444,6 @@ files:
1456
1444
  - lib/relaton/w3c/safe_realize.rb
1457
1445
  - lib/relaton/w3c/util.rb
1458
1446
  - lib/relaton/xsf.rb
1459
- - lib/relaton/xsf/CLAUDE.md
1460
1447
  - lib/relaton/xsf/README.adoc
1461
1448
  - lib/relaton/xsf/bibdata.rb
1462
1449
  - lib/relaton/xsf/bibitem.rb
@@ -1,218 +0,0 @@
1
- # CLAUDE.md
2
-
3
- ## Architecture
4
-
5
- **Pubid-backed docidentifier.** `Relaton::ThreeGpp::Docidentifier`
6
- (`docidentifier.rb`, `< Bib::Docidentifier`) parses its `content` into a
7
- `Pubid::Tgpp::Identifier` kept in `@pubid`, while the lutaml `content`
8
- attribute stays a plain **string** — `ItemData#create_id` calls
9
- `docid.content.sub(...)`, so the ISO `Type::Pubid` route (which makes `content`
10
- return an object) would break it. Parsing is **soft**: `content=` lazily
11
- `require "pubid"` and rescues `LoadError`/`StandardError`, so a missing pubid
12
- gem or non-3GPP content leaves `@pubid` nil rather than raising.
13
-
14
- Before this class existed, 3GPP inherited `Bib::Docidentifier`, whose
15
- `remove_part!` / `remove_date!` / `to_all_parts!` each raise
16
- `NotImplementedError` — and `Bib::ItemData` broadcasts all three to every
17
- docidentifier, so `#to_all_parts` and `#to_most_recent_reference` **raised on
18
- every 3GPP item**. The mapping is 3GPP-specific:
19
-
20
- - **`remove_part!` → clears `parts`.** A real, separable component here
21
- (unlike IALA's, which is a no-op): `TS 29.198-04-1` → `TS 29.198`. `parts`
22
- is a collection, so it is emptied rather than nil'd — `Identifier#code`
23
- renders through `parts.map`.
24
- - **`remove_date!` → clears `release` AND `version`.** 3GPP carries no date;
25
- those two are its version discriminators — the same pair that
26
- `Bibliography#best_match` lets a reference omit — so clearing both yields the
27
- version-agnostic ("most recent") reference `TS 23.207`.
28
- - **`to_all_parts!` → both, then wraps `@pubid` in pubid's `AllParts`.**
29
- `content` stays the plain stripped id — the Tgpp renderer has no
30
- "(all parts)" marker, and `content` is cached from the pre-wrap pubid on
31
- purpose. `#pubid` itself, read directly, now answers `all_parts? == true`
32
- and renders WITH pubid's generic marker (`#to_s`), since it's the wrapper.
33
-
34
- All three no-op safely when `@pubid` is nil, so `ItemData#to_all_parts` and
35
- `#to_most_recent_reference` never raise.
36
-
37
- **The `with_publisher` trap.** `Pubid::Tgpp::Identifier#to_s` defaults to
38
- **omitting** the `3GPP ` token — deliberately, so it reproduces the index id
39
- (`TS 23.207:REL-4/4.0.0`). The stored docidentifier `content` *keeps* the
40
- prefix (`Parser#parse_docid` builds `"3GPP #{number}"`), while `docnumber` does
41
- not. So `Docidentifier#refresh_content!` renders
42
- `to_s(with_publisher: true)`; without it every mutation would silently strip
43
- the prefix. This is the one place 3GPP diverges from the IALA template, whose
44
- `refresh_content!` is a bare `to_s`.
45
-
46
- **Index (`index-v2`, pubid-keyed).** `INDEXFILE` is the pubid-backed
47
- `index-v2`: 88,464 rows of `_type: pubid:3gpp:{technical-specification,
48
- technical-report}` with `number`/`suffix`/`parts`/`release`/`version`. The
49
- consumer (`Bibliography#index`) and the producer (`DataFetcher#index`) pass
50
- `pubid_class: ::Pubid::Tgpp::Identifier`. That is what makes `Relaton::Index`
51
- deserialize the rows into identifiers, sort them by `id.root.number`, and let
52
- `Type#search` bsearch. Omitting it on the **producer** side writes v1-shaped
53
- rows under a v2 name, silently (`FileIO#save` only calls `to_hash` when the
54
- value is an instance of `pubid_class`); omitting it on the **consumer** side
55
- leaves the rows raw hashes with `FileIO#sorted` false, so every lookup scans
56
- all 88,464 rows. Measured on the live corpus: 3,767 number buckets, largest
57
- 979; a `TS 23.207` lookup narrows to **37 of 88,464**.
58
- `Processor#remove_index_file` passes `url: true` and `file:` only: the delete
59
- never reads the index (see `lib/relaton/index/CLAUDE.md`).
60
-
61
- `Bibliography#best_match` follows the ETSI/W3C/IALA idiom:
62
-
63
- - **Pass the pubid, not the string.** `Type#search_candidates` narrows only
64
- when the argument is not a `String`, so passing the reference text — which
65
- this flavor used to do — disables the binary search however the index was
66
- built. `pubid_class:` alone fixes nothing; both had to change together.
67
- - **Select with the subset match.** `best_match` calls `index.search(pubid)`
68
- with no block, so `Index::Type#search` selects with pubid's `pubid === row`.
69
- `release` and `version` are 3GPP's only optional components: one that the
70
- reference omits matches any value, so a bare `3GPP TS 23.207` finds the
71
- `REL-19/19.0.0` row. Measured over the full `relaton-data-3gpp` index
72
- (88,464 rows): `===` and the old `matches?(…, ignore: %i[release version])`
73
- agree on all 31,305,864 pairs.
74
- - **`suffix` and `parts` are strict.** They are part of the document code
75
- (`TS 29.198-04-1`, `TR 00.01U`), not qualifiers, so pubid declares them
76
- `subset_strict` for 3GPP (pubid#408): `TS 29.198` does not match
77
- `TS 29.198-04-1`, and `TR 00.01` does not match `TR 00.01U`.
78
- - **Neither is the document type.** It is the identifier's class, and `===`
79
- requires the same class, so `TS 23.207` and `TR 23.207` never match. (No
80
- document code in the corpus is actually carried by both types — measured
81
- over all 88,464 rows — so the specs pin this with a negative lookup rather
82
- than a fixture pair.)
83
- - **A part-less row must deserialize with `parts == []`.** A parsed identifier
84
- has always had `parts == []`; one deserialized from an index row used to
85
- have `parts == nil`. With `parts` strict, nil and empty are the same value,
86
- but the old attribute-wise `matches?` made every part-less row silently fail
87
- to match its own reference — 366 of the 387 fixture rows. Fixed upstream in
88
- pubid (`242ad5b`). If part-less lookups ever start returning nil again,
89
- check the installed pubid before the flavor.
90
- - **An unrecognized reference raises.** Like ISO and ETSI, the parse error
91
- propagates out of `search`, so relaton-cli renders `"…" is not a recognized
92
- standards identifier` (`gems/relaton-cli/lib/relaton/cli/command.rb:324`,
93
- `subcommand_collection.rb:134`) and API callers rescue it themselves. The
94
- parse happens **outside** the method-level rescue, whose list is transport
95
- errors only, so it is never relabelled as a `Relaton::RequestError`.
96
-
97
- ### Ordering: highest version wins
98
-
99
- `min_by { |r| r[:id] }` compared raw strings, so `3GPP TS 23.207` (37 rows)
100
- returned `REL-10/10.0.0` because `"1" < "4"` — neither the newest nor the
101
- oldest, just whichever sorted first as text. The key is now the version,
102
- compared **segment by segment as integers** (`19.0.0` beats `4.0.0`; `5.10.0`
103
- beats `5.9.0`, which a text comparison gets backwards).
104
-
105
- Scored against each document's own `date[0].at` over 870 documents in 59
106
- multi-row groups:
107
-
108
- | Key | Picks the newest published document |
109
- |---|---|
110
- | version segments, numeric | 51/59 — **86%** |
111
- | release rank, then version | 51/59 — **86%** |
112
- | the old `min_by { r[:id] }` | 1/59 — **2%** |
113
-
114
- **Do not add a release key on top.** The two candidate keys picked the same row
115
- in all 59 sampled groups and disagree on only **9 of 3,982** multi-row groups
116
- corpus-wide (99.77% identical) — all draft TRs carried into a later release at
117
- a lower version, e.g. `TR 23.873`, where the release answer is not clearly
118
- better. The cost would be a hand-maintained 27-token table whose order is
119
- **non-monotonic**: the chronological sequence is `Ph1, Ph2, REL-96, REL-97,
120
- REL-98, REL-99, Release 2000, UMTS, REL-4 … REL-21`, so every numeric read of
121
- the token puts REL-99 above REL-19.
122
-
123
- Ties break on the rendered id and then the file path, because the index sort is
124
- not stable.
125
-
126
- **Known limit — do not try to "fix" the ordering back.** "Newest release" and
127
- "newest publication" are different documents in ~8% of groups, because 3GPP
128
- keeps revising old releases:
129
-
130
- ```
131
- TS 04.08 newest published: REL-98/7.21.0 2004-01-05
132
- highest release: REL-99/8.0.0 2000-06-30
133
- ```
134
-
135
- A version key returns the second. No key computable from the identifier alone
136
- returns the first: index rows carry only `{id, file}` and `Pubid::Tgpp` has no
137
- date attribute. Closing that gap would need a pubid attribute, an index schema
138
- change and a crawler change.
139
-
140
- **Producer side.** `DataFetcher#save_doc` indexes
141
- `docidentifier.detect(&:primary).pubid` through `#index_primary` — the pubid is
142
- already parsed on the model, so nothing re-parses `docnumber`, and
143
- `pubid.to_s` (no publisher token) reproduces the old string key byte-for-byte,
144
- so the index key did not move. `docnumber` still names the output file. An id
145
- pubid cannot rebuild is recorded in `@errors` (the inherited `report_errors`
146
- logs a String value as the message) and the row is **skipped** rather than
147
- indexed unparsed — `Relaton::Index` rejects the whole index on one bad row. The
148
- data file is still written, so the document is unindexed, never lost.
149
-
150
- `require "pubid"` sits in `lib/relaton/3gpp.rb` (the IANA/IHO/IALA form), so
151
- pubid loads with the flavor. `Processor#remove_index_file` names no pubid
152
- class, so the cold `Db#clear` path that `spec/relaton/lazy_loading_spec.rb`
153
- guards does not depend on it. `Processor` also sets
154
- `@pubid_flavor = :Tgpp`, so `Core::Processor#prefixes` reads
155
- `Pubid::Tgpp.prefixes` (`["3GPP"]`).
156
-
157
- ### Dates: published, then the Release start and end
158
-
159
- `Parser#parse_date` emits the `published` date (CSV `Date`) first, then
160
- `project-start` from the CSV `Project Start` column and `released` from
161
- `Project End` (relaton-3gpp#13). #15 defines the Release end date as the date
162
- the Release is released, and the issue thread asks for it as the release date
163
- of the specification — hence `released`, not `project-end`. Both are the dates
164
- of the document's **Release**, not of the document: every version in one
165
- Release carries the same pair, so neither fits a standard type (`issued` would
166
- date a 2004 `REL-98` version to 1999). They also stay in `ext/release`
167
- (`project_start` / `project_end`). An empty column gives no date;
168
- `@errors[:date]` tracks the published date only.
169
-
170
- - **`Relaton::ThreeGpp::Date`** (`date.rb`) extends `Bib::Date`'s `type`
171
- value list with the two types, and `Item` shadows `date` with it (as it does
172
- `docidentifier`). Without it `validate!` rejects the types; the RelaxNG
173
- grammar already accepts any text. The shadow covers the top-level item
174
- only: an item nested in a `relation` (the transposition) reloads as
175
- `Bib::ItemBase` with plain `Bib::Date`s. Nothing validates those today.
176
- - **The constant hides Ruby's `::Date`** inside `Relaton::ThreeGpp`. Write
177
- `::Date.parse` / `::Date.today` in this flavor; a bare `Date.today` now
178
- raises `NoMethodError`.
179
- - **Select the publication date by type, never by `date[0]`.**
180
- `DataFetcher#published_date` does this for the transposition check: a row
181
- with no `Date` still has the two Release dates, so `date.any?` no longer
182
- means "has a publication date".
183
- - `spec/3gpp/fixtures/bib.xml`, `bibdata.xml` and `bib.yaml` are rendered from
184
- the `3gpp_get_document` cassette, i.e. from the published
185
- `relaton-data-3gpp` record. They get the two dates only after that repo
186
- re-crawls and the cassette is re-recorded — do not hand-add them.
187
-
188
- ## Testing
189
-
190
- - `bundle exec rake spec:3gpp` — run the 3GPP suite.
191
- - Specs live in `spec/3gpp/relaton/3gpp/` and run self-contained (see the root
192
- `CLAUDE.md` Testing section).
193
- - **Index fixture.** `spec/3gpp/fixtures/index-v2.zip` is a curated subset of
194
- the published index — never the full 88,464 rows, and never hand-written.
195
- `bundle exec rake spec:update_index_3gpp` regenerates it;
196
- `tasks/index_fixture_3gpp.rb` names each document group and the rule it pins
197
- (`TS 23.207` version ordering, `TS 05.05` legacy release tokens, `TS 04.08`
198
- the known limit, `TS 29.198-04-1` parts, `TR 00.01U` suffix, `TS 29.215` the
199
- release-less row). Rows are copied **verbatim** from `relaton-data-3gpp`'s
200
- published `index-v2.zip`, so the stored shapes are exactly what `DataFetcher`
201
- writes and what the runtime deserializes. `#build` refuses a v1 source
202
- outright — string ids under the v2 name would give a fixture
203
- `Relaton::Index` rejects wholesale — so the failure names its cause instead
204
- of surfacing as an unrelated deserialization error.
205
-
206
- Re-cutting always produces a different **binary** even when the rows are
207
- unchanged, because a zip stores mtimes. Compare the rows, not the file: if
208
- the row set is identical, there is nothing to commit.
209
- - `spec/3gpp/support/webmock.rb` seeds the fixture into the `Relaton::Index`
210
- pool **with `pubid_class:`** — without it the suite would pass while
211
- exercising something the runtime never does. It re-seeds in `before(:each)`,
212
- not only `before(:suite)`, because `DataFetcher#index` asks for the same type
213
- with `file:` but no `url:` and `Pool#type` then replaces the entry.
214
- `Pool#type` upcases its key, so `Bibliography`'s `"3GPP"` and
215
- `DataFetcher`'s `"3gpp"` are the same pooled entry, `:"3GPP"`.
216
- - **VCR cassettes:** `spec/3gpp/vcr_cassettes/`. Index downloads are ignored by
217
- VCR (matched as `index-v\d+\.zip`, so the next `INDEXFILE` bump does not
218
- start recording them) and served from the fixture instead.