pubid 2.0.7 → 2.0.8
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/api/pubid_urn_schema.rb +29 -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/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/version.rb +1 -1
- metadata +6 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8013a826102b555c7067ce39bb01b1b3a4d43a6ec09ba6092ae4fe80ce364c8e
|
|
4
|
+
data.tar.gz: 9e7ebbfa50e70911201bc5800438ed661c1d03116c85e7f96f164bfc4089b615
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3d0739c523091e44a03e9c4796696a046dbbad30b6681cc4d19e69df785fff10a8bfb83912bff0d3215def503a1d28d48e1f1ca5f76335424cf9f7782c672bd
|
|
7
|
+
data.tar.gz: ae1b998769f90c7ea9463cd11c66f0374bf4598d2c7a425bb2f615c5acf592652f2a98fba9bf3b8c1db5c10d4f7b24952c516ca994de58f2f8c55b17db42919b
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Api
|
|
5
|
+
# The pubid-scheme URN of API (issue #656; docs/URN-SCHEMES.adoc).
|
|
6
|
+
#
|
|
7
|
+
# API MPMS Ch. 10.10 -> urn:pubid:api:mpms:10.10:subsec-...
|
|
8
|
+
#
|
|
9
|
+
# The number is the core of every type; +part+, +section+ and
|
|
10
|
+
# +subsection+ are atoms, in the doc's canonical order.
|
|
11
|
+
PubidUrnSchema = Pubid::PubidUrn.define("api") do
|
|
12
|
+
atom "part", "part"
|
|
13
|
+
atom "section", "section"
|
|
14
|
+
atom "subsection", "subsection"
|
|
15
|
+
|
|
16
|
+
type "pubid:api:base", "base"
|
|
17
|
+
type "pubid:api:bulletin", "bulletin"
|
|
18
|
+
type "pubid:api:continuous-operations-standard", "cos"
|
|
19
|
+
type "pubid:api:identifier", "id"
|
|
20
|
+
type "pubid:api:mpms", "mpms"
|
|
21
|
+
type "pubid:api:publication", "pub"
|
|
22
|
+
type "pubid:api:recommended-practice", "rp"
|
|
23
|
+
type "pubid:api:specification", "spec"
|
|
24
|
+
type "pubid:api:standard", "std"
|
|
25
|
+
type "pubid:api:technical-report", "tr"
|
|
26
|
+
type "pubid:api:typeless-standard", "ts"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/pubid/api.rb
CHANGED
|
@@ -16,6 +16,7 @@ module Pubid
|
|
|
16
16
|
autoload :SingleIdentifier, "#{__dir__}/api/single_identifier"
|
|
17
17
|
autoload :UrnGenerator, "#{__dir__}/api/urn_generator"
|
|
18
18
|
autoload :UrnParser, "#{__dir__}/api/urn_parser"
|
|
19
|
+
autoload :PubidUrnSchema, "#{__dir__}/api/pubid_urn_schema"
|
|
19
20
|
|
|
20
21
|
def self.parse(input)
|
|
21
22
|
Identifier.parse(input)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Ashrae
|
|
5
|
+
# The pubid-scheme URN of ASHRAE (issue #656; docs/URN-SCHEMES.adoc).
|
|
6
|
+
#
|
|
7
|
+
# ASHRAE Standard 15-2007 (RA 2010)
|
|
8
|
+
# urn:pubid:ashrae:std:15:year-2007:reaffirmed-2010
|
|
9
|
+
#
|
|
10
|
+
# The number is the core of every type (the base-anchored ones emit
|
|
11
|
+
# it as NULL when absent — the errata and the package carry their
|
|
12
|
+
# identity in the base chain). The atoms follow the doc's canonical
|
|
13
|
+
# order; the date internals stay placed until the Components::Code
|
|
14
|
+
# reduction lands (docs/URN-SCHEMES.adoc, ashrae finding).
|
|
15
|
+
PubidUrnSchema = Pubid::PubidUrn.define("ashrae") do
|
|
16
|
+
atom "copublisher", "co"
|
|
17
|
+
atom "year", "year"
|
|
18
|
+
atom "date.day", "dateday"
|
|
19
|
+
atom "date.month", "datemonth"
|
|
20
|
+
atom "date.year", "dateyear"
|
|
21
|
+
atom "addendum_code", "addendumcode"
|
|
22
|
+
atom "addendum_codes", "addendumcodes"
|
|
23
|
+
atom "package_description", "packagedescription"
|
|
24
|
+
atom "reaffirmed", "reaffirmed"
|
|
25
|
+
atom "suffix", "suffix"
|
|
26
|
+
|
|
27
|
+
type "pubid:ashrae:addenda-package", "ap"
|
|
28
|
+
type "pubid:ashrae:addendum", "add"
|
|
29
|
+
type "pubid:ashrae:combined-addenda", "ca"
|
|
30
|
+
type "pubid:ashrae:errata", "err"
|
|
31
|
+
type "pubid:ashrae:guideline", "g"
|
|
32
|
+
type "pubid:ashrae:identifier", "id"
|
|
33
|
+
type "pubid:ashrae:interpretation", "interp"
|
|
34
|
+
type "pubid:ashrae:standard", "std"
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
data/lib/pubid/ashrae.rb
CHANGED
|
@@ -18,6 +18,7 @@ module Pubid
|
|
|
18
18
|
autoload :SupplementIdentifier, "#{__dir__}/ashrae/supplement_identifier"
|
|
19
19
|
autoload :UrnGenerator, "#{__dir__}/ashrae/urn_generator"
|
|
20
20
|
autoload :UrnParser, "#{__dir__}/ashrae/urn_parser"
|
|
21
|
+
autoload :PubidUrnSchema, "#{__dir__}/ashrae/pubid_urn_schema"
|
|
21
22
|
|
|
22
23
|
def self.parse(identifier)
|
|
23
24
|
unless identifier.is_a?(String)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Asme
|
|
5
|
+
# The pubid-scheme URN of ASME (issue #656; docs/URN-SCHEMES.adoc).
|
|
6
|
+
#
|
|
7
|
+
# ASME B30.3-20XX (Revision of ASME B30.1-2020)
|
|
8
|
+
# urn:pubid:asme:std:B30.3:pub-ASME:draftyear-20XX
|
|
9
|
+
# :parentheticalrevision-...
|
|
10
|
+
#
|
|
11
|
+
# The number is the core; the atoms follow the doc's canonical order.
|
|
12
|
+
# +parenthetical_revision+ and +revision_note+ are the two verbatim
|
|
13
|
+
# bracket notes, case-kept.
|
|
14
|
+
PubidUrnSchema = Pubid::PubidUrn.define("asme") do
|
|
15
|
+
atom "publisher", "pub"
|
|
16
|
+
atom "year", "year"
|
|
17
|
+
atom "language", "lang"
|
|
18
|
+
atom "csa_number", "csanumber"
|
|
19
|
+
atom "draft_year", "draftyear"
|
|
20
|
+
atom "first_code", "firstcode"
|
|
21
|
+
atom "first_publisher", "firstpublisher"
|
|
22
|
+
atom "handbook", "handbook", kind: :bool
|
|
23
|
+
atom "joint_publisher", "jointpublisher"
|
|
24
|
+
atom "parenthetical_revision", "parentheticalrevision"
|
|
25
|
+
atom "ptc_suffix", "ptcsuffix"
|
|
26
|
+
atom "revision_note", "revisionnote"
|
|
27
|
+
atom "second_publisher", "secondpublisher"
|
|
28
|
+
|
|
29
|
+
type "pubid:asme:base", "base"
|
|
30
|
+
type "pubid:asme:identifier", "id"
|
|
31
|
+
type "pubid:asme:standard", "std"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/pubid/asme.rb
CHANGED
|
@@ -17,6 +17,7 @@ module Pubid
|
|
|
17
17
|
autoload :SingleIdentifier, "#{__dir__}/asme/single_identifier"
|
|
18
18
|
autoload :UrnGenerator, "#{__dir__}/asme/urn_generator"
|
|
19
19
|
autoload :UrnParser, "#{__dir__}/asme/urn_parser"
|
|
20
|
+
autoload :PubidUrnSchema, "#{__dir__}/asme/pubid_urn_schema"
|
|
20
21
|
|
|
21
22
|
def self.parse(str)
|
|
22
23
|
Identifier.parse(str)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Jcgm
|
|
5
|
+
# The pubid-scheme URN of JCGM (issue #656; docs/URN-SCHEMES.adoc).
|
|
6
|
+
#
|
|
7
|
+
# JCGM 100:2008/Amd 1:2026
|
|
8
|
+
# urn:pubid:jcgm:guide:100:year-2008:lang-en:amd:1:year-2026
|
|
9
|
+
#
|
|
10
|
+
# The number is the core of every type; the year, the month/day of a
|
|
11
|
+
# dated meeting or amendment and the languages are atoms, in the
|
|
12
|
+
# doc's canonical order. The original language code is a facet.
|
|
13
|
+
PubidUrnSchema = Pubid::PubidUrn.define("jcgm") do
|
|
14
|
+
atom "year", "year"
|
|
15
|
+
atom "month", "month"
|
|
16
|
+
atom "day", "day"
|
|
17
|
+
atom "languages.*.code", "lang"
|
|
18
|
+
|
|
19
|
+
facet "languages.*.original_code", "langsrc"
|
|
20
|
+
|
|
21
|
+
type "pubid:jcgm:amendment", "amd"
|
|
22
|
+
type "pubid:jcgm:corrigendum", "cor"
|
|
23
|
+
type "pubid:jcgm:guide", "guide"
|
|
24
|
+
type "pubid:jcgm:gum-guide", "gumguide"
|
|
25
|
+
type "pubid:jcgm:identifier", "id"
|
|
26
|
+
type "pubid:jcgm:meeting", "meeting"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/pubid/jcgm.rb
CHANGED
|
@@ -18,6 +18,7 @@ module Pubid
|
|
|
18
18
|
autoload :SupplementIdentifier, "#{__dir__}/jcgm/supplement_identifier"
|
|
19
19
|
autoload :UrnGenerator, "#{__dir__}/jcgm/urn_generator"
|
|
20
20
|
autoload :UrnParser, "#{__dir__}/jcgm/urn_parser"
|
|
21
|
+
autoload :PubidUrnSchema, "#{__dir__}/jcgm/pubid_urn_schema"
|
|
21
22
|
|
|
22
23
|
# Parse a JCGM identifier string
|
|
23
24
|
# @param identifier [String] the identifier string to parse
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Oiml
|
|
5
|
+
# The pubid-scheme URN of OIML (issue #656; docs/URN-SCHEMES.adoc).
|
|
6
|
+
#
|
|
7
|
+
# OIML D 2 (E) -> urn:pubid:oiml:document:2:pub-OIML:lang-E:format-...
|
|
8
|
+
#
|
|
9
|
+
# The number is the core of every type except the dual-published (no
|
|
10
|
+
# core; its two nested identifiers ride +first-/second-). The atoms
|
|
11
|
+
# follow the doc's canonical order; details in docs/URN-SCHEMES.adoc.
|
|
12
|
+
PubidUrnSchema = Pubid::PubidUrn.define("oiml") do
|
|
13
|
+
atom "publisher", "pub"
|
|
14
|
+
atom "part", "part"
|
|
15
|
+
atom "year", "year"
|
|
16
|
+
atom "edition", "ed"
|
|
17
|
+
atom "stage", "stage"
|
|
18
|
+
atom "language", "lang"
|
|
19
|
+
atom "amendment", "amendment"
|
|
20
|
+
atom "family", "family"
|
|
21
|
+
atom "iteration", "iteration"
|
|
22
|
+
atom "letter", "letter"
|
|
23
|
+
atom "trailing", "trailing", kind: :bool
|
|
24
|
+
atom "first", "first", kind: :id
|
|
25
|
+
atom "second", "second", kind: :id
|
|
26
|
+
|
|
27
|
+
facet "parsed_format", "format"
|
|
28
|
+
facet "space_separator", "sp", kind: :bool
|
|
29
|
+
|
|
30
|
+
type "pubid:oiml:amendment", "amd"
|
|
31
|
+
type "pubid:oiml:annex", "annex"
|
|
32
|
+
type "pubid:oiml:basic-publication", "bp"
|
|
33
|
+
type "pubid:oiml:bulletin", "bulletin"
|
|
34
|
+
type "pubid:oiml:certification-system", "cs"
|
|
35
|
+
type "pubid:oiml:document", "document"
|
|
36
|
+
type "pubid:oiml:dual-published", "dp", core: []
|
|
37
|
+
type "pubid:oiml:errata", "err"
|
|
38
|
+
type "pubid:oiml:expert-report", "er"
|
|
39
|
+
type "pubid:oiml:guide", "guide"
|
|
40
|
+
type "pubid:oiml:identifier", "id", core: []
|
|
41
|
+
type "pubid:oiml:recommendation", "rec"
|
|
42
|
+
type "pubid:oiml:seminar-report", "sr"
|
|
43
|
+
type "pubid:oiml:vocabulary", "v"
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
data/lib/pubid/oiml.rb
CHANGED
|
@@ -18,6 +18,7 @@ module Pubid
|
|
|
18
18
|
autoload :SupplementIdentifier, "#{__dir__}/oiml/supplement_identifier"
|
|
19
19
|
autoload :UrnGenerator, "#{__dir__}/oiml/urn_generator"
|
|
20
20
|
autoload :UrnParser, "#{__dir__}/oiml/urn_parser"
|
|
21
|
+
autoload :PubidUrnSchema, "#{__dir__}/oiml/pubid_urn_schema"
|
|
21
22
|
|
|
22
23
|
def self.parse(identifier)
|
|
23
24
|
unless identifier.is_a?(String)
|
data/lib/pubid/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -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
|
|
@@ -790,6 +793,7 @@ files:
|
|
|
790
793
|
- lib/pubid/jcgm/identifiers/gum_guide.rb
|
|
791
794
|
- lib/pubid/jcgm/identifiers/meeting.rb
|
|
792
795
|
- lib/pubid/jcgm/parser.rb
|
|
796
|
+
- lib/pubid/jcgm/pubid_urn_schema.rb
|
|
793
797
|
- lib/pubid/jcgm/renderer.rb
|
|
794
798
|
- lib/pubid/jcgm/single_identifier.rb
|
|
795
799
|
- lib/pubid/jcgm/supplement_identifier.rb
|
|
@@ -915,6 +919,7 @@ files:
|
|
|
915
919
|
- lib/pubid/oiml/identifiers/seminar_report.rb
|
|
916
920
|
- lib/pubid/oiml/identifiers/vocabulary.rb
|
|
917
921
|
- lib/pubid/oiml/parser.rb
|
|
922
|
+
- lib/pubid/oiml/pubid_urn_schema.rb
|
|
918
923
|
- lib/pubid/oiml/renderer.rb
|
|
919
924
|
- lib/pubid/oiml/single_identifier.rb
|
|
920
925
|
- lib/pubid/oiml/supplement_identifier.rb
|