relaton-ogc 1.2.0 → 1.3.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: 87083ec001e4455f32f366ae2abae1d363fa04a5ebd2e934d0972170cb30e8a1
4
- data.tar.gz: 3e2cdc145e63b059b60ff7e4d6f3826646dae21b2bf833f4786e050bd810b35f
3
+ metadata.gz: 1846ab3b42aa250b1a9afc321b181a82c820ca259a758859dc21a7b1c4e5ee02
4
+ data.tar.gz: 253d626642e8bea13d2659b533a6332b3a5c138157021a7f424def0383194ce5
5
5
  SHA512:
6
- metadata.gz: 9f3b7f2759e1759915979279b9490dc6039950abacb5c1e0862dd8c0dd81d1a45e4e4373ba6c1819658cf326ae8b574501ae037866bf5921cb1144a9802d1cf0
7
- data.tar.gz: be6f7d638a6421e6c287496828723c13996c494938b2bb8050c5799b615fe290bd851e1c1f82046112df54544ec19839e03b1b74d463729540fbc934d6be7224
6
+ metadata.gz: 0d2247a7dd1334b7d6800ef54ae3f44cb84ea384bab1489ab7b6fb3a8e7b59748b3f42635c2d6f267531dd174e9adf5c183f6fc21b0bae206c633b3f6435fb70
7
+ data.tar.gz: 5ef699a961a87ec101409808950236029df75df49e91d4791ec2b5ef660fb279063232b70e8967fda1247ebae3d84f01cb9c988eafe9248f10eafefe04b80382
@@ -29,4 +29,5 @@ jobs:
29
29
  bundle install --jobs 4 --retry 3
30
30
  - name: Run specs
31
31
  run: |
32
+ unset JAVA_TOOL_OPTIONS
32
33
  bundle exec rake
@@ -5,6 +5,6 @@
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
7
  AllCops:
8
- TargetRubyVersion: 2.3
8
+ TargetRubyVersion: 2.4
9
9
  Rails:
10
- Enabled: true
10
+ Enabled: false
@@ -52,6 +52,17 @@ module RelatonOgc
52
52
  hash
53
53
  end
54
54
 
55
+ # @param prefix [String]
56
+ # @return [String]
57
+ def to_asciibib(prefix)
58
+ pref = prefix.empty? ? prefix : prefix + "."
59
+ pref += "editorialgroup"
60
+ out = "#{pref}.committee:: #{committee}\n"
61
+ out += subcommittee.to_asciibib "#{pref}.subcommittee" if subcommittee
62
+ out += workgroup.to_asciibib "#{pref}.workgroup" if workgroup
63
+ out
64
+ end
65
+
55
66
  private
56
67
 
57
68
  # @param group [Hash, RelatonIsoBib::IsoSubgroup]
@@ -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
@@ -20,7 +20,8 @@ module RelatonOgc
20
20
  # @param docsubtype [String]
21
21
  def initialize(**args)
22
22
  if args[:docsubtype] && !SUBTYPES.include?(args[:docsubtype])
23
- warn "[relaton-ogc] WARNING: invalid document subtype: #{args[:docsubtype]}"
23
+ warn "[relaton-ogc] WARNING: invalid document "\
24
+ "subtype: #{args[:docsubtype]}"
24
25
  end
25
26
 
26
27
  @docsubtype = args.delete :docsubtype
@@ -48,5 +49,14 @@ module RelatonOgc
48
49
  end
49
50
  end
50
51
  end
52
+
53
+ # @param prefix [String]
54
+ # @return [String]
55
+ def to_asciibib(prefix = "")
56
+ pref = prefix.empty? ? prefix : prefix + "."
57
+ out = super
58
+ out += "#{pref}docsubtype:: #{docsubtype}\n" if docsubtype
59
+ out
60
+ end
51
61
  end
52
62
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.2.0".freeze
2
+ VERSION = "1.3.0".freeze
3
3
  end
@@ -3,19 +3,6 @@ require "nokogiri"
3
3
  module RelatonOgc
4
4
  class XMLParser < RelatonIsoBib::XMLParser
5
5
  class << self
6
- # Override RelatonIsoBib::XMLParser.form_xml method.
7
- # @param xml [String]
8
- # @return [RelatonOgc::OgcBibliographicItem]
9
- # def from_xml(xml)
10
- # doc = Nokogiri::XML(xml)
11
- # item = doc.at "/bibitem|/bibdata"
12
- # if item
13
- # OgcBibliographicItem.new item_data(item)
14
- # else
15
- # warn "[relaton-ogc] can't find bibitem or bibdata element in the XML"
16
- # end
17
- # end
18
-
19
6
  private
20
7
 
21
8
  # override RelatonIsoBib::IsoBibliographicItem.bib_item method
@@ -48,7 +35,7 @@ module RelatonOgc
48
35
  sc = iso_subgroup eg&.at("subcommittee")
49
36
  wg = iso_subgroup eg&.at("workgroup")
50
37
  EditorialGroup.new(
51
- committee: committe, subcommittee: sc, workgroup: wg,
38
+ committee: committe, subcommittee: sc, workgroup: wg
52
39
  )
53
40
  end
54
41
  end
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "webmock"
37
37
 
38
38
  spec.add_dependency "faraday", "~> 1.0.0"
39
- spec.add_dependency "relaton-iso-bib", "~> 1.2.0"
39
+ spec.add_dependency "relaton-iso-bib", "~> 1.3.0"
40
40
  end
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.2.0
4
+ version: 1.3.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: 2020-06-26 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.2.0
173
+ version: 1.3.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.2.0
180
+ version: 1.3.0
181
181
  description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
182
182
  model'
183
183
  email: