pubid 2.0.7 → 2.0.9
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/README.adoc +2 -1
- data/data/parg/sae.json +1 -1
- data/lib/pubid/api/pubid_urn_schema.rb +31 -0
- data/lib/pubid/api.rb +1 -0
- data/lib/pubid/ashrae/pubid_urn_schema.rb +37 -0
- data/lib/pubid/ashrae.rb +1 -0
- data/lib/pubid/asme/pubid_urn_schema.rb +34 -0
- data/lib/pubid/asme.rb +1 -0
- data/lib/pubid/cen_cenelec/CLAUDE.md +17 -0
- data/lib/pubid/cen_cenelec/identifiers/cenelec_harmonization_document.rb +4 -1
- data/lib/pubid/cen_cenelec/identifiers.rb +1 -1
- data/lib/pubid/cen_cenelec/pubid_urn_schema.rb +35 -0
- data/lib/pubid/cen_cenelec.rb +1 -0
- data/lib/pubid/etsi/CLAUDE.md +9 -0
- data/lib/pubid/etsi/pubid_urn_schema.rb +36 -0
- data/lib/pubid/etsi.rb +1 -0
- data/lib/pubid/gost/CLAUDE.md +12 -0
- data/lib/pubid/gost/pubid_urn_schema.rb +34 -0
- data/lib/pubid/gost.rb +1 -0
- data/lib/pubid/identifier.rb +7 -1
- data/lib/pubid/iec/pubid_urn_schema.rb +11 -4
- data/lib/pubid/jcgm/pubid_urn_schema.rb +29 -0
- data/lib/pubid/jcgm.rb +1 -0
- data/lib/pubid/oiml/pubid_urn_schema.rb +46 -0
- data/lib/pubid/oiml.rb +1 -0
- data/lib/pubid/plateau/CLAUDE.md +13 -0
- data/lib/pubid/plateau/pubid_urn_schema.rb +25 -0
- data/lib/pubid/plateau.rb +1 -0
- data/lib/pubid/pubid_urn/decoder.rb +8 -2
- data/lib/pubid/pubid_urn/encoder.rb +14 -2
- data/lib/pubid/pubid_urn/schema.rb +18 -4
- data/lib/pubid/pubid_urn.rb +40 -0
- data/lib/pubid/sae/CLAUDE.md +78 -0
- data/lib/pubid/sae/builder.rb +89 -11
- data/lib/pubid/sae/components/date.rb +12 -3
- data/lib/pubid/sae/components/type.rb +54 -2
- data/lib/pubid/sae/identifiers/base.rb +54 -1
- data/lib/pubid/sae/renderer.rb +17 -20
- data/lib/pubid/sae/urn_generator.rb +6 -1
- data/lib/pubid/sae/urn_parser.rb +8 -3
- data/lib/pubid/version.rb +1 -1
- data/lib/pubid.rb +20 -0
- metadata +13 -2
data/lib/pubid.rb
CHANGED
|
@@ -300,6 +300,26 @@ module Pubid
|
|
|
300
300
|
urn_parser.parse(string)
|
|
301
301
|
end
|
|
302
302
|
|
|
303
|
+
# The slug form (relaton#441): the pubid-scheme URN of +source+ in
|
|
304
|
+
# HTTP-path clothes — "/"-joined segments after the "urn:pubid:"
|
|
305
|
+
# prefix ("iso/is/9001/year-2015"). Bijective with
|
|
306
|
+
# {PubidUrn.from_slug}.
|
|
307
|
+
#
|
|
308
|
+
# @param source [Identifier, String] an identifier or its pubid-scheme URN
|
|
309
|
+
# @return [String]
|
|
310
|
+
def self.to_slug(source)
|
|
311
|
+
PubidUrn.to_slug(source)
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Parse a slug (see {PubidUrn.from_slug}).
|
|
315
|
+
#
|
|
316
|
+
# @param string [String] the slug
|
|
317
|
+
# @return [Identifier]
|
|
318
|
+
def self.from_slug(string)
|
|
319
|
+
eager_load_flavors!
|
|
320
|
+
PubidUrn.from_slug(string)
|
|
321
|
+
end
|
|
322
|
+
|
|
303
323
|
# Parse a pubid-scheme URN, and only that: an official URN such as
|
|
304
324
|
# "urn:iso:std:…" raises. For a consumer that takes a slug and must not
|
|
305
325
|
# accept a lossy official URN by mistake (relaton/relaton#441).
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pubid
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -190,6 +190,7 @@ files:
|
|
|
190
190
|
- lib/pubid/api/identifiers/technical_report.rb
|
|
191
191
|
- lib/pubid/api/identifiers/typeless_standard.rb
|
|
192
192
|
- lib/pubid/api/parser.rb
|
|
193
|
+
- lib/pubid/api/pubid_urn_schema.rb
|
|
193
194
|
- lib/pubid/api/renderer.rb
|
|
194
195
|
- lib/pubid/api/single_identifier.rb
|
|
195
196
|
- lib/pubid/api/urn_generator.rb
|
|
@@ -208,6 +209,7 @@ files:
|
|
|
208
209
|
- lib/pubid/ashrae/identifiers/interpretation.rb
|
|
209
210
|
- lib/pubid/ashrae/identifiers/standard.rb
|
|
210
211
|
- lib/pubid/ashrae/parser.rb
|
|
212
|
+
- lib/pubid/ashrae/pubid_urn_schema.rb
|
|
211
213
|
- lib/pubid/ashrae/renderer.rb
|
|
212
214
|
- lib/pubid/ashrae/single_identifier.rb
|
|
213
215
|
- lib/pubid/ashrae/supplement_identifier.rb
|
|
@@ -222,6 +224,7 @@ files:
|
|
|
222
224
|
- lib/pubid/asme/identifiers/base.rb
|
|
223
225
|
- lib/pubid/asme/identifiers/standard.rb
|
|
224
226
|
- lib/pubid/asme/parser.rb
|
|
227
|
+
- lib/pubid/asme/pubid_urn_schema.rb
|
|
225
228
|
- lib/pubid/asme/renderer.rb
|
|
226
229
|
- lib/pubid/asme/single_identifier.rb
|
|
227
230
|
- lib/pubid/asme/urn_generator.rb
|
|
@@ -358,6 +361,7 @@ files:
|
|
|
358
361
|
- lib/pubid/cen_cenelec/identifiers/technical_report.rb
|
|
359
362
|
- lib/pubid/cen_cenelec/identifiers/technical_specification.rb
|
|
360
363
|
- lib/pubid/cen_cenelec/parser.rb
|
|
364
|
+
- lib/pubid/cen_cenelec/pubid_urn_schema.rb
|
|
361
365
|
- lib/pubid/cen_cenelec/renderer.rb
|
|
362
366
|
- lib/pubid/cen_cenelec/single_identifier.rb
|
|
363
367
|
- lib/pubid/cen_cenelec/urn_generator.rb
|
|
@@ -476,6 +480,7 @@ files:
|
|
|
476
480
|
- lib/pubid/etsi/identifiers/etsi_standard.rb
|
|
477
481
|
- lib/pubid/etsi/identifiers/supplement_identifier.rb
|
|
478
482
|
- lib/pubid/etsi/parser.rb
|
|
483
|
+
- lib/pubid/etsi/pubid_urn_schema.rb
|
|
479
484
|
- lib/pubid/etsi/renderer.rb
|
|
480
485
|
- lib/pubid/etsi/urn_generator.rb
|
|
481
486
|
- lib/pubid/etsi/urn_parser.rb
|
|
@@ -518,6 +523,7 @@ files:
|
|
|
518
523
|
- lib/pubid/gost/identifiers/interstate_standard.rb
|
|
519
524
|
- lib/pubid/gost/identifiers/national_standard.rb
|
|
520
525
|
- lib/pubid/gost/parser.rb
|
|
526
|
+
- lib/pubid/gost/pubid_urn_schema.rb
|
|
521
527
|
- lib/pubid/gost/renderer.rb
|
|
522
528
|
- lib/pubid/gost/urn_generator.rb
|
|
523
529
|
- lib/pubid/gost/urn_parser.rb
|
|
@@ -790,6 +796,7 @@ files:
|
|
|
790
796
|
- lib/pubid/jcgm/identifiers/gum_guide.rb
|
|
791
797
|
- lib/pubid/jcgm/identifiers/meeting.rb
|
|
792
798
|
- lib/pubid/jcgm/parser.rb
|
|
799
|
+
- lib/pubid/jcgm/pubid_urn_schema.rb
|
|
793
800
|
- lib/pubid/jcgm/renderer.rb
|
|
794
801
|
- lib/pubid/jcgm/single_identifier.rb
|
|
795
802
|
- lib/pubid/jcgm/supplement_identifier.rb
|
|
@@ -915,6 +922,7 @@ files:
|
|
|
915
922
|
- lib/pubid/oiml/identifiers/seminar_report.rb
|
|
916
923
|
- lib/pubid/oiml/identifiers/vocabulary.rb
|
|
917
924
|
- lib/pubid/oiml/parser.rb
|
|
925
|
+
- lib/pubid/oiml/pubid_urn_schema.rb
|
|
918
926
|
- lib/pubid/oiml/renderer.rb
|
|
919
927
|
- lib/pubid/oiml/single_identifier.rb
|
|
920
928
|
- lib/pubid/oiml/supplement_identifier.rb
|
|
@@ -938,6 +946,7 @@ files:
|
|
|
938
946
|
- lib/pubid/parsers/urn.rb
|
|
939
947
|
- lib/pubid/pg.rb
|
|
940
948
|
- lib/pubid/plateau.rb
|
|
949
|
+
- lib/pubid/plateau/CLAUDE.md
|
|
941
950
|
- lib/pubid/plateau/builder.rb
|
|
942
951
|
- lib/pubid/plateau/identifier.rb
|
|
943
952
|
- lib/pubid/plateau/identifiers.rb
|
|
@@ -946,6 +955,7 @@ files:
|
|
|
946
955
|
- lib/pubid/plateau/identifiers/handbook.rb
|
|
947
956
|
- lib/pubid/plateau/identifiers/technical_report.rb
|
|
948
957
|
- lib/pubid/plateau/parser.rb
|
|
958
|
+
- lib/pubid/plateau/pubid_urn_schema.rb
|
|
949
959
|
- lib/pubid/plateau/renderer.rb
|
|
950
960
|
- lib/pubid/plateau/supplement_identifier.rb
|
|
951
961
|
- lib/pubid/plateau/urn_generator.rb
|
|
@@ -977,6 +987,7 @@ files:
|
|
|
977
987
|
- lib/pubid/rendering/stage.rb
|
|
978
988
|
- lib/pubid/rendering/supplement.rb
|
|
979
989
|
- lib/pubid/sae.rb
|
|
990
|
+
- lib/pubid/sae/CLAUDE.md
|
|
980
991
|
- lib/pubid/sae/builder.rb
|
|
981
992
|
- lib/pubid/sae/components.rb
|
|
982
993
|
- lib/pubid/sae/components/code.rb
|