pubid-core 1.8.7 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pubid/core/identifier/base.rb +5 -4
- data/lib/pubid/core/renderer/base.rb +2 -2
- data/lib/pubid/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8fa90c212d201a964cf2744e9c8bcba06af62d10dfe195caa6af284189b82cd
|
4
|
+
data.tar.gz: 9d526bcae7afe9781b462aabd17fe3bbaafb1349e3b40c5f5fc6364468dce76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd9862d64043e894cd11ab5a92f5e792377dc28d1986918799e809c06070504e16f1be6fcecac05da3f366e52e2266476ff4733664ba3427a03f87b5a4ba8c4d
|
7
|
+
data.tar.gz: b0962ace109243f800c6c17ceacde35cc50f345c952dd75b9af42045d03dbf961a72cb4d42b3585f4c1a98ecc7a035795614c45c7e83ca48bd18160c11f573d6
|
@@ -59,10 +59,11 @@ module Pubid::Core
|
|
59
59
|
|
60
60
|
# @return [String] Rendered URN identifier
|
61
61
|
def urn
|
62
|
-
Renderer::Urn.new(
|
62
|
+
Renderer::Urn.new(to_h).render
|
63
63
|
end
|
64
64
|
|
65
|
-
|
65
|
+
# @return [Hash] Identifier's parameters
|
66
|
+
def to_h
|
66
67
|
instance_variables.map do |var|
|
67
68
|
# XXX: temporary hack to prepare typed_stage for rendering
|
68
69
|
# probably need to convert typed_stage to class, now we store
|
@@ -76,12 +77,12 @@ module Pubid::Core
|
|
76
77
|
end
|
77
78
|
|
78
79
|
def ==(other)
|
79
|
-
|
80
|
+
to_h == other.to_h
|
80
81
|
end
|
81
82
|
|
82
83
|
# Render identifier using default renderer
|
83
84
|
def to_s
|
84
|
-
self.class.get_renderer_class.new(
|
85
|
+
self.class.get_renderer_class.new(to_h).render
|
85
86
|
end
|
86
87
|
|
87
88
|
def typed_stage_abbrev
|
@@ -44,9 +44,9 @@ module Pubid::Core::Renderer
|
|
44
44
|
def render_supplement(supplement_params, **args)
|
45
45
|
base = if supplement_params[:base].type == :amd
|
46
46
|
# render inner amendment (cor -> amd -> base)
|
47
|
-
render_supplement(supplement_params[:base].
|
47
|
+
render_supplement(supplement_params[:base].to_h, **args)
|
48
48
|
else
|
49
|
-
self.class.new(supplement_params[:base].
|
49
|
+
self.class.new(supplement_params[:base].to_h).render_base_identifier(
|
50
50
|
# always render year for identifiers with supplement
|
51
51
|
**args.merge({ with_date: true }),
|
52
52
|
)
|
data/lib/pubid/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubid-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
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-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|