relaton-ogc 1.9.0 → 1.9.1

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: 3e0c167aee5738996ba54d4e53e9b528db53d837b519b6784b5fba212674ec70
4
- data.tar.gz: a9c45d212c851a64c8bc195ad9d7d98f58a62284a9a57d05ce701589474bef81
3
+ metadata.gz: 7fa7cf7cb4a2e7b21cb49a4fbb482f08119776626d18b6ab186080905783d516
4
+ data.tar.gz: d4bb20a2c3f35b1c25ac99882c5a3f7a405a420cc5d3dbcb2f6359b0f2f6166f
5
5
  SHA512:
6
- metadata.gz: c6c41f000b72a4ae126a7a2df77cf2d216c90f9378a9569b7a1b7e77c9970ae65b2c9b45fe54e32b4acf3695c66691b89a93a88bfd2a658b5b22407b79f58d97
7
- data.tar.gz: 643cd929a4c34d44676777005c04aa44e1034491f138e54300f53e710153cb26f28cd59da58d5d3b62c435164906e09ffe0bdd730e4e91d425fec9b738d509a3
6
+ metadata.gz: d5679900661ae943e2e929500314cfbb98fe416ebe8c809fccd0daa6f5d2c6232d9c85844d406372ab41af3c413de914944fd7b0433e24c7582a80942fe7d710
7
+ data.tar.gz: c187307b81cc069bc652f38e494ed01de8dfe96de9c00b7fc4c719f73dcff62335cc3d4167a4d32b1b402d31ac9df7e76fe5a77e6e2295cf4c6f1937c6b1f4a5
data/bin/rspec ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
@@ -12,7 +12,7 @@ module RelatonOgc
12
12
  committee: eg[:committee],
13
13
  subcommittee: eg[:subcommittee],
14
14
  workgroup: eg[:workgroup],
15
- secretariat: eg[:secretariat]
15
+ secretariat: eg[:secretariat],
16
16
  )
17
17
  end
18
18
  end
@@ -14,17 +14,13 @@ module RelatonOgc
14
14
  profile profile-with-extension general
15
15
  ].freeze
16
16
 
17
- # @return [String]
18
- attr_reader :docsubtype
19
-
20
- # @param docsubtype [String]
21
17
  def initialize(**args)
22
- if args[:docsubtype] && !SUBTYPES.include?(args[:docsubtype])
18
+ if args[:subdoctype] && !SUBTYPES.include?(args[:subdoctype])
23
19
  warn "[relaton-ogc] WARNING: invalid document "\
24
- "subtype: #{args[:docsubtype]}"
20
+ "subtype: #{args[:subdoctype]}"
25
21
  end
26
22
 
27
- @docsubtype = args.delete :docsubtype
23
+ # @docsubtype = args.delete :docsubtype
28
24
  # @doctype = args.delete :doctype
29
25
  super
30
26
  end
@@ -33,15 +29,15 @@ module RelatonOgc
33
29
  # @return [RelatonOgc::OgcBibliographicItem]
34
30
  def self.from_hash(hash)
35
31
  item_hash = ::RelatonOgc::HashConverter.hash_to_bib(hash)
36
- new **item_hash
32
+ new(**item_hash)
37
33
  end
38
34
 
39
35
  # @return [Hash]
40
- def to_hash
41
- hash = super
42
- hash["docsubtype"] = docsubtype if docsubtype
43
- hash
44
- end
36
+ # def to_hash
37
+ # hash = super
38
+ # hash["docsubtype"] = docsubtype if docsubtype
39
+ # hash
40
+ # end
45
41
 
46
42
  # @param opts [Hash]
47
43
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
@@ -50,10 +46,10 @@ module RelatonOgc
50
46
  # @option opts [String, Symbol] :lang language
51
47
  # @return [String] XML
52
48
  def to_xml(**opts)
53
- super **opts do |b|
49
+ super(**opts) do |b|
54
50
  b.ext do
55
51
  b.doctype doctype if doctype
56
- b.docsubtype docsubtype if docsubtype
52
+ b.subdoctype subdoctype if subdoctype
57
53
  editorialgroup&.to_xml b
58
54
  ics.each { |i| i.to_xml b }
59
55
  end
@@ -62,11 +58,11 @@ module RelatonOgc
62
58
 
63
59
  # @param prefix [String]
64
60
  # @return [String]
65
- def to_asciibib(prefix = "")
66
- pref = prefix.empty? ? prefix : prefix + "."
67
- out = super
68
- out += "#{pref}docsubtype:: #{docsubtype}\n" if docsubtype
69
- out
70
- end
61
+ # def to_asciibib(prefix = "")
62
+ # pref = prefix.empty? ? prefix : prefix + "."
63
+ # out = super
64
+ # out += "#{pref}docsubtype:: #{docsubtype}\n" if docsubtype
65
+ # out
66
+ # end
71
67
  end
72
68
  end
@@ -43,7 +43,7 @@ module RelatonOgc
43
43
  docid: fetch_docid(hit["identifier"]),
44
44
  link: fetch_link(hit["URL"]),
45
45
  doctype: type[:type],
46
- docsubtype: type[:subtype],
46
+ subdoctype: type[:subtype],
47
47
  docstatus: fetch_status(type[:stage]),
48
48
  edition: fetch_edition(hit["identifier"]),
49
49
  abstract: fetch_abstract(hit["description"]),
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.9.0".freeze
2
+ VERSION = "1.9.1".freeze
3
3
  end
@@ -15,14 +15,14 @@ module RelatonOgc
15
15
  # Override RelatonIsoBib::XMLParser.item_data method.
16
16
  # @param item [Nokogiri::XML::Element]
17
17
  # @returtn [Hash]
18
- def item_data(item)
19
- data = super
20
- ext = item.at "./ext"
21
- return data unless ext
18
+ # def item_data(item)
19
+ # data = super
20
+ # ext = item.at "./ext"
21
+ # return data unless ext
22
22
 
23
- data[:docsubtype] = ext.at("./docsubtype")&.text
24
- data
25
- end
23
+ # data[:docsubtype] = ext.at("./docsubtype")&.text
24
+ # data
25
+ # end
26
26
 
27
27
  # @TODO Organization doesn't recreated
28
28
  # @param ext [Nokogiri::XML::Element]
data/relaton_ogc.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
29
29
  spec.add_development_dependency "pry-byebug"
30
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rake", "~> 13.0"
31
31
  spec.add_development_dependency "rspec", "~> 3.0"
32
32
  spec.add_development_dependency "ruby-jing"
33
33
  spec.add_development_dependency "simplecov"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
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-08-26 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -167,6 +167,7 @@ files:
167
167
  - README.adoc
168
168
  - Rakefile
169
169
  - bin/console
170
+ - bin/rspec
170
171
  - bin/setup
171
172
  - grammars/basicdoc.rng
172
173
  - grammars/biblio.rng