pubid-cen 0.2.2 → 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/cen/identifier.rb +9 -9
- data/lib/pubid/cen/transformer.rb +2 -2
- data/lib/pubid/cen/version.rb +1 -1
- data/lib/pubid/cen.rb +1 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19fa4665373a2fc1078f3b871801c3c68923fac4b64dc5835010fa8ff3a69aa8
|
4
|
+
data.tar.gz: bf953fdc8f33f0de5ee25cfa260d843f5db03b5a258c177a394e8a74007c19ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014beec57a8b8d6d890d0f782ec6d78b50cd503375857d662471391cf7abd707ae673263c203fab94c25d8a1ea931f7faceb123b46d66e4cdbf074be600e1fea
|
7
|
+
data.tar.gz: 3ac097f4d3e2ec567b243cc6c11b2cab8e7dff91eb6a1610d73d344c22653f9b444e39e4448b0be6fc745744e4c2e37ac6f3e92dcabb4c768edc61edf88b9a13
|
data/lib/pubid/cen/identifier.rb
CHANGED
@@ -8,15 +8,15 @@ module Pubid::Cen
|
|
8
8
|
Base.parse(*args)
|
9
9
|
end
|
10
10
|
|
11
|
-
def resolve_identifier(parameters = {})
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
11
|
+
# def resolve_identifier(parameters = {})
|
12
|
+
# return @config.default_type.new(**parameters) if parameters[:type].nil?
|
13
|
+
#
|
14
|
+
# @config.types.each do |identifier_type|
|
15
|
+
# return identifier_type.new(**parameters) if identifier_type.type_match?(parameters)
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# raise Errors::ParseTypeError, "cannot parse type #{parameters[:type]}"
|
19
|
+
# end
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -28,9 +28,9 @@ module Pubid::Cen
|
|
28
28
|
def self.convert_supplement(supplement)
|
29
29
|
case supplement[:type]
|
30
30
|
when "A"
|
31
|
-
Identifier::Amendment.new(**supplement)
|
31
|
+
Identifier::Amendment.new(**supplement.dup.tap { |h| h.delete(:type) })
|
32
32
|
when "AC"
|
33
|
-
Identifier::Corrigendum.new(**supplement)
|
33
|
+
Identifier::Corrigendum.new(**supplement.dup.tap { |h| h.delete(:type) })
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
data/lib/pubid/cen/version.rb
CHANGED
data/lib/pubid/cen.rb
CHANGED
@@ -42,5 +42,6 @@ config.types = [Pubid::Cen::Identifier::Base,
|
|
42
42
|
Pubid::Cen::Identifier::HarmonizationDocument]
|
43
43
|
config.type_names = {}.freeze
|
44
44
|
config.stages = { "abbreviations" => { "Fpr" => [], "pr" => [] } }
|
45
|
+
config.prefixes = ["CEN", "EN", "CLC", "prEN", "FprEN", "CWA", "HD"]
|
45
46
|
|
46
47
|
Pubid::Cen::Identifier.set_config(config)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubid-cen
|
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:
|
11
|
+
date: 2024-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -58,42 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.12.5
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.12.5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: pubid-
|
70
|
+
name: pubid-iec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.3.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.3.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: pubid-
|
84
|
+
name: pubid-iso
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: '0.7'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: '0.7'
|
97
97
|
description: Library to generate, parse and manipulate CEN PubID.
|
98
98
|
email:
|
99
99
|
- open.source@ribose.com
|