relaton-ogc 1.6.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/grammars/ogc.rng CHANGED
@@ -63,6 +63,22 @@
63
63
  </element>
64
64
  </define>
65
65
  </include>
66
+ <define name="TextElement" combine="choice">
67
+ <ref name="hi"/>
68
+ </define>
69
+ <define name="PureTextElement" combine="choice">
70
+ <ref name="hi"/>
71
+ </define>
72
+ <define name="hi">
73
+ <element name="hi">
74
+ <zeroOrMore>
75
+ <choice>
76
+ <ref name="PureTextElement"/>
77
+ <ref name="stem"/>
78
+ </choice>
79
+ </zeroOrMore>
80
+ </element>
81
+ </define>
66
82
  <define name="docsubtype">
67
83
  <element name="docsubtype">
68
84
  <choice>
@@ -115,6 +131,9 @@
115
131
  <zeroOrMore>
116
132
  <ref name="termdocsource"/>
117
133
  </zeroOrMore>
134
+ <optional>
135
+ <ref name="misccontainer"/>
136
+ </optional>
118
137
  <optional>
119
138
  <ref name="boilerplate"/>
120
139
  </optional>
@@ -126,6 +145,9 @@
126
145
  <ref name="annex"/>
127
146
  </zeroOrMore>
128
147
  <ref name="bibliography"/>
148
+ <zeroOrMore>
149
+ <ref name="indexsect"/>
150
+ </zeroOrMore>
129
151
  </element>
130
152
  </define>
131
153
  </grammar>
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>
@@ -74,7 +74,7 @@ module RelatonOgc
74
74
  # @return {RelatonIsoBib::IsoSubgroup}
75
75
  def subgroup(group)
76
76
  if group.is_a?(Hash)
77
- RelatonIsoBib::IsoSubgroup.new(group)
77
+ RelatonIsoBib::IsoSubgroup.new(**group)
78
78
  else group
79
79
  end
80
80
  end
@@ -29,6 +29,13 @@ module RelatonOgc
29
29
  super
30
30
  end
31
31
 
32
+ # @param hash [Hash]
33
+ # @return [RelatonOgc::OgcBibliographicItem]
34
+ def self.from_hash(hash)
35
+ item_hash = ::RelatonOgc::HashConverter.hash_to_bib(hash)
36
+ new **item_hash
37
+ end
38
+
32
39
  # @return [Hash]
33
40
  def to_hash
34
41
  hash = super
@@ -26,8 +26,7 @@ module RelatonOgc
26
26
  # @param hash [Hash]
27
27
  # @return [RelatonOgc::OgcBibliographicItem]
28
28
  def hash_to_bib(hash)
29
- item_hash = ::RelatonOgc::HashConverter.hash_to_bib(hash)
30
- ::RelatonOgc::OgcBibliographicItem.new item_hash
29
+ ::RelatonOgc::OgcBibliographicItem.from_hash hash
31
30
  end
32
31
 
33
32
  # Returns hash of XML grammar
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.6.0".freeze
2
+ VERSION = "1.8.0".freeze
3
3
  end
@@ -9,7 +9,7 @@ module RelatonOgc
9
9
  # @param item_hash [Hash]
10
10
  # @return [RelatonOgc::OgcBibliographicItem]
11
11
  def bib_item(item_hash)
12
- OgcBibliographicItem.new item_hash
12
+ OgcBibliographicItem.new **item_hash
13
13
  end
14
14
 
15
15
  # Override RelatonIsoBib::XMLParser.item_data method.
data/relaton_ogc.gemspec CHANGED
@@ -24,17 +24,17 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_development_dependency "debase"
27
+ # spec.add_development_dependency "debase"
28
28
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
29
29
  spec.add_development_dependency "pry-byebug"
30
30
  spec.add_development_dependency "rake", "~> 10.0"
31
31
  spec.add_development_dependency "rspec", "~> 3.0"
32
- spec.add_development_dependency "ruby-debug-ide"
32
+ # spec.add_development_dependency "ruby-debug-ide"
33
33
  spec.add_development_dependency "ruby-jing"
34
34
  spec.add_development_dependency "simplecov"
35
35
  spec.add_development_dependency "vcr"
36
36
  spec.add_development_dependency "webmock"
37
37
 
38
- spec.add_dependency "faraday", "~> 1.0.0"
39
- spec.add_dependency "relaton-iso-bib", "~> 1.6.0"
38
+ spec.add_dependency "faraday", "~> 1.1"
39
+ spec.add_dependency "relaton-iso-bib", "~> 1.8.0"
40
40
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.8.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-11-13 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: debase
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: equivalent-xml
29
15
  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,28 +128,28 @@ dependencies:
156
128
  requirements:
157
129
  - - "~>"
158
130
  - !ruby/object:Gem::Version
159
- version: 1.0.0
131
+ version: '1.1'
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.0.0
138
+ version: '1.1'
167
139
  - !ruby/object:Gem::Dependency
168
140
  name: relaton-iso-bib
169
141
  requirement: !ruby/object:Gem::Requirement
170
142
  requirements:
171
143
  - - "~>"
172
144
  - !ruby/object:Gem::Version
173
- version: 1.6.0
145
+ version: 1.8.0
174
146
  type: :runtime
175
147
  prerelease: false
176
148
  version_requirements: !ruby/object:Gem::Requirement
177
149
  requirements:
178
150
  - - "~>"
179
151
  - !ruby/object:Gem::Version
180
- version: 1.6.0
152
+ version: 1.8.0
181
153
  description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
182
154
  model'
183
155
  email:
@@ -186,9 +158,7 @@ executables: []
186
158
  extensions: []
187
159
  extra_rdoc_files: []
188
160
  files:
189
- - ".github/workflows/macos.yml"
190
- - ".github/workflows/ubuntu.yml"
191
- - ".github/workflows/windows.yml"
161
+ - ".github/workflows/rake.yml"
192
162
  - ".gitignore"
193
163
  - ".rspec"
194
164
  - ".rubocop.yml"
@@ -234,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
204
  - !ruby/object:Gem::Version
235
205
  version: '0'
236
206
  requirements: []
237
- rubygems_version: 3.0.6
207
+ rubygems_version: 3.2.3
238
208
  signing_key:
239
209
  specification_version: 4
240
210
  summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
@@ -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,33 +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
- unset JAVA_TOOL_OPTIONS
33
- 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