pubid 2.0.55 → 2.0.57
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/data/iec/stage-codes.md +13 -0
- data/data/parg/bsi_pfs.json +1 -1
- data/data/parg/calconnect_pfs.json +1 -1
- data/data/parg/cen_pfs.json +1 -1
- data/data/parg/doi_pfs.json +1 -1
- data/data/parg/etsi_pfs.json +1 -1
- data/data/parg/iho.json +1 -1
- data/data/parg/iho.parg +24 -17
- data/lib/pubid/bsi_pfs/builder.rb +16 -2
- data/lib/pubid/bsi_pfs/identifiers/standalone_amendment.rb +31 -0
- data/lib/pubid/bsi_pfs/identifiers.rb +1 -0
- data/lib/pubid/bsi_pfs/pubid_urn_schema.rb +1 -0
- data/lib/pubid/bsi_pfs/renderer.rb +7 -5
- data/lib/pubid/bsi_pfs/urn.adoc +15 -6
- data/lib/pubid/bsi_pfs.rb +2 -2
- data/lib/pubid/calconnect_pfs.rb +1 -1
- data/lib/pubid/cen_pfs/builder.rb +4 -0
- data/lib/pubid/cen_pfs/identifier.rb +12 -8
- data/lib/pubid/cen_pfs/identifiers/adopted_european_norm.rb +4 -6
- data/lib/pubid/cen_pfs/identifiers/european_prestandard.rb +4 -6
- data/lib/pubid/cen_pfs.rb +1 -1
- data/lib/pubid/doi_pfs.rb +1 -1
- data/lib/pubid/etsi_pfs.rb +1 -1
- data/lib/pubid/iala/urn.adoc +1 -0
- data/lib/pubid/iec/CLAUDE.md +4 -0
- data/lib/pubid/iec/identifier.rb +55 -0
- data/lib/pubid/iec/identifiers/consolidated_identifier.rb +35 -0
- data/lib/pubid/iec/identifiers/international_standard.rb +7 -1
- data/lib/pubid/iec/identifiers/technical_report.rb +5 -1
- data/lib/pubid/iec/identifiers/technical_specification.rb +5 -1
- data/lib/pubid/iec/identifiers/vap_identifier.rb +28 -0
- data/lib/pubid/iec/supplement_identifier.rb +19 -0
- data/lib/pubid/iec/urn.adoc +18 -1
- data/lib/pubid/iho/CLAUDE.md +42 -18
- data/lib/pubid/iho/identifiers/base.rb +50 -3
- data/lib/pubid/iho/identifiers/bathymetric.rb +18 -0
- data/lib/pubid/iho/identifiers/capacity_building.rb +25 -0
- data/lib/pubid/iho/identifiers.rb +2 -2
- data/lib/pubid/iho/pubid_urn_schema.rb +2 -2
- data/lib/pubid/iho/urn.adoc +30 -13
- data/lib/pubid/iho/urn_generator.rb +30 -83
- data/lib/pubid/iho/urn_parser.rb +17 -12
- data/lib/pubid/version.rb +1 -1
- data/lib/tasks/pfs.rake +112 -0
- metadata +6 -4
- data/lib/pubid/iho/identifiers/bibliographic.rb +0 -16
- data/lib/pubid/iho/identifiers/circular_letter.rb +0 -15
data/lib/tasks/pfs.rake
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "shellwords"
|
|
4
|
+
|
|
5
|
+
# The PFS tooling, wrapped for the gem's rake (issue #152).
|
|
6
|
+
#
|
|
7
|
+
# The machinery lives in pubid-grammar (scripts/pfs); these tasks run it
|
|
8
|
+
# against the SIBLING checkout (../pubid-grammar, or PUBID_GRAMMAR_PATH)
|
|
9
|
+
# — the grammar repo is the SSOT and the commands mutate only there.
|
|
10
|
+
#
|
|
11
|
+
# rake pfs:new[Acme,scheme=acme,out=definitions/acme.pfs]
|
|
12
|
+
# rake pfs:lint[definitions/acme.pfs]
|
|
13
|
+
# rake pfs:doctor the drift checks (pin, freshness,
|
|
14
|
+
# contracts, gem parity, attestation)
|
|
15
|
+
# rake pfs:capture[specimen.txt,scheme=acme,out=draft.pfs]
|
|
16
|
+
# rake pfs:cutover[acme_pfs] the dev-alias -> canonical gates
|
|
17
|
+
#
|
|
18
|
+
# The first bracketed value is the positional argument; the rest are
|
|
19
|
+
# name=value options (rake delivers them verbatim, so the tasks parse
|
|
20
|
+
# them). The doctor's gem-parity check reads THIS checkout's data/parg/
|
|
21
|
+
# — so `rake pfs:doctor` from the gem is the consumer-side view of the
|
|
22
|
+
# same drift the grammar repo's doctor reports.
|
|
23
|
+
|
|
24
|
+
GRAMMAR_PATH = ENV["PUBID_GRAMMAR_PATH"] ||
|
|
25
|
+
File.expand_path("../../../pubid-grammar", __dir__)
|
|
26
|
+
PFS_CLI = File.join(GRAMMAR_PATH, "scripts/pfs")
|
|
27
|
+
|
|
28
|
+
# Runs the PFS CLI. The script carries a shebang but ships
|
|
29
|
+
# non-executable (the repo's convention); it is invoked as `ruby`.
|
|
30
|
+
def pfs_run(*args)
|
|
31
|
+
unless File.file?(PFS_CLI)
|
|
32
|
+
abort "the PFS CLI is not at #{PFS_CLI} — set PUBID_GRAMMAR_PATH " \
|
|
33
|
+
"to a pubid-grammar checkout"
|
|
34
|
+
end
|
|
35
|
+
ruby "#{PFS_CLI} #{args.join(' ')}"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# rake delivers bracketed values positionally; the name=value ones are
|
|
39
|
+
# parsed into --flags here.
|
|
40
|
+
def pfs_flags(args, *keys)
|
|
41
|
+
keys.filter_map do |key|
|
|
42
|
+
raw = args.extras.find { |e| e.start_with?("#{key}=") }
|
|
43
|
+
next unless raw
|
|
44
|
+
|
|
45
|
+
"--#{key} #{Shellwords.escape(raw.split('=', 2)[1])}"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def pfs_testsuite_path
|
|
50
|
+
ENV["PUBID_TESTSUITE_PATH"] ||
|
|
51
|
+
File.expand_path("../../../pubid-testsuite", __dir__)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def pfs_task_new(args)
|
|
55
|
+
org = args[:org] or abort "usage: rake pfs:new[<Org>,scheme=...,out=...]"
|
|
56
|
+
pfs_run("new", Shellwords.escape(org),
|
|
57
|
+
*pfs_flags(args, :scheme, :title, :publisher, :prefixes, :out))
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def pfs_task_lint(args)
|
|
61
|
+
file = args[:file] or
|
|
62
|
+
abort "usage: rake pfs:lint[<definition.pfs>] " \
|
|
63
|
+
"(the path is relative to #{GRAMMAR_PATH})"
|
|
64
|
+
pfs_run("lint", Shellwords.escape(File.expand_path(file, GRAMMAR_PATH)))
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def pfs_task_doctor
|
|
68
|
+
pfs_run("doctor", "--gem-root", Shellwords.escape(Dir.pwd),
|
|
69
|
+
"--testsuite-root", Shellwords.escape(pfs_testsuite_path))
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def pfs_task_capture(args)
|
|
73
|
+
input = args[:input] or
|
|
74
|
+
abort "usage: rake pfs:capture[<identifiers.txt>,scheme=...,out=...]"
|
|
75
|
+
pfs_run("capture", Shellwords.escape(File.expand_path(input)),
|
|
76
|
+
*pfs_flags(args, :scheme, :title, :publisher, :out))
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def pfs_task_cutover(args)
|
|
80
|
+
key = args[:key] or abort "usage: rake pfs:cutover[<org>_pfs]"
|
|
81
|
+
pfs_run("cutover", Shellwords.escape(key),
|
|
82
|
+
"--gem-root", Shellwords.escape(Dir.pwd),
|
|
83
|
+
"--testsuite-root", Shellwords.escape(pfs_testsuite_path))
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
namespace :pfs do
|
|
87
|
+
desc "Scaffold a composed flavor (rake pfs:new[Org,scheme=acme,out=P])"
|
|
88
|
+
task :new, [:org] do |_task, args|
|
|
89
|
+
pfs_task_new(args)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
desc "Pre-compile diagnostics (rake pfs:lint[definitions/acme.pfs])"
|
|
93
|
+
task :lint, [:file] do |_task, args|
|
|
94
|
+
pfs_task_lint(args)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
desc "Drift checks: the fleet pin, freshness, the contracts round, " \
|
|
98
|
+
"gem parity (this checkout's data/parg/), the attestation"
|
|
99
|
+
task :doctor do
|
|
100
|
+
pfs_task_doctor
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
desc "The lossless wizard substrate (rake pfs:capture[spec.txt,scheme=k])"
|
|
104
|
+
task :capture, [:input] do |_task, args|
|
|
105
|
+
pfs_task_capture(args)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
desc "The dev-alias -> canonical gates + plan (rake pfs:cutover[k_pfs])"
|
|
109
|
+
task :cutover, [:key] do |_task, args|
|
|
110
|
+
pfs_task_cutover(args)
|
|
111
|
+
end
|
|
112
|
+
end
|
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.57
|
|
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-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -382,6 +382,7 @@ files:
|
|
|
382
382
|
- lib/pubid/bsi_pfs/identifiers/draft_document.rb
|
|
383
383
|
- lib/pubid/bsi_pfs/identifiers/publicly_available_specification.rb
|
|
384
384
|
- lib/pubid/bsi_pfs/identifiers/published_document.rb
|
|
385
|
+
- lib/pubid/bsi_pfs/identifiers/standalone_amendment.rb
|
|
385
386
|
- lib/pubid/bsi_pfs/identifiers/supplement.rb
|
|
386
387
|
- lib/pubid/bsi_pfs/identifiers/technical_specification.rb
|
|
387
388
|
- lib/pubid/bsi_pfs/parser.rb
|
|
@@ -871,8 +872,8 @@ files:
|
|
|
871
872
|
- lib/pubid/iho/identifier.rb
|
|
872
873
|
- lib/pubid/iho/identifiers.rb
|
|
873
874
|
- lib/pubid/iho/identifiers/base.rb
|
|
874
|
-
- lib/pubid/iho/identifiers/
|
|
875
|
-
- lib/pubid/iho/identifiers/
|
|
875
|
+
- lib/pubid/iho/identifiers/bathymetric.rb
|
|
876
|
+
- lib/pubid/iho/identifiers/capacity_building.rb
|
|
876
877
|
- lib/pubid/iho/identifiers/miscellaneous.rb
|
|
877
878
|
- lib/pubid/iho/identifiers/publication.rb
|
|
878
879
|
- lib/pubid/iho/identifiers/standard.rb
|
|
@@ -1292,6 +1293,7 @@ files:
|
|
|
1292
1293
|
- lib/tasks/conformance.rake
|
|
1293
1294
|
- lib/tasks/docs.rake
|
|
1294
1295
|
- lib/tasks/export.rake
|
|
1296
|
+
- lib/tasks/pfs.rake
|
|
1295
1297
|
- lib/tasks/schema.rake
|
|
1296
1298
|
- lib/tasks/website-data.json
|
|
1297
1299
|
- schema/core/joint_prefixes.yaml
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Pubid
|
|
4
|
-
module Iho
|
|
5
|
-
module Identifiers
|
|
6
|
-
# IHO Bibliographic Publication (B series).
|
|
7
|
-
# Example: IHO B-4 2.19.0.
|
|
8
|
-
class Bibliographic < Identifier
|
|
9
|
-
def self.type
|
|
10
|
-
{ key: :bibliographic, title: "Bibliographic Publication",
|
|
11
|
-
short: "B" }
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Pubid
|
|
4
|
-
module Iho
|
|
5
|
-
module Identifiers
|
|
6
|
-
# IHO Circular Letter (C series).
|
|
7
|
-
# Example: IHO C-13 1.0.0.
|
|
8
|
-
class CircularLetter < Identifier
|
|
9
|
-
def self.type
|
|
10
|
-
{ key: :circular_letter, title: "Circular Letter", short: "C" }
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|