relaton-iho 1.6.pre1 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/grammars/reqt.rng CHANGED
@@ -30,15 +30,34 @@
30
30
  <data type="boolean"/>
31
31
  </attribute>
32
32
  </optional>
33
+ <optional>
34
+ <attribute name="number"/>
35
+ </optional>
33
36
  <optional>
34
37
  <attribute name="subsequence"/>
35
38
  </optional>
39
+ <optional>
40
+ <attribute name="keep-with-next">
41
+ <data type="boolean"/>
42
+ </attribute>
43
+ </optional>
44
+ <optional>
45
+ <attribute name="keep-lines-together">
46
+ <data type="boolean"/>
47
+ </attribute>
48
+ </optional>
36
49
  <attribute name="id">
37
50
  <data type="ID"/>
38
51
  </attribute>
39
52
  <optional>
40
53
  <attribute name="filename"/>
41
54
  </optional>
55
+ <optional>
56
+ <attribute name="model"/>
57
+ </optional>
58
+ <optional>
59
+ <attribute name="type"/>
60
+ </optional>
42
61
  <optional>
43
62
  <ref name="reqtitle"/>
44
63
  </optional>
@@ -48,9 +67,9 @@
48
67
  <optional>
49
68
  <ref name="subject"/>
50
69
  </optional>
51
- <optional>
70
+ <zeroOrMore>
52
71
  <ref name="reqinherit"/>
53
- </optional>
72
+ </zeroOrMore>
54
73
  <zeroOrMore>
55
74
  <ref name="classification"/>
56
75
  </zeroOrMore>
@@ -135,6 +154,16 @@
135
154
  <data type="boolean"/>
136
155
  </attribute>
137
156
  </optional>
157
+ <optional>
158
+ <attribute name="keep-with-next">
159
+ <data type="boolean"/>
160
+ </attribute>
161
+ </optional>
162
+ <optional>
163
+ <attribute name="keep-lines-together">
164
+ <data type="boolean"/>
165
+ </attribute>
166
+ </optional>
138
167
  <oneOrMore>
139
168
  <ref name="BasicBlock"/>
140
169
  </oneOrMore>
@@ -23,7 +23,7 @@ module RelatonIho
23
23
 
24
24
  # @param ret [Hash]
25
25
  def commentperiod_hash_to_bib(ret)
26
- ret[:commentperiod] &&= CommentPeriond.new(ret[:commentperiod])
26
+ ret[:commentperiod] &&= CommentPeriond.new(**ret[:commentperiod])
27
27
  end
28
28
 
29
29
  # @param ret [Hash]
@@ -13,6 +13,13 @@ module RelatonIho
13
13
  super
14
14
  end
15
15
 
16
+ # @param hash [Hash]
17
+ # @return [RelatonIho::IhoBibliographicItem]
18
+ def self.from_hash(hash)
19
+ item_hash = ::RelatonIho::HashConverter.hash_to_bib(hash)
20
+ new **item_hash
21
+ end
22
+
16
23
  # @param opts [Hash]
17
24
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
18
25
  # @option opts [Boolean] :bibdata
@@ -16,7 +16,7 @@ module RelatonIho
16
16
  return unless resp.code == "200"
17
17
 
18
18
  hash = HashConverter.hash_to_bib YAML.safe_load(resp.body, [Date])
19
- item = IhoBibliographicItem.new hash
19
+ item = IhoBibliographicItem.new **hash
20
20
  warn "[relaton-iho] (\"#{text}\") found #{item.docidentifier.first.id}"
21
21
  item
22
22
  rescue SocketError, Errno::EINVAL, Errno::ECONNRESET, EOFError,
@@ -28,8 +28,7 @@ module RelatonIho
28
28
  # @param hash [Hash]
29
29
  # @return [RelatonIho::IhoBibliographicItem]
30
30
  def hash_to_bib(hash)
31
- item_hash = ::RelatonIho::HashConverter.hash_to_bib(hash)
32
- ::RelatonIho::IhoBibliographicItem.new item_hash
31
+ ::RelatonIho::IhoBibliographicItem.new hash
33
32
  end
34
33
 
35
34
  # Returns hash of XML grammar
@@ -1,3 +1,3 @@
1
1
  module RelatonIho
2
- VERSION = "1.6.pre1".freeze
2
+ VERSION = "1.8.0".freeze
3
3
  end
@@ -18,10 +18,10 @@ module RelatonIho
18
18
  # @param item_hash [Hash]
19
19
  # @return [RelatonIho::IhoBibliographicItem]
20
20
  def bib_item(item_hash)
21
- IhoBibliographicItem.new item_hash
21
+ IhoBibliographicItem.new **item_hash
22
22
  end
23
23
 
24
- # @param ext [Nokogiri::XML::Element]
24
+ # @param ext [Nokogiri::XML::Element, nil]
25
25
  # @return [RelatonIho::EditorialGroupCollection, nil]
26
26
  def fetch_editorialgroup(ext)
27
27
  return unless ext
@@ -35,7 +35,7 @@ module RelatonIho
35
35
  EditorialGroupCollection.new egs if egs.any?
36
36
  end
37
37
 
38
- # @param ext [Nokogiri::XML::Element. nil]
38
+ # @param ihgrp [Nokogiri::XML::Element, nil]
39
39
  # @return [RelatonIho::Committee, RelatonIho::Commission,
40
40
  # RelatonIho::Workgroup, nil]
41
41
  def iho_group(ihgrp)
data/relaton_iho.gemspec CHANGED
@@ -22,15 +22,15 @@ Gem::Specification.new do |s|
22
22
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
23
23
 
24
24
  s.add_development_dependency "byebug"
25
- s.add_development_dependency "debase"
25
+ # s.add_development_dependency "debase"
26
26
  s.add_development_dependency "equivalent-xml", "~> 0.6"
27
27
  s.add_development_dependency "rake", "~> 10.0"
28
28
  s.add_development_dependency "rspec", "~> 3.0"
29
- s.add_development_dependency "ruby-debug-ide"
29
+ # s.add_development_dependency "ruby-debug-ide"
30
30
  s.add_development_dependency "ruby-jing"
31
31
  s.add_development_dependency "simplecov"
32
32
  s.add_development_dependency "vcr"
33
33
  s.add_development_dependency "webmock"
34
34
 
35
- s.add_dependency "relaton-bib", "~> 1.6.pre"
35
+ s.add_dependency "relaton-bib", "~> 1.8.0"
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.pre1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-12 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: byebug
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: debase
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: equivalent-xml
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +66,6 @@ dependencies:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
68
  version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: ruby-debug-ide
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
69
  - !ruby/object:Gem::Dependency
98
70
  name: ruby-jing
99
71
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +128,14 @@ dependencies:
156
128
  requirements:
157
129
  - - "~>"
158
130
  - !ruby/object:Gem::Version
159
- version: 1.6.pre
131
+ version: 1.8.0
160
132
  type: :runtime
161
133
  prerelease: false
162
134
  version_requirements: !ruby/object:Gem::Requirement
163
135
  requirements:
164
136
  - - "~>"
165
137
  - !ruby/object:Gem::Version
166
- version: 1.6.pre
138
+ version: 1.8.0
167
139
  description: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
168
140
  model'
169
141
  email:
@@ -172,9 +144,7 @@ executables: []
172
144
  extensions: []
173
145
  extra_rdoc_files: []
174
146
  files:
175
- - ".github/workflows/macos.yml"
176
- - ".github/workflows/ubuntu.yml"
177
- - ".github/workflows/windows.yml"
147
+ - ".github/workflows/rake.yml"
178
148
  - ".gitignore"
179
149
  - ".rspec"
180
150
  - ".rubocop.yml"
@@ -214,11 +184,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
184
  version: 2.4.0
215
185
  required_rubygems_version: !ruby/object:Gem::Requirement
216
186
  requirements:
217
- - - ">"
187
+ - - ">="
218
188
  - !ruby/object:Gem::Version
219
- version: 1.3.1
189
+ version: '0'
220
190
  requirements: []
221
- rubygems_version: 3.0.6
191
+ rubygems_version: 3.2.3
222
192
  signing_key:
223
193
  specification_version: 4
224
194
  summary: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
@@ -1,34 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-macos:
13
- name: Test on Ruby ${{ matrix.ruby }} macOS
14
- runs-on: macos-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- run: |
28
- sudo gem install bundler --force
29
- ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
30
- ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
31
- bundle install --jobs 4 --retry 3
32
- - name: Run specs
33
- run: |
34
- bundle exec rake
@@ -1,32 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-linux:
13
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
14
- runs-on: ubuntu-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- run: |
28
- gem install bundler
29
- bundle install --jobs 4 --retry 3
30
- - name: Run specs
31
- run: |
32
- bundle exec rake
@@ -1,35 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-windows:
13
- name: Test on Ruby ${{ matrix.ruby }} Windows
14
- runs-on: windows-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- shell: pwsh
28
- run: |
29
- gem install bundler
30
- bundle config --local path vendor/bundle
31
- bundle update
32
- bundle install --jobs 4 --retry 3
33
- - name: Run specs
34
- run: |
35
- bundle exec rake