relaton-iso-bib 1.4.0 → 1.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_iso_bib/iso_bibliographic_item.rb +11 -16
- data/lib/relaton_iso_bib/version.rb +1 -1
- data/lib/relaton_iso_bib/xml_parser.rb +1 -13
- data/relaton_iso_bib.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58423e5ad7c5cff215fc3012e90a83f4ac4aeefed297c5f37a3dd3f8afcc808c
|
4
|
+
data.tar.gz: 4e274610d1a54438a2c7338d11c8b8810db5ad04f0cb65402cbd135e7d79d041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz: '
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09df3e18a2a23625bcd273dccd2cbc4433e558615b0b377188c748083289a088a4b82a5d00ec5b3d77dd94ed136e849fa8bd3e430fb1e309db6556a8705fd3cb'
|
7
|
+
data.tar.gz: b819fc016915852535ac8cf85b064dae33c267154f811b51e982547ff2db587ffcadd6955662a2371b1eb2660edb65eef34e04ffdea09594e6f5797ca4ae987b
|
@@ -126,24 +126,15 @@ module RelatonIsoBib
|
|
126
126
|
check_doctype args[:doctype]
|
127
127
|
|
128
128
|
super_args = args.select do |k|
|
129
|
-
%i[id docnumber language script docstatus date abstract
|
130
|
-
edition version relation biblionote series medium place
|
131
|
-
link fetched docid formattedref extent accesslocation
|
132
|
-
validity doctype keyword].include? k
|
129
|
+
%i[id title docnumber language script docstatus date abstract
|
130
|
+
contributor edition version relation biblionote series medium place
|
131
|
+
copyright link fetched docid formattedref extent accesslocation
|
132
|
+
classification validity doctype keyword].include? k
|
133
133
|
end
|
134
134
|
super super_args
|
135
135
|
|
136
136
|
@type = args[:type] || "standard"
|
137
137
|
|
138
|
-
@title = args.fetch(:title, []).map do |t|
|
139
|
-
if t.is_a? Hash
|
140
|
-
# a + typed_titles(t)
|
141
|
-
RelatonBib::TypedTitleString.new t
|
142
|
-
else
|
143
|
-
t
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
138
|
if args[:editorialgroup]
|
148
139
|
@editorialgroup = if args[:editorialgroup].is_a?(Hash)
|
149
140
|
EditorialGroup.new(args[:editorialgroup])
|
@@ -158,9 +149,13 @@ module RelatonIsoBib
|
|
158
149
|
@id_attribute = true
|
159
150
|
end
|
160
151
|
|
161
|
-
# @
|
162
|
-
|
163
|
-
|
152
|
+
# @param opts [Hash]
|
153
|
+
# @option opts [Nokogiri::XML::Builder] :builder XML builder
|
154
|
+
# @option opts [Boolean] :bibdata
|
155
|
+
# @option opts [String] :lang language
|
156
|
+
# @return [String] XML
|
157
|
+
def to_xml(**opts)
|
158
|
+
super **opts do |b|
|
164
159
|
if opts[:bibdata] && (doctype || respond_to?(:committee) && committee ||
|
165
160
|
editorialgroup || ics.any? || structuredidentifier || stagename ||
|
166
161
|
block_given?)
|
@@ -41,22 +41,10 @@ module RelatonIsoBib
|
|
41
41
|
)
|
42
42
|
end
|
43
43
|
|
44
|
-
# Override RelatonBib::XMLParser.ttitle method.
|
45
|
-
# @param title [Nokogiri::XML::Element]
|
46
|
-
# @return [RelatonBib::TypedTitleString]
|
47
|
-
def ttitle(title)
|
48
|
-
return unless title
|
49
|
-
|
50
|
-
RelatonBib::TypedTitleString.new(
|
51
|
-
type: title[:type], content: title.text, language: title[:language],
|
52
|
-
script: title[:script], format: title[:format]
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
44
|
# @TODO Organization doesn't recreated
|
57
45
|
# @param ext [Nokogiri::XML::Element]
|
58
46
|
# @return [RelatonIsoBib::EditorialGroup]
|
59
|
-
def fetch_editorialgroup(ext) # rubocop:disable Metrics/CyclomaticComplexity
|
47
|
+
def fetch_editorialgroup(ext) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/AbcSize,Metrics/PerceivedComplexity
|
60
48
|
eg = ext&.at("./editorialgroup")
|
61
49
|
return unless eg
|
62
50
|
|
data/relaton_iso_bib.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iso-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.5.pre
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.5.pre
|
153
153
|
description: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
|
154
154
|
email:
|
155
155
|
- open.source@ribose.com
|
@@ -199,9 +199,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: 2.4.0
|
200
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
201
|
requirements:
|
202
|
-
- - "
|
202
|
+
- - ">"
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
204
|
+
version: 1.3.1
|
205
205
|
requirements: []
|
206
206
|
rubygems_version: 3.0.6
|
207
207
|
signing_key:
|