pubid 0.1.0 → 0.1.1

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: cd779f3a277fdc04a542443c5c636061fb2b112eca6799681f3b256c535800d7
4
- data.tar.gz: feba7c57f219a063c29f7322a2d3a946c1b734b81876d5c1cf89136e0a00fdc3
3
+ metadata.gz: f4593d133b8317644f3550f821ed29640ab1fc5ec241c0c1b8a5db119ea1b9c6
4
+ data.tar.gz: b1ce4684350169c833c8825aa84a3966b51c90585efe7636678402f0d52580af
5
5
  SHA512:
6
- metadata.gz: 8a757e63f5d98c06d453cf1369a2a85e507482e9036e17fde6c6092aa555c59b25fc2343e20c97d223765fb159a542c250a2291ae79f2489810b5660ccdb917f
7
- data.tar.gz: debfe72e6c57c45da4a1a296b905328a7a61f1fedda71d310f26719341b19bed85335f56118faeae4b5985ca481e2de1581ab0a1be327a04720216273e5bfbc7
6
+ metadata.gz: df2d32af3143b32af3d6d5f992ed0c01ca3e3ecc60ab0e5fa55884f81f0dff678f42a0f6fa1ffe0cf8b3dbe755748c7ca32f72bdd4ba1c43c19b8d26b130fa9a
7
+ data.tar.gz: 80ed5a22574564137f015f06479f4d7b7c345b571b3656bf8d51adc797858f89963bda4162248e4eb6ec51dcffaa98bc4356f0e7bbbbd383790d3b7724c5d04d
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 2-Clause License
2
2
 
3
- Copyright (c) 2022, Ribose
3
+ Copyright (c) 2018, Ribose
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
data/README.adoc CHANGED
@@ -1,127 +1,8 @@
1
- = IEEE publication identifiers ("IEEE PubID")
1
+ = PubID
2
2
 
3
- == Purpose
4
-
5
- Implements a mechanism to parse and utilize IEEE publication identifers.
6
-
7
- == Historic identifier patterns
8
-
9
- There are at least two major "pattern series" of identifiers due to historical reasons: old (type I) and new (type II).
10
- This implementation attempts to support both types of publication identifier patterns.
11
-
12
- == Use cases to support
13
-
14
- * analyze a pattern of type I idetifier
15
- * parse type II idetifier into components
16
- * generate a filename from the components similar to type I pattern
17
-
18
- == Elements of the PubID
19
-
20
- === Publisher
21
-
22
- |===
23
- | Name | Abbrev
24
-
25
- | Institute of Electrical and Electronics Engineers
26
- | IEEE
27
-
28
- |===
29
-
30
- === Report number
31
-
32
- `{number}` - is a set of one or more digits and optional letters
33
-
34
- === Part
35
-
36
- `{part}` - is a set of digits and optional letters; starts with a digit; if a letter or letters are present then they are in the end; optional
37
-
38
- === Subpart
39
-
40
- `{subpart}` - is a set of digits and optional letters; optional, many subparts are possible
3
+ image:https://badge.fury.io/rb/pubid.svg["Gem Version", link="https://badge.fury.io/rb/pubid"]
41
4
 
42
- === Year
43
-
44
- `{year}` - is a set of 4 digits; optional
45
-
46
- === Corrigendum & Amendment
47
-
48
- `{cor}` - is a corrigendum or an amendments with the pattern `Cor {cornum}-{year}` or `Amd {cornum}:{year}` where {cornum} is a set of digits; optional
49
-
50
- == Type I pattern
51
-
52
- [source]
53
- ----
54
- {publisher} {type} {series} {number}{part}.{subpart}{year} {edition}/{conform}/{correction}
55
- ----
56
-
57
- * `{publisher}` IEEE
58
- * `{type}` one of the values: `Standard`, `Std`, `Draft`, `Draft Standard`, `Draft Supplement` ^*^
59
- * `{series}` one of the values: `ISO/IEC`, `ISO/IEC/IEEE` ^*^
60
- * `{number}` set of digits optionally prefixed with uppercase letter and optionally suffixed with letter
61
- * `{part}` from 1 to 2 digits prefixed with `.` or `-` and optionally suffixed with up to 4 letters ^*^
62
- * `{subpart}` 1 digit optionally suffixed with a letter ^*^
63
- * `{year}` 4 digits prefixed with `-`, `:`, ` - `, or breakspace ^*^
64
- * `{edition}` prefix `Edition` followed by a reference in brackets or prefix `First edition` followed by date in format `YYYY-MM-DD` ^*^
65
- * `{conform}` prefix `Conformance` followed by 2 digits, dash, and 4 digits year ^*^
66
- * `{correction}` prefix `Cor` optionally followed by breakspace, or prefix `Amd` followed by `.`, followed by from 1 to 2 digits, dash and 4 digits year ^*^
67
-
68
- (*) - optional
69
-
70
- An identifier can be composed of 2 other identifiers with breakspace delimiter. Only the first identifier needs to cnatain puplisher, for the secont it's optional
71
-
72
- Following RegEx expression parses 100% of identifiers from the type I https://xml2rfc.tools.ietf.org/public/rfc/bibxml-ieee/[dataset]:
73
- [source,regex]
74
-
75
- ----
76
- {
77
- ^IEEE\s
78
- ((?<type1>Standard|Std|Draft(\sStandard|\sSupplement)?)\s)?
79
- ((?<series>ISO\/IEC(\/IEEE)?)\s)?
80
- (?<number1>[A-Z]?\d+[[:alpha:]]?)
81
- ([.-](?<part1>\d{1,2}(?!\d)[[:alpha:]]{0,4}))?
82
- (\.(?<subpart1>\d[[:alpha:]]?))?
83
- (?<year1>([-:]|\s-\s|,\s)\d{4})?
84
- (\s(IEEE\s(?<type2>Std)\s)?(?<number2>[A-Z]?\d+[[:alpha:]]?)
85
- ([.-](?<part2>\d{1,2}(?!\d)[[:alpha:]]{0,4}))?
86
- ([.](?<subpart2>\d[[:alpha:]]?))?
87
- (?<year2>([-:.]|_-|\s-\s|,\s)\d{4})?)?
88
- (\s(?<edition>Edition(\s\([^)]+\))?|First\sedition\s[\d-]+))?
89
- (\/(?<conform>Conformance\d{2})-(?<confyear>\d{4}))?
90
- (\/(?<correction>(Cor\s?|(Amd\.)\d{1,2})
91
- (?<coryear>(:|-|:-)\d{4}))?$
92
- }x
93
- ----
94
-
95
- == Pasing PubID elements from type II identifiers
96
-
97
- To parse PubID elements from the type II pattern identifiers we can use a RegEx expression:
98
-
99
- [source,regex]
100
- ----
101
- {
102
- ^IEEE\s(?<number1>\w+(\.[A-Z]\d|\sHBK)?)
103
- (?<part1>(\.|\s)\d{1,4}[[:alpha:],]{0,7}|-\d?[A-Z]+|-\d(?=[-.]))?
104
- (?<subpart11>\.\d{1,3}[a-z]?|-\d{5}[a-z]?|-\d+(?=[-:_]))?
105
- (?<subpart12>\.\d|-\d+(?=-))?
106
- (?<year1>([-:.]|_-|\s-)\d{4})?
107
- (\/(?<number2>([A-Z]?\d+[a-z]?|Conformance\d+))
108
- ((\.|-)(?<part2>\d{1,3}[a-z]?)(?!\d))?
109
- (\.(?<subpart21>\d{1,2}))?)?
110
- (\/(?<number3>\d+)(\.(?<part3>\d))?)?
111
- (?<year2>([-:.]|_-|\s-)\d{4})?
112
- ((\/|_|-|\s\/)(?<correction>(Cor|(?i)Amd(?-i))(\s|\.|\.\s)?\d{1,2})
113
- (?<coryear>(:|-|:-|_[A-Z][a-z]{2}_)\d{4}(-\d{4})?)?)?$
114
- }x
115
- ----
116
-
117
- This RegEx expession covers 99% of the identifiers from the type II bibxml-ieee https://xml2rfc.tools.ietf.org/public/rfc/bibxml-ieee-new/[dataset].
118
-
119
- == File name generator
120
-
121
- For type I identifiers file names are generated by replacing symbols `/`, `\`, `,`, `'`, `"`, `(`, `)`, and breakspace with symbol `_`. Sequences of multiple sybols `_` should be squized to one symbol.
5
+ == Purpose
122
6
 
123
- For type II identifiers it needs to parse PubID elements than join the elements in order:
7
+ This gem include all pubid-* gems for compatibility testing.
124
8
 
125
- ----
126
- IEEE.{number1}_{part1}.{subpart11}.{subpart12}-{year1}_{number2}_{part2}.{subpart21}_{number3}_{part3}-{year2}_{correction}-{coryear}
127
- ----
data/lib/pubid/version.rb CHANGED
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Pubid
4
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1".freeze
5
3
  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: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-17 00:00:00.000000000 Z
11
+ date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -38,7 +38,147 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
- description: Library to generate, parse and manipulate PubIDs.
41
+ - !ruby/object:Gem::Dependency
42
+ name: pubid-core
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.12.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.12.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: pubid-nist
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.2.6
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.2.6
69
+ - !ruby/object:Gem::Dependency
70
+ name: pubid-iso
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.7.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.7.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: pubid-ieee
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.2.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.2.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: pubid-cen
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.2.3
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.2.3
111
+ - !ruby/object:Gem::Dependency
112
+ name: pubid-iec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.3.1
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.3.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: pubid-ccsds
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.1.3
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.1.3
139
+ - !ruby/object:Gem::Dependency
140
+ name: pubid-itu
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.1.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.1.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: pubid-jis
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 0.3.2
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 0.3.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: pubid-bsi
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.3.2
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 0.3.2
181
+ description: Gem including all pubid-* gems.
42
182
  email:
43
183
  - open.source@ribose.com
44
184
  executables: []
@@ -49,13 +189,12 @@ extra_rdoc_files:
49
189
  files:
50
190
  - LICENSE.txt
51
191
  - README.adoc
52
- - lib/pubid.rb
53
192
  - lib/pubid/version.rb
54
- homepage: https://github.com/metanorma/pubid-ieee
193
+ homepage: https://github.com/metanorma/pubid
55
194
  licenses:
56
195
  - BSD-2-Clause
57
196
  metadata: {}
58
- post_install_message:
197
+ post_install_message:
59
198
  rdoc_options: []
60
199
  require_paths:
61
200
  - lib
@@ -70,8 +209,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
209
  - !ruby/object:Gem::Version
71
210
  version: '0'
72
211
  requirements: []
73
- rubygems_version: 3.3.3
74
- signing_key:
212
+ rubygems_version: 3.3.26
213
+ signing_key:
75
214
  specification_version: 4
76
- summary: Library to generate, parse and manipulate PubIDs.
215
+ summary: Gem including all pubid-* gems.
77
216
  test_files: []
data/lib/pubid.rb DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "pubid/version"
4
-
5
- module Pubid
6
- class Error < StandardError; end
7
- # Your code goes here...
8
- end