pubid-nist 0.4.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1a579d52c77ed138efc4352a7a1f52a9be517819ef79d816228bb7e5904495b
4
- data.tar.gz: 5e1203bd61307d98fa6afe777023c844f95f5155fe3bd06b20d5fd211114421c
3
+ metadata.gz: 54eb81720e3305f3c6aa21d7880c917e5d2ef117c1889418ae53746120673bd3
4
+ data.tar.gz: a5d8687b1c2bd2f63c106ab748a52977d8caebd9d15f3c731614ada36fe29b28
5
5
  SHA512:
6
- metadata.gz: 36c798beadee2c359302da93d7372e61008601993dd578b358bec059c91bd469b4e19223ecf31b511077eae1b9b2f5b5b947400c34a23e7c2a4c5abccd8118d3
7
- data.tar.gz: b1451a7d681a2f7a2a345c390c731c031074f1a211136c13bc06eac34cd278bdf8e752cf64b35f391b8cfd0793fb0c5ee953515696fb81dd5ee982f554f5a871
6
+ metadata.gz: 8d05d2b99428e9577033044179a33bd72108cb1f501cd3351b08320cf5aa786a0add46c30dde80fc0033b7ba0864c99a8a5f8db79dcd427d44d335279577143f
7
+ data.tar.gz: 1ea611d2f8a8530f1bf408bda1d0a624f50ac124e9aca1657a3de0a057f71db8591851f2ae21a347e10f14388218d1b455406c46da3d402471cb2ccc5aa18c02
@@ -73,7 +73,8 @@ module Pubid::Nist
73
73
  end
74
74
 
75
75
  def self.update_old_code(code)
76
- UPDATE_CODES.each do |from, to|
76
+ UPDATE_CODES.map {|k ,v| k.match?(/^\/.*\/$/) ? [[k, v], [k.gsub(" ", "\."), v]] : [[k, v], [k.gsub(" ", "."), v]] }
77
+ .inject([]) { |a, v| a + v}.each do |from, to|
77
78
  code = code.gsub(from.match?(/^\/.*\/$/) ? Regexp.new(from[1..-2]) : from, to)
78
79
  end
79
80
  code
@@ -84,7 +84,7 @@ module Pubid::Nist
84
84
  end
85
85
 
86
86
  rule(:update) do
87
- (str("/Upd") | str("/upd")) >> (digits.as(:number) >> (str("-") >> digits.as(:year)).maybe).as(:update)
87
+ (str("/Upd") | str("/upd") | str("-upd")) >> (digits.as(:number) >> (str("-") >> digits.as(:year)).maybe).as(:update)
88
88
  end
89
89
 
90
90
  rule(:translation) do
@@ -0,0 +1,7 @@
1
+ module Pubid::Nist
2
+ module Parsers
3
+ class Mono < Default
4
+ rule(:number_suffix) { match("[a-zA-Z]") }
5
+ end
6
+ end
7
+ end
@@ -14,9 +14,9 @@ module Pubid::Nist
14
14
  "%{supplement}%{section}%{appendix}%{errata}%{index}%{insert}%{update}"\
15
15
  "%{stage}%{translation}" % params
16
16
  else
17
- "%{series}%{code}%{stage}%{volume}%{part}%{edition}%{revision}%{version}"\
17
+ "%{series}%{code}%{stage}%{volume}%{part}%{revision}%{version}"\
18
18
  "%{supplement}%{section}%{appendix}%{errata}%{index}%{insert}%{update}"\
19
- "%{translation}" % params
19
+ "%{edition}%{translation}" % params
20
20
  end
21
21
  end
22
22
 
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Nist
3
- VERSION = "0.4.0".freeze
3
+ VERSION = "0.4.2".freeze
4
4
  end
5
5
  end
data/series.yaml CHANGED
@@ -46,6 +46,8 @@ long:
46
46
  CSRC Building Block: Cybersecurity Resource Center Building Block
47
47
  JPCRD: Journal of Physical and Chemical Reference Data
48
48
  JRES: Journal of Research of NIST
49
+ VTS: Voting Technology Series
50
+ AI: NIST Trustworthy and Responsible AI
49
51
  abbrev:
50
52
  AMS: Adv. Man. Ser
51
53
  BSS: Bldg. Sci. Ser.
@@ -115,3 +117,5 @@ mr:
115
117
  CSRC Building Block: NIST.CSBB
116
118
  JPCRD: JPCRD
117
119
  JRES: NIST.JRES
120
+ VTS: VTS
121
+ AI: AI
data/stages.yaml CHANGED
@@ -1,6 +1,6 @@
1
1
  id:
2
2
  i: Initial
3
- F: Final
3
+ f: Final
4
4
  "1": Initial
5
5
  "2": Second
6
6
  "3": Third
data/update_codes.yaml CHANGED
@@ -68,22 +68,20 @@ NIST SP 800-63v1 0 2: NIST SP 800-63v1.0.2
68
68
  NIST SP 955 Suppl: NIST SP 955sup
69
69
  NIST SP 984 4: NIST SP 984-4
70
70
  NISTPUB 0413171251: NIST TN 1648-2009
71
- NIST IR 8286C-draft: NIST IR 8286C (Draft)
72
- NIST SP 800-140Cr1-draft2: NIST SP 800-140Cr1 2pd
73
- NIST SP 800-140Dr1-draft2: NIST SP 800-140Dr1 2pd
74
- NIST SP 800-219-draft: NIST SP 800-219 (Draft)
75
- NIST IR 8270-draft2: NIST IR 8270 2pd
71
+ /\-draft$/: " (Draft)"
72
+ /\-draft2$/: " 2pd"
76
73
  NIST HB 135e2022-upd1: NIST HB 135e2022/Upd1-202205
77
74
  NIST SP 1900-206-upd1: NIST SP 1900-206/Upd1-202202
78
75
  NIST TN 2207-upd1: NIST TN 2207/Upd1-202205
79
76
  NIST IR 8290-upd1: NIST IR 8290/Upd1-202205
80
77
  NIST IR 8413-upd1: NIST IR 8413/Upd1-202207
81
78
  NIST IR 85-3273-37-upd1: NIST IR 85-3273-37/Upd1-202205
82
- NIST IR 8352-draft: NIST IR 8352 (Draft)
83
- NIST SP 1273-draft: NIST SP 1273 (Draft)
84
- NIST IR 8323-draft: NIST IR 8323 (Draft)
85
79
  /NBS CRPL-F-B(?=\d+)/: "NBS CRPL-F-B "
86
80
  /NBS[.\s]CS[.\s]e/: "NBS CS-E "
81
+ "NIST.AMS.300-8r1/upd": NIST.AMS.300-8r1-upd1
82
+ NIST.hb.150-1-2017: NIST HB 105-1r2017
83
+ nbs.tn.671: NBS TN 671
84
+ NIST.TN.1648_2009: NIST TN 1648-2009
87
85
  NBS NSRDS: NSRDS-NBS
88
86
  nist ir: NIST IR
89
87
  /(?<=\d)es/: (spa)
@@ -92,3 +90,4 @@ nist ir: NIST IR
92
90
  /(?<=\d)port/: (por)
93
91
  /(?<=\d)(pt)(?!\d)/: (por)
94
92
  /(?<=\d)id/: (ind)
93
+ /\-upd$/: "-upd1"
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.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-28 00:00:00.000000000 Z
11
+ date: 2024-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -179,6 +179,7 @@ files:
179
179
  - lib/pubid/nist/parsers/fips.rb
180
180
  - lib/pubid/nist/parsers/gcr.rb
181
181
  - lib/pubid/nist/parsers/hb.rb
182
+ - lib/pubid/nist/parsers/mono.rb
182
183
  - lib/pubid/nist/parsers/mp.rb
183
184
  - lib/pubid/nist/parsers/nbs_ir.rb
184
185
  - lib/pubid/nist/parsers/nbs_lc.rb
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
220
  - !ruby/object:Gem::Version
220
221
  version: '0'
221
222
  requirements: []
222
- rubygems_version: 3.3.26
223
+ rubygems_version: 3.3.27
223
224
  signing_key:
224
225
  specification_version: 4
225
226
  summary: Library to generate, parse and manipulate NIST PubID.