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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5643471617a1871a10b52251f403444b783fcc4c3ccea5bb002d101dd1193d8
4
- data.tar.gz: d8729ecaf1bee4908050c1ce8c220185c86bdcbecfd2e71a2580751394f4823e
3
+ metadata.gz: 58423e5ad7c5cff215fc3012e90a83f4ac4aeefed297c5f37a3dd3f8afcc808c
4
+ data.tar.gz: 4e274610d1a54438a2c7338d11c8b8810db5ad04f0cb65402cbd135e7d79d041
5
5
  SHA512:
6
- metadata.gz: '088b4e7edb2ea24090e2bd53b751ee7a2505e7670b490ab45f9edabbf185f6eaa4208e8b1cfb59adc9065f8e979bf92a7df9ff63c3157f0387a4f1a12155bc8f'
7
- data.tar.gz: bdb6797ab989763eefaafb6d84b3c4d6f88fc93c3f0010aa044287fe23b2a5b6f867ae284c71e4c9913b164af5d1e25c46d1f3adb441a3f99af48318a68c7b01
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 contributor
130
- edition version relation biblionote series medium place copyright
131
- link fetched docid formattedref extent accesslocation classification
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
- # @return [String]
162
- def to_xml(builder = nil, **opts)
163
- super builder, **opts do |b|
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?)
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "1.5.pre".freeze
3
3
  end
@@ -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
 
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "simplecov"
37
37
 
38
38
  spec.add_dependency "isoics", "~> 0.1.6"
39
- spec.add_dependency "relaton-bib", "~> 1.4.0"
39
+ spec.add_dependency "relaton-bib", "~> 1.5.pre"
40
40
  end
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.0
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-09-18 00:00:00.000000000 Z
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.4.0
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.4.0
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: '0'
204
+ version: 1.3.1
205
205
  requirements: []
206
206
  rubygems_version: 3.0.6
207
207
  signing_key: