pubid-nist 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pubid/nist/identifier.rb +1 -1
- data/lib/pubid/nist/parsers/default.rb +3 -2
- data/lib/pubid/nist/parsers/{fips_pub.rb → fips.rb} +1 -1
- data/lib/pubid/nist/parsers/nist_sp.rb +10 -4
- data/lib/pubid/nist/renderer.rb +1 -1
- data/lib/pubid/nist/stage.rb +1 -1
- data/lib/pubid/nist/version.rb +1 -1
- data/series.yaml +3 -3
- data/update_codes.yaml +5 -3
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e7f47e08604ec704f0cf6468e57bf119027caf37ccba4043269374d2e9381a3
|
4
|
+
data.tar.gz: ec580488f65954d7fcbbfff5dd17e0cdc2dc88f7d07cb81d0bada5812beae2fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3c2ec778fb99af9427532d92404c60fef8a4e1f65342ab61b0925ade00849c9e151604e2bc2b3cf2d71877dbad840c017c581036e0dc22b1a307bafd06ae2f4
|
7
|
+
data.tar.gz: 787c614f6716d8cc8044821c1ff90ae1afebbe2731673adef5aef5150fa77a5e8d32d633f7367d2929620578d84ed6b6bb81e39367e422f017704d2b34cc65e0
|
@@ -73,7 +73,7 @@ module Pubid::Nist
|
|
73
73
|
|
74
74
|
# @param without_edition [Boolean] render pubid without rendering edition
|
75
75
|
def to_s(format = :short, without_edition: false)
|
76
|
-
self.class.get_renderer_class.new(
|
76
|
+
self.class.get_renderer_class.new(to_h).render(format: format, without_edition: without_edition)
|
77
77
|
end
|
78
78
|
|
79
79
|
def to_json(*args)
|
@@ -40,7 +40,8 @@ module Pubid::Nist
|
|
40
40
|
end
|
41
41
|
|
42
42
|
rule(:stage) do
|
43
|
-
(space >> (array_to_str(STAGES["id"].keys
|
43
|
+
(space >> (array_to_str(STAGES["id"].keys + STAGES["id"].keys.map(&:upcase)).as(:id) >>
|
44
|
+
array_to_str(STAGES["type"].keys + STAGES["type"].keys.map(&:upcase)).as(:type)).as(:stage))
|
44
45
|
end
|
45
46
|
|
46
47
|
rule(:draft) do
|
@@ -83,7 +84,7 @@ module Pubid::Nist
|
|
83
84
|
end
|
84
85
|
|
85
86
|
rule(:update) do
|
86
|
-
(str("/Upd") | str("/upd")) >> (digits.as(:number) >> str("-") >> digits.as(:year)).as(:update)
|
87
|
+
(str("/Upd") | str("/upd")) >> (digits.as(:number) >> (str("-") >> digits.as(:year)).maybe).as(:update)
|
87
88
|
end
|
88
89
|
|
89
90
|
rule(:translation) do
|
@@ -2,7 +2,7 @@ module Pubid::Nist
|
|
2
2
|
module Parsers
|
3
3
|
class NistSp < Default
|
4
4
|
rule(:version) do
|
5
|
-
(((str("ver") | str(" Ver. ")) >> (digits >> (str(".") >> digits).repeat).as(:version)) |
|
5
|
+
(((str("ver") | str(" Ver. ") | str(" Version ")) >> (digits >> (str(".") >> digits).repeat).as(:version)) |
|
6
6
|
(str("v") >>
|
7
7
|
(match('\d') >> str(".") >> match('\d') >> (str(".") >> match('\d')).maybe).as(:version)))
|
8
8
|
end
|
@@ -39,15 +39,21 @@ module Pubid::Nist
|
|
39
39
|
|
40
40
|
rule(:edition) do
|
41
41
|
((str("e") >> year_digits.as(:edition_year)) | (str("-") >> year_digits.as(:edition_year)) |
|
42
|
-
(str("e") >> digits.as(:edition)))
|
42
|
+
((str("e") | str(" E")) >> digits.as(:edition)))
|
43
43
|
end
|
44
44
|
|
45
45
|
rule(:revision) do
|
46
|
-
((str("rev") | str("r")) >> (digits >> match("[a-z]").maybe).as(:revision)) |
|
46
|
+
((str("rev") | str("r") | str(" Rev. ")) >> (digits >> match("[a-z]").maybe).as(:revision)) |
|
47
47
|
(str("-") >> digits.as(:revision)) |
|
48
48
|
(str("r") >> match("[a-z]").as(:revision)) |
|
49
|
-
(str("r") >> str("").as(:revision))
|
49
|
+
((str("r") | str(" Revision (r)")) >> str("").as(:revision))
|
50
50
|
end
|
51
|
+
|
52
|
+
rule(:volume) do
|
53
|
+
(str("v") | str(" Vol. ")) >> digits.as(:volume)
|
54
|
+
end
|
55
|
+
|
56
|
+
rule(:part_prefixes) { str("pt") | str("p") | str(" Part ") }
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
data/lib/pubid/nist/renderer.rb
CHANGED
data/lib/pubid/nist/stage.rb
CHANGED
data/lib/pubid/nist/version.rb
CHANGED
data/series.yaml
CHANGED
@@ -15,7 +15,7 @@ long:
|
|
15
15
|
NBS CS-E: Commercial Standards (emergency)
|
16
16
|
NBS CSM: Commercial Standards Monthly
|
17
17
|
NBS FIPS: Federal Information Processing Standards Publication
|
18
|
-
FIPS
|
18
|
+
FIPS: Federal Information Processing Standards Publication
|
19
19
|
NIST GCR: Grant/Contract Reports
|
20
20
|
NBS GCR: Grant/Contract Reports
|
21
21
|
NIST HB: Handbook
|
@@ -59,7 +59,7 @@ abbrev:
|
|
59
59
|
NIST BSS: Bldg. Sci. Ser.
|
60
60
|
NBS BSS: Bldg. Sci. Ser.
|
61
61
|
NBS FIPS: Federal Inf. Process. Stds.
|
62
|
-
FIPS
|
62
|
+
FIPS: Federal Inf. Process. Stds.
|
63
63
|
NIST HB: Handb.
|
64
64
|
NBS HB: Handb.
|
65
65
|
NIST MN: Monogr.
|
@@ -98,7 +98,7 @@ mr:
|
|
98
98
|
NBS CS-E: NBS.CS-E
|
99
99
|
NBS CSM: NBS.CSM
|
100
100
|
NBS FIPS: NBS.FIPS
|
101
|
-
FIPS
|
101
|
+
FIPS: NIST.FIPS
|
102
102
|
NIST GCR: NIST.GCR
|
103
103
|
NBS GCR: NBS.GCR
|
104
104
|
NIST HB: NIST.HB
|
data/update_codes.yaml
CHANGED
@@ -17,12 +17,14 @@ NIST LCIRC: NIST LC
|
|
17
17
|
NBS LCIRC: NBS LC
|
18
18
|
NIST SP 800-57Pt3r1: NIST SP 800-57pt3r1
|
19
19
|
NISTIR: NIST IR
|
20
|
-
NIST FIPS: FIPS
|
20
|
+
NIST FIPS: FIPS
|
21
21
|
NIST.CSWP.01162020pt: NIST.CSWP.01162020(por)
|
22
22
|
/^NBS FIPS 11-1-Sep30$/: NBS FIPS 11-1-Sep30/1977
|
23
23
|
/^NBS FIPS 89-Sep1$/: NBS FIPS 89-Sep1981
|
24
|
-
/^FIPS PUB 54-1-Jan15$/: FIPS
|
25
|
-
/^FIPS
|
24
|
+
/^FIPS PUB 54-1-Jan15$/: FIPS 54-1
|
25
|
+
/^FIPS 54-1-Jan15$/: FIPS 54-1
|
26
|
+
/^FIPS 54-1-Jan17$/: FIPS 54-1-Jan17/1991
|
27
|
+
FIPS PUB: FIPS
|
26
28
|
NBS CRPL c4-4: NBS CRPL 4-4
|
27
29
|
NIST AMS 300-8r1 (February 2021 update): NIST AMS 300-8r1/Upd1-202102
|
28
30
|
NIST AMS 300-8r1/upd: NIST AMS 300-8r1/Upd1-202102
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubid-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -128,14 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: 1.10.3
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
138
|
+
version: 1.10.3
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubyzip
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: Library to generate, parse and manipulate NIST PubID.
|
140
154
|
email:
|
141
155
|
- open.source@ribose.com
|
@@ -157,7 +171,7 @@ files:
|
|
157
171
|
- lib/pubid/nist/nist_tech_pubs.rb
|
158
172
|
- lib/pubid/nist/parser.rb
|
159
173
|
- lib/pubid/nist/parsers/default.rb
|
160
|
-
- lib/pubid/nist/parsers/
|
174
|
+
- lib/pubid/nist/parsers/fips.rb
|
161
175
|
- lib/pubid/nist/parsers/nbs_bh.rb
|
162
176
|
- lib/pubid/nist/parsers/nbs_circ.rb
|
163
177
|
- lib/pubid/nist/parsers/nbs_crpl.rb
|