relaton-gb 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: c6fad471830e1c0f9172e7edd3b06affad5aca2da674e83dbe2faa8c098e7b8b
4
- data.tar.gz: e0ac69e2e95a397c038538a4c6e1e7dd66c80d9732403ab3971329d955a63d95
3
+ metadata.gz: ae169e4b154ffb1ee821c63ad0403bff45d21167c446cc42b7fc780f49a09deb
4
+ data.tar.gz: 87241adfaa54cc6d1db8c2c388766dfcb349d4377f49dc5f85a310e0659db8f7
5
5
  SHA512:
6
- metadata.gz: 9b960cff84c679239f909ea92fc4ac36ab2c4ab40c6446f065cd4d633df492a81898865f5fafaa4d172fad3c63fe2bfa381d95c3c4378acc7deda90ac3c1440a
7
- data.tar.gz: b8b755a5d5e9d86627d56254038b57cbd7fa9656bf2d277f99e3792ef76b76046b73880efc7c25173d621e0d6cc5039630b860c12306baccf1a11b17e7dd6a84
6
+ metadata.gz: 10eb6b4fda015b64a433618bf1295ff0ef96811ae34fd8bf2218e62847e5cdcfea849e076ed38fa11a72ac3d4529dfb365d9cc17f4071acd5bbf7b27f819e76f
7
+ data.tar.gz: dba1b6d375e68cee6b74729eb61e794e6268aaf359ed03d208a666d05eb4c990ed95139376d897de946c76a8bf6a7567070082450c16cdb8df5d315a04ab6e16
@@ -31,27 +31,25 @@ module RelatonGb
31
31
 
32
32
  def initialize(**args)
33
33
  super
34
- args[:committee] && @committee = GbTechnicalCommittee.new(args[:committee])
34
+ @committee = GbTechnicalCommittee.new args[:committee] if args[:committee]
35
35
  @ccs = args[:ccs].map { |c| c.is_a?(Cnccs::Ccs) ? c : Cnccs.fetch(c) }
36
36
  @gbtype = GbStandardType.new args[:gbtype]
37
- @gbplannumber = args[:gbplannumber] || structuredidentifier&.project_number
38
- # @doctype = args[:doctype]
37
+ @gbplannumber = args[:gbplannumber] ||
38
+ structuredidentifier&.project_number
39
39
  end
40
40
 
41
- # @param builder [Nokogiri::XML::Builder]
42
- # @return [String]
43
- def to_xml(builder = nil, **opts)
44
- if builder
45
- super(builder, **opts) { |xml| render_gbxml(xml) }
46
- else
47
- Nokogiri::XML::Builder.new(encoding: "UTF-8") do |bldr|
48
- super(bldr, **opts) { |xml| render_gbxml(xml) }
49
- end.doc.root.to_xml
50
- end
41
+ # @param opts [Hash]
42
+ # @option opts [Nokogiri::XML::Builder] :builder XML builder
43
+ # @option opts [Boolean] :bibdata
44
+ # @option opts [Symbol, NilClass] :date_format (:short), :full
45
+ # @option opts [String, Symbol] :lang language
46
+ # @return [String] XML
47
+ def to_xml(**opts)
48
+ super(**opts) { |xml| render_gbxml(xml) }
51
49
  end
52
50
 
53
51
  # @return [Hash]
54
- def to_hash
52
+ def to_hash # rubocop:disable Metrics/AbcSize
55
53
  hash = super
56
54
  hash["ccs"] = single_element_array(ccs) if ccs&.any?
57
55
  hash["committee"] = committee.to_hash if committee
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonGb
4
- VERSION = "1.4.0"
4
+ VERSION = "1.5.pre"
5
5
  end
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
37
37
 
38
38
  spec.add_dependency "cnccs", "~> 0.1.1"
39
39
  spec.add_dependency "gb-agencies", "~> 0.0.1"
40
- spec.add_dependency "relaton-iso-bib", ">= 1.4.0"
40
+ spec.add_dependency "relaton-iso-bib", ">= 1.5.pre"
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-gb
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-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 1.4.0
187
+ version: 1.5.pre
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: 1.4.0
194
+ version: 1.5.pre
195
195
  description: 'RelatonGb: retrieve Chinese GB Standards for bibliographic use using
196
196
  the BibliographicItem model.'
197
197
  email:
@@ -252,9 +252,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
252
  version: 2.4.0
253
253
  required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - ">="
255
+ - - ">"
256
256
  - !ruby/object:Gem::Version
257
- version: '0'
257
+ version: 1.3.1
258
258
  requirements: []
259
259
  rubygems_version: 3.0.6
260
260
  signing_key: