pubid 2.0.35 → 2.0.36
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/lib/pubid/iala/CLAUDE.md +8 -2
- data/lib/pubid/iala/identifier.rb +8 -1
- data/lib/pubid/iala/identifiers/general_assembly.rb +28 -2
- data/lib/pubid/iala/identifiers.rb +0 -1
- data/lib/pubid/iala/pubid_urn_schema.rb +0 -1
- data/lib/pubid/iala.rb +6 -2
- data/lib/pubid/version.rb +1 -1
- metadata +7 -5
- data/lib/pubid/iala/identifiers/advice.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df32ad6dc58edf5d21b55931197c24a768ad6236bde325552ef2bb7edb1cfc7d
|
|
4
|
+
data.tar.gz: c8a6aed352409821dfde7c1dae1a27b304c4b88e0801076c2cd547c168643836
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c779229fbf5b49f4be5361e4a69371aaab54de0c30cb4eb670391bd4bdc31d482586933215ec1729c250c8c0ea8c55f90c9a9f80ebb4f786cef34b93a9ea202
|
|
7
|
+
data.tar.gz: 46c3ff9d21d91da36e3d01586ee06924d11df13c41d32ec83dcdce53e4c11880b195dd86c3adc46d2ec4ef945e10f81145a3d948c112e7906dd02ec0b95e3ebc
|
data/lib/pubid/iala/CLAUDE.md
CHANGED
|
@@ -19,13 +19,19 @@ followed by a number whose shape varies per series.
|
|
|
19
19
|
| G | Guideline | 4 digits, zero-padded | `IALA G1015 Ed 2.2` |
|
|
20
20
|
| C | Model Course | 4 digits + `-` part | `IALA C0103-1 Ed 3.0` |
|
|
21
21
|
| M | Manual (planned) | 4 digits, zero-padded | `IALA M0001 Ed 9.0` |
|
|
22
|
-
|
|
|
23
|
-
| GA | General Assembly resolution | dotted, each segment 2 digits | `IALA GA01.01` |
|
|
22
|
+
| GA | General Assembly resolution | dotted, each segment 2 digits (`GA01.01`); legacy A-session form dashed (`A12-01`) | `IALA GA01.01`, `IALA A12-01` |
|
|
24
23
|
| L | Letter | dotted + dashed, verbatim | `IALA L2.1.11 Ed 2` |
|
|
25
24
|
| X | Report (reserved) | 4 digits | `IALA X0123` |
|
|
26
25
|
| P | Resolution/Council publication (reserved) | 4 digits | `IALA P0123` |
|
|
27
26
|
| — | Annex wrapper over any base | bare or lettered | `IALA G1128 ANNEX A Ed 1.6` |
|
|
28
27
|
|
|
28
|
+
The A letter is GeneralAssembly's legacy session form, not a separate
|
|
29
|
+
series: all 11 A-shaped primary docidentifiers in relaton-data-iala
|
|
30
|
+
(A12-01, A13-01 through A13-04) are GA resolutions, the covers read
|
|
31
|
+
"GA Resolution A12-01", and no Advice-series document exists in the
|
|
32
|
+
catalogue. The letter the input used (GA or A) round-trips verbatim
|
|
33
|
+
through to_s and the URN; there is no Advice type.
|
|
34
|
+
|
|
29
35
|
The Annex class has no prefix of its own: it wraps a base identifier of
|
|
30
36
|
another series and preserves the annex marker case (`Annex` vs `ANNEX`).
|
|
31
37
|
X and P are reserved for future numbered series — today's reports and
|
|
@@ -51,7 +51,6 @@ module Pubid
|
|
|
51
51
|
"pubid:iala:guideline" => "Pubid::Iala::Identifiers::Guideline",
|
|
52
52
|
"pubid:iala:manual" => "Pubid::Iala::Identifiers::Manual",
|
|
53
53
|
"pubid:iala:model-course" => "Pubid::Iala::Identifiers::ModelCourse",
|
|
54
|
-
"pubid:iala:advice" => "Pubid::Iala::Identifiers::Advice",
|
|
55
54
|
"pubid:iala:general-assembly" => "Pubid::Iala::Identifiers::GeneralAssembly",
|
|
56
55
|
"pubid:iala:letter" => "Pubid::Iala::Identifiers::Letter",
|
|
57
56
|
"pubid:iala:annex" => "Pubid::Iala::Identifiers::Annex",
|
|
@@ -100,6 +99,14 @@ module Pubid
|
|
|
100
99
|
def dotted_segment_width(width)
|
|
101
100
|
@canonical_dotted_segment_width = width
|
|
102
101
|
end
|
|
102
|
+
|
|
103
|
+
public
|
|
104
|
+
|
|
105
|
+
# Additional type letters that route to this class; empty by
|
|
106
|
+
# default (GeneralAssembly aliases the legacy "A" session letter).
|
|
107
|
+
def type_letter_aliases(*_letters)
|
|
108
|
+
[]
|
|
109
|
+
end
|
|
103
110
|
end
|
|
104
111
|
end
|
|
105
112
|
end
|
|
@@ -3,8 +3,19 @@
|
|
|
3
3
|
module Pubid
|
|
4
4
|
module Iala
|
|
5
5
|
module Identifiers
|
|
6
|
-
# IALA General Assembly resolutions
|
|
7
|
-
#
|
|
6
|
+
# IALA General Assembly resolutions. Two printed forms carry the
|
|
7
|
+
# same class:
|
|
8
|
+
#
|
|
9
|
+
# - dotted series.index: GA01.01, GA01.13 — the form the
|
|
10
|
+
# relaton-data-iala catalogue registers for session A-1 onwards
|
|
11
|
+
# (26 primary docidentifiers).
|
|
12
|
+
# - legacy dashed session form: A12-01, A13-04 — the form the
|
|
13
|
+
# catalogue and the published covers use for the A-12/A-13
|
|
14
|
+
# sessions (all 11 A-shaped primary docidentifiers in the
|
|
15
|
+
# catalogue are GA resolutions; the shape carries no Advice).
|
|
16
|
+
# No edition. The two forms are distinguished by number shape
|
|
17
|
+
# (dotted GA numbers vs dashed A numbers) and rendered verbatim
|
|
18
|
+
# through to_s and the MRN URN; no extra attribute is stored.
|
|
8
19
|
class GeneralAssembly < Identifier
|
|
9
20
|
number_width 2
|
|
10
21
|
dotted_segment_width 2
|
|
@@ -13,6 +24,21 @@ module Pubid
|
|
|
13
24
|
{ key: :"general-assembly", title: "General Assembly Resolution",
|
|
14
25
|
short: "GA" }
|
|
15
26
|
end
|
|
27
|
+
|
|
28
|
+
# The legacy A-session letter renders for dashed numbers
|
|
29
|
+
# (A12-01); dotted numbers carry the canonical GA letter.
|
|
30
|
+
def type_letter
|
|
31
|
+
number.to_s.include?("-") ? "A" : super
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# DSL: declare additional type letters that route to this class.
|
|
35
|
+
# The legacy A-session letter resolves here as well.
|
|
36
|
+
def self.type_letter_aliases(*letters)
|
|
37
|
+
@type_letter_aliases = letters if letters.any?
|
|
38
|
+
@type_letter_aliases || []
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
type_letter_aliases "A"
|
|
16
42
|
end
|
|
17
43
|
end
|
|
18
44
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Pubid
|
|
4
4
|
module Iala
|
|
5
5
|
module Identifiers
|
|
6
|
-
autoload :Advice, "#{__dir__}/identifiers/advice"
|
|
7
6
|
autoload :Annex, "#{__dir__}/identifiers/annex"
|
|
8
7
|
autoload :Standard, "#{__dir__}/identifiers/standard"
|
|
9
8
|
autoload :Recommendation, "#{__dir__}/identifiers/recommendation"
|
data/lib/pubid/iala.rb
CHANGED
|
@@ -60,11 +60,15 @@ module Pubid
|
|
|
60
60
|
all_typed_stages.find { |s| s.abbr.any? { |a| a.to_s.upcase == abbr_str } }
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
# Look up an identifier class by its IALA type letter (S, R, G, M,
|
|
63
|
+
# Look up an identifier class by its IALA type letter (S, R, G, M,
|
|
64
|
+
# C, X, P, GA) or a class-declared alias of one (GeneralAssembly
|
|
65
|
+
# answers to the legacy "A" session letter).
|
|
64
66
|
# @param letter [String]
|
|
65
67
|
# @return [Class<Identifier>]
|
|
66
68
|
def self.identifier_klass_for_type_letter(letter)
|
|
67
|
-
@by_letter ||= identifier_types.
|
|
69
|
+
@by_letter ||= identifier_types.flat_map do |klass|
|
|
70
|
+
([klass.type[:short]] + Array(klass.type_letter_aliases)).map { |l| [l, klass] }
|
|
71
|
+
end.to_h
|
|
68
72
|
@by_letter.fetch(letter.to_s.upcase)
|
|
69
73
|
end
|
|
70
74
|
end
|
data/lib/pubid/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +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.36
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-11-15 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: lutaml-model
|
|
@@ -59,8 +60,8 @@ email:
|
|
|
59
60
|
executables: []
|
|
60
61
|
extensions: []
|
|
61
62
|
extra_rdoc_files:
|
|
62
|
-
- LICENSE.txt
|
|
63
63
|
- README.adoc
|
|
64
|
+
- LICENSE.txt
|
|
64
65
|
files:
|
|
65
66
|
- LICENSE.txt
|
|
66
67
|
- README.adoc
|
|
@@ -623,7 +624,6 @@ files:
|
|
|
623
624
|
- lib/pubid/iala/builder.rb
|
|
624
625
|
- lib/pubid/iala/identifier.rb
|
|
625
626
|
- lib/pubid/iala/identifiers.rb
|
|
626
|
-
- lib/pubid/iala/identifiers/advice.rb
|
|
627
627
|
- lib/pubid/iala/identifiers/annex.rb
|
|
628
628
|
- lib/pubid/iala/identifiers/general_assembly.rb
|
|
629
629
|
- lib/pubid/iala/identifiers/guideline.rb
|
|
@@ -1191,6 +1191,7 @@ metadata:
|
|
|
1191
1191
|
changelog_uri: https://github.com/pubid/pubid/releases
|
|
1192
1192
|
documentation_uri: https://rubydoc.info/gems/pubid
|
|
1193
1193
|
rubygems_mfa_required: 'true'
|
|
1194
|
+
post_install_message:
|
|
1194
1195
|
rdoc_options: []
|
|
1195
1196
|
require_paths:
|
|
1196
1197
|
- lib
|
|
@@ -1205,7 +1206,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1205
1206
|
- !ruby/object:Gem::Version
|
|
1206
1207
|
version: '0'
|
|
1207
1208
|
requirements: []
|
|
1208
|
-
rubygems_version:
|
|
1209
|
+
rubygems_version: 3.5.22
|
|
1210
|
+
signing_key:
|
|
1209
1211
|
specification_version: 4
|
|
1210
1212
|
summary: The international publication identifier (PubID) library for Ruby.
|
|
1211
1213
|
test_files: []
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Pubid
|
|
4
|
-
module Iala
|
|
5
|
-
module Identifiers
|
|
6
|
-
# IALA Advices (A prefix). Numbering is dashed: A12-01, A13-04.
|
|
7
|
-
# Carries no edition in the corpus.
|
|
8
|
-
class Advice < Identifier
|
|
9
|
-
def self.type
|
|
10
|
-
{ key: :advice, title: "Advice", short: "A" }
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|