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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f37cc8f76f0f0534a96c767beaa339d440c9562d30659f55b3cb32ec36ed66c7
4
- data.tar.gz: '0530784b9b2e0f4c12ff2c4f03ddfaeddef8c03543f0e9b8450c290b17bedfbf'
3
+ metadata.gz: 19fa4665373a2fc1078f3b871801c3c68923fac4b64dc5835010fa8ff3a69aa8
4
+ data.tar.gz: bf953fdc8f33f0de5ee25cfa260d843f5db03b5a258c177a394e8a74007c19ba
5
5
  SHA512:
6
- metadata.gz: 3e85cfe6e8e16436dab898b50efb3b1cb8c48537a05a931dac9dd1eab7ad0fe437959e4a344f0dd9b1d30dee4cc337fc70650c02e4f0039c2bfdae8a63f1e134
7
- data.tar.gz: 3c946c0dd3e0e5c5082b2579cd24a00ec1394b873ac7d3cea5aa77f102cfc01ab6d8ea5ff4ca1534863778695098885db087240a22dc5a519f4a8801ae49deb5
6
+ metadata.gz: 014beec57a8b8d6d890d0f782ec6d78b50cd503375857d662471391cf7abd707ae673263c203fab94c25d8a1ea931f7faceb123b46d66e4cdbf074be600e1fea
7
+ data.tar.gz: 3ac097f4d3e2ec567b243cc6c11b2cab8e7dff91eb6a1610d73d344c22653f9b444e39e4448b0be6fc745744e4c2e37ac6f3e92dcabb4c768edc61edf88b9a13
@@ -8,15 +8,15 @@ module Pubid::Cen
8
8
  Base.parse(*args)
9
9
  end
10
10
 
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
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
 
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Cen
3
- VERSION = "0.2.2".freeze
3
+ VERSION = "0.2.4".freeze
4
4
  end
5
5
  end
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.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-08-06 00:00:00.000000000 Z
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.8.6
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.8.6
68
+ version: 1.12.5
69
69
  - !ruby/object:Gem::Dependency
70
- name: pubid-iso
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.6.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.6.0
82
+ version: 0.3.1
83
83
  - !ruby/object:Gem::Dependency
84
- name: pubid-iec
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.2.2
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.2.2
96
+ version: '0.7'
97
97
  description: Library to generate, parse and manipulate CEN PubID.
98
98
  email:
99
99
  - open.source@ribose.com