relaton-ieee 1.7.1 → 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>
@@ -15,14 +15,14 @@ module RelatonIeee
15
15
  # @param item_hash [Hash]
16
16
  # @return [RelatonIeee::IeeeBibliographicItem]
17
17
  def bib_item(item_hash)
18
- IeeeBibliographicItem.new item_hash
18
+ IeeeBibliographicItem.new **item_hash
19
19
  end
20
20
 
21
21
  # @param hash [Hash]
22
22
  def committee_hash_to_bib(hash)
23
23
  return unless hash[:committee]
24
24
 
25
- hash[:committee] = hash[:committee].map { |c| Committee.new c }
25
+ hash[:committee] = hash[:committee].map { |c| Committee.new **c }
26
26
  end
27
27
  end
28
28
  end
@@ -23,7 +23,7 @@ module RelatonIeee
23
23
  json = JSON.parse resp_json["message"]
24
24
  @array = json["response"]["searchResults"]["resultsMapList"]
25
25
  .reduce([]) do |s, hit|
26
- /^(?:\w+\s)?(?<id>[^-\/]+)(-(?<year>\d{4}))?/ =~ hit["record"]["recordTitle"]
26
+ /^(?:\w+\s)?(?<id>[A-Z\d\.]+)(-(?<year>\d{4}))?/ =~ hit["record"]["recordTitle"]
27
27
  next s unless id && code =~ %r{^#{id}}
28
28
 
29
29
  s << Hit.new(hit["record"].merge(code: id, year: year.to_i), self)
@@ -9,6 +9,13 @@ module RelatonIeee
9
9
  super
10
10
  end
11
11
 
12
+ # @param hash [Hash]
13
+ # @return [RelatonIeee::IeeeBibliographicItem]
14
+ def self.from_hash(hash)
15
+ item_hash = ::RelatonIeee::HashConverter.hash_to_bib(hash)
16
+ new **item_hash
17
+ end
18
+
12
19
  # @param opts [Hash]
13
20
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
14
21
  # @option opts [Boolean] :bibdata
@@ -28,8 +28,7 @@ module RelatonIeee
28
28
  # @param hash [Hash]
29
29
  # @return [RelatonIeee::IeeeBibliographicItem]
30
30
  def hash_to_bib(hash)
31
- item_hash = ::RelatonIeee::HashConverter.hash_to_bib(hash)
32
- ::RelatonIeee::IeeeBibliographicItem.new item_hash
31
+ ::RelatonIeee::IeeeBibliographicItem.new hash
33
32
  end
34
33
 
35
34
  # Returns hash of XML grammar
@@ -1,3 +1,3 @@
1
1
  module RelatonIeee
2
- VERSION = "1.7.1".freeze
2
+ VERSION = "1.8.0".freeze
3
3
  end
@@ -22,7 +22,7 @@ module RelatonIeee
22
22
  # @param item_hash [Hash]
23
23
  # @return [RelatonIeee::IeeeBibliographicItem]
24
24
  def bib_item(item_hash)
25
- IeeeBibliographicItem.new item_hash
25
+ IeeeBibliographicItem.new **item_hash
26
26
  end
27
27
  end
28
28
  end
data/relaton_ieee.gemspec CHANGED
@@ -31,17 +31,17 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ["lib"]
33
33
 
34
- spec.add_development_dependency "debase"
34
+ # spec.add_development_dependency "debase"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
36
  spec.add_development_dependency "pry-byebug"
37
- spec.add_development_dependency "rake", "~> 10.0"
37
+ # spec.add_development_dependency "rake", "~> 13.0"
38
38
  # spec.add_development_dependency "rspec", "~> 3.0"
39
- spec.add_development_dependency "ruby-debug-ide"
39
+ # spec.add_development_dependency "ruby-debug-ide"
40
40
  # spec.add_development_dependency "ruby-jing"
41
41
  spec.add_development_dependency "simplecov"
42
42
  spec.add_development_dependency "vcr"
43
43
  spec.add_development_dependency "webmock"
44
44
 
45
- spec.add_dependency "faraday", "~> 1.0.0"
46
- spec.add_dependency "relaton-bib", "~> 1.7.0"
45
+ spec.add_dependency "faraday", "~> 1.1"
46
+ spec.add_dependency "relaton-bib", "~> 1.8.0"
47
47
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
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-12-16 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
@@ -52,34 +38,6 @@ dependencies:
52
38
  - - ">="
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '10.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '10.0'
69
- - !ruby/object:Gem::Dependency
70
- name: ruby-debug-ide
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
41
  - !ruby/object:Gem::Dependency
84
42
  name: simplecov
85
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,28 +86,28 @@ dependencies:
128
86
  requirements:
129
87
  - - "~>"
130
88
  - !ruby/object:Gem::Version
131
- version: 1.0.0
89
+ version: '1.1'
132
90
  type: :runtime
133
91
  prerelease: false
134
92
  version_requirements: !ruby/object:Gem::Requirement
135
93
  requirements:
136
94
  - - "~>"
137
95
  - !ruby/object:Gem::Version
138
- version: 1.0.0
96
+ version: '1.1'
139
97
  - !ruby/object:Gem::Dependency
140
98
  name: relaton-bib
141
99
  requirement: !ruby/object:Gem::Requirement
142
100
  requirements:
143
101
  - - "~>"
144
102
  - !ruby/object:Gem::Version
145
- version: 1.7.0
103
+ version: 1.8.0
146
104
  type: :runtime
147
105
  prerelease: false
148
106
  version_requirements: !ruby/object:Gem::Requirement
149
107
  requirements:
150
108
  - - "~>"
151
109
  - !ruby/object:Gem::Version
152
- version: 1.7.0
110
+ version: 1.8.0
153
111
  description: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the
154
112
  IeeeBibliographicItem model'
155
113
  email:
@@ -158,9 +116,7 @@ executables: []
158
116
  extensions: []
159
117
  extra_rdoc_files: []
160
118
  files:
161
- - ".github/workflows/macos.yml"
162
- - ".github/workflows/ubuntu.yml"
163
- - ".github/workflows/windows.yml"
119
+ - ".github/workflows/rake.yml"
164
120
  - ".gitignore"
165
121
  - ".rspec"
166
122
  - ".rubocop.yml"
@@ -208,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
164
  - !ruby/object:Gem::Version
209
165
  version: '0'
210
166
  requirements: []
211
- rubygems_version: 3.0.6
167
+ rubygems_version: 3.2.3
212
168
  signing_key:
213
169
  specification_version: 4
214
170
  summary: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the IeeeBibliographicItem
@@ -1,40 +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: Checkout submodules
22
- shell: bash
23
- run: |
24
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
25
- git submodule sync --recursive
26
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
27
- - name: Use Ruby
28
- uses: actions/setup-ruby@v1
29
- with:
30
- ruby-version: ${{ matrix.ruby }}
31
- architecture: 'x64'
32
- - name: Update gems
33
- run: |
34
- sudo gem install bundler --force
35
- ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
36
- ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
@@ -1,38 +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: Checkout submodules
22
- shell: bash
23
- run: |
24
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
25
- git submodule sync --recursive
26
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
27
- - name: Use Ruby
28
- uses: actions/setup-ruby@v1
29
- with:
30
- ruby-version: ${{ matrix.ruby }}
31
- architecture: 'x64'
32
- - name: Update gems
33
- run: |
34
- gem install bundler
35
- bundle install --jobs 4 --retry 3
36
- - name: Run specs
37
- run: |
38
- bundle exec rake
@@ -1,41 +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: Checkout submodules
22
- shell: bash
23
- run: |
24
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
25
- git submodule sync --recursive
26
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
27
- - name: Use Ruby
28
- uses: actions/setup-ruby@v1
29
- with:
30
- ruby-version: ${{ matrix.ruby }}
31
- architecture: 'x64'
32
- - name: Update gems
33
- shell: pwsh
34
- run: |
35
- gem install bundler
36
- bundle config --local path vendor/bundle
37
- bundle update
38
- bundle install --jobs 4 --retry 3
39
- - name: Run specs
40
- run: |
41
- bundle exec rake