relaton-omg 1.1.0 → 1.2.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: d57a39825ce799e309a824bd5f02dcc669492fc3d24fa1290156b42d90140de4
4
- data.tar.gz: 0cafebe6a675471687afb9ba8e4d8095fa047a23d6171f4f26da1165e083ba6c
3
+ metadata.gz: 95358cd97eb5e57d89796cd576823870ba14b90170e41c4e55049bd6f9e882e6
4
+ data.tar.gz: 303a67358ba69844fda736dbac7c9f3371fad5e628c8c96e57d6c410bbd007bd
5
5
  SHA512:
6
- metadata.gz: 5efa3f86e84167e9e4215016166da7c03b50824b50d7673a868e94d4854c93a6f11ea8275eedd3b83c2fe07b8a8d6778e3c86cd5a1c4de3993354d35e42e6245
7
- data.tar.gz: 77fa317badb7829f20358b33d25218d255541c4b6cf51e1e843296c445a3eb90aba4859a84425ced4125311e66e843c3dd68087db2a968662bd57f79149c155c
6
+ metadata.gz: 4ead4e445761222bf23d930c847312fc1b201cbe6d6341ef46095e28c266a622da7870502662d906d02dfd43dc00902984ffd27ac9d0dc0fc48130ca9d26f139
7
+ data.tar.gz: a978285aee9841457e723ce83055b35e83b2dc1b42ae5381e709061fe6b48ecaddbdb6dd1627af5fa2a030f5cb9ccc4bc94670ad83c3e3a878e7cbd6c2f4b8e3
@@ -532,7 +532,7 @@
532
532
  </define>
533
533
  <define name="LocalityType">
534
534
  <data type="string">
535
- <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|locality:[a-zA-Z0-9_]+</param>
535
+ <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
536
536
  </data>
537
537
  </define>
538
538
  <define name="referenceFrom">
@@ -6,9 +6,8 @@ module RelatonOmg
6
6
  # @param doctype [String]
7
7
  # @param keyword [Array<String>]
8
8
  def initialize(**args)
9
- @doctype = args.delete :doctype
10
- # @keyword = args.delete(:keyword) || []
11
9
  super
10
+ # @doctype = args[:doctype]
12
11
  end
13
12
 
14
13
  class << self
@@ -1,3 +1,3 @@
1
1
  module RelatonOmg
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.2.0".freeze
3
3
  end
@@ -3,26 +3,21 @@ require "nokogiri"
3
3
  module RelatonOmg
4
4
  class XMLParser < RelatonBib::XMLParser
5
5
  class << self
6
- def from_xml(xml)
7
- doc = Nokogiri::XML(xml)
8
- doc.remove_namespaces!
9
- item = doc.at("/bibitem|/bibdata")
10
- if item
11
- RelatonOmg::OmgBibliographicItem.new(item_data(item))
12
- else
13
- warn "[relato-omg] can't find bibitem or bibdata element in the XML"
14
- end
15
- end
16
-
17
6
  private
18
7
 
19
- def item_data(ietfitem)
20
- data = super
21
- # ext = ietfitem.at "./ext"
22
- # return data unless ext
8
+ # def item_data(ietfitem)
9
+ # data = super
10
+ # ext = ietfitem.at "./ext"
11
+ # return data unless ext
12
+
13
+ # data[:doctype] = ext.at("./doctype")&.text
14
+ # data
15
+ # end
23
16
 
24
- # data[:doctype] = ext.at("./doctype")&.text
25
- data
17
+ # @param item_hash [Hash]
18
+ # @return [RelatonOmg::OmgBibliographicItem]
19
+ def bib_item(item_hash)
20
+ OmgBibliographicItem.new item_hash
26
21
  end
27
22
  end
28
23
  end
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "vcr"
38
38
  spec.add_development_dependency "webmock"
39
39
 
40
- spec.add_dependency "relaton-bib", "~> 1.1.0"
40
+ spec.add_dependency "relaton-bib", "~> 1.2.0"
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-omg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.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-03 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.1.0
159
+ version: 1.2.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.1.0
166
+ version: 1.2.0
167
167
  description: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
168
168
  model'
169
169
  email: