pubid-jis 0.1.1 → 0.2.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/jis/identifier/base.rb +10 -2
- data/lib/pubid/jis/renderer/base.rb +6 -2
- data/lib/pubid/jis/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: 9c0c791095c83e4b8722ee5231a32aaa67ef83bc79c7819010bc7b3b39896b86
|
4
|
+
data.tar.gz: 73e325a24c1e57418037c4d14b793029c6203122325a0af3baf9de358e59d86c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072776bc60700e55cf0ba6c34f8be8aabb368d93f388e78ca676a7483cc093c051178336370eb301a26797a8d74d9f8f2f026e3c92bc543abf34e2cd9b175b80
|
7
|
+
data.tar.gz: bbcf78001e99c6043dbcf41efc7c0df69612c6f449e75864a2da9de1d7fd7d1d459717c1b79c4917cd9812bfd6e68496f5fbb5bed54f13fb52b3a925b75e1a6c
|
@@ -25,13 +25,21 @@ module Pubid::Jis
|
|
25
25
|
|
26
26
|
def ==(other)
|
27
27
|
if all_parts? || other.all_parts?
|
28
|
-
return get_params.reject { |k, _| [:part, :all_parts].include?(k) } ==
|
29
|
-
other.get_params.reject { |k, _| [:part, :all_parts].include?(k) }
|
28
|
+
return get_params.reject { |k, _| [:year, :part, :all_parts].include?(k) } ==
|
29
|
+
other.get_params.reject { |k, _| [:year, :part, :all_parts].include?(k) }
|
30
30
|
end
|
31
31
|
|
32
32
|
super
|
33
33
|
end
|
34
34
|
|
35
|
+
# @param with_publisher [Boolean] add publisher to output
|
36
|
+
def to_s(with_publisher: true)
|
37
|
+
options = {}
|
38
|
+
options[:with_publisher] = with_publisher
|
39
|
+
|
40
|
+
self.class.get_renderer_class.new(get_params).render(**options)
|
41
|
+
end
|
42
|
+
|
35
43
|
class << self
|
36
44
|
def transform_supplements(supplements_params, base_params)
|
37
45
|
supplements = supplements_params.map do |supplement|
|
@@ -6,8 +6,12 @@ module Pubid::Jis::Renderer
|
|
6
6
|
"%{publisher}%{series} %{number}%{part}%{year}%{all_parts}" % params
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
10
|
-
|
9
|
+
def render_publisher(publisher, opts, params)
|
10
|
+
super if opts[:with_publisher]
|
11
|
+
end
|
12
|
+
|
13
|
+
def render_series(series, opts, _params)
|
14
|
+
opts[:with_publisher] ? " #{series}" : series
|
11
15
|
end
|
12
16
|
|
13
17
|
def render_part(part, opts, _params)
|
data/lib/pubid/jis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubid-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.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-04-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|