relaton-bsi 1.7.pre2 → 1.8.0

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: 2a9dbb231aa5bee1c2d0c60082ef8319396a94cc65d384bb87b3857e510b889d
4
- data.tar.gz: 8a9345054007adae6447d0aaa84f7f8cf6c29a56324e90a47d9df1da556dafad
3
+ metadata.gz: 37b7929e7a0e06eb5d4e918cbfc785c1dc9065722350fc23a3f6eb5ba75d05cc
4
+ data.tar.gz: 1bf8128337da1719d5f5f1f0ee59a4c627a13d9dcba92e73b0a262de6f48b6bd
5
5
  SHA512:
6
- metadata.gz: 49f0fa4a0b8d3f01cae7cf5d858717ff03f97466bc60834f56ad3b83cbbb4902482cd1870c6e83d6a016963baf99ada7af686bdc0cf20bc18202014a70e20564
7
- data.tar.gz: 7b1f98862ee97a3579fab341279d6fc9bb3d4f2d5225cdda982a3f99f4ed011dcaa3cf0c790d40ac15c5cd3bed6918fc649e6ba79ef4da8b6ec2b06f021ac5e7
6
+ metadata.gz: c73b382bc0c27c31c67875407abe6a5f4d65adb5f5d6760401175752c590d5001b98813925a6a33bb428bfe92181f94e2adc94ca9514b197330b1bccf8155f1f
7
+ data.tar.gz: 7910fc3a7a0a9dac02c662c1fdb6e66695dbdafa6c57e502538cd8588f78814ad94c947d2349042b7088671c0f17c59581b1fe0edf03bf4410f8a5b8d15be1d7
data/lib/relaton_bsi.rb CHANGED
@@ -4,7 +4,7 @@ require_relative "relaton_bsi/version"
4
4
  require "relaton_bsi/bsi_bibliography"
5
5
 
6
6
  module RelatonBsi
7
- # Returns hash of XML reammar
7
+ # Returns hash of XML greammar
8
8
  # @return [String]
9
9
  def self.grammar_hash
10
10
  gem_path = File.expand_path "..", __dir__
@@ -27,11 +27,20 @@ module RelatonBsi
27
27
  # @option opts [Boolean] :bibdata
28
28
  # @option opts [String] :lang language
29
29
  # @return [String] XML
30
- def to_xml(**opts)
30
+ def to_xml(**opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
31
31
  super **opts do |b|
32
- if opts[:bibdata]
33
- b.send "price-code", price_code if price_code
34
- b.send "cen-processing", cen_processing unless cen_processing.nil?
32
+ if opts[:bibdata] && (has_ext_attrs? || price_code ||
33
+ !cen_processing.nil?)
34
+ b.ext do
35
+ b.doctype doctype if doctype
36
+ b.horizontal horizontal unless horizontal.nil?
37
+ editorialgroup&.to_xml b
38
+ ics.each { |i| i.to_xml b }
39
+ structuredidentifier&.to_xml b
40
+ b.stagename stagename if stagename
41
+ b.send "price-code", price_code if price_code
42
+ b.send "cen-processing", cen_processing unless cen_processing.nil?
43
+ end
35
44
  end
36
45
  end
37
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonBsi
4
- VERSION = "1.7.pre2"
4
+ VERSION = "1.8.0"
5
5
  end
data/relaton_bsi.gemspec CHANGED
@@ -44,6 +44,6 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency "vcr", "~> 5.0.0"
45
45
  spec.add_development_dependency "webmock"
46
46
 
47
- spec.add_dependency "mechanize"
48
- spec.add_dependency "relaton-iso-bib", "~> 1.7.0"
47
+ spec.add_dependency "mechanize", "~> 2.7.0"
48
+ spec.add_dependency "relaton-iso-bib", "~> 1.8.0"
49
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bsi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.pre2
4
+ version: 1.8.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: 2021-04-26 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -98,30 +98,30 @@ dependencies:
98
98
  name: mechanize
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 2.7.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 2.7.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: relaton-iso-bib
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.7.0
117
+ version: 1.8.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.7.0
124
+ version: 1.8.0
125
125
  description: 'RelatonBsi: retrieve BSI Standards for bibliographic use using the BibliographicItem
126
126
  model'
127
127
  email:
@@ -175,11 +175,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
175
175
  version: 2.4.0
176
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">"
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: 1.3.1
180
+ version: '0'
181
181
  requirements: []
182
- rubygems_version: 3.0.6
182
+ rubygems_version: 3.2.3
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: 'RelatonBsi: retrieve BSI Standards for bibliographic use using the BibliographicItem