relaton-cen 1.14.0 → 1.16.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: 2b44dade4c7f793081a7af352c370cd9a0a8cb85bea1fe45a320a7bfdccd9855
4
- data.tar.gz: 5bbf3e71a61133840dd74253cc0ac7c6cd35e31f9799d5ad77cd7aad6832a972
3
+ metadata.gz: b5f0cd6a09da357f5ca19fe9d38430f7880d9b9658ee89bbcdf56a7c081342f1
4
+ data.tar.gz: c3645683652f184f5d037de48065b3e31dc173e84230de6f00d1f253f607febf
5
5
  SHA512:
6
- metadata.gz: cf47eae7b793ac3129da9c396a326049f5638854d91f8788889e12a877585d9f03ddff00a947dd2ebc509d77241680d7cd6ceb9ddb8e9158d3092c426965b4df
7
- data.tar.gz: 1575502644a79c96b40fd41530b060c0d6606b8d993c1fd24e6183e705c21cab932e7e04ea4c9c53731895526ec3c10c7ebab4445f6bc4c3abb189405a3c8690
6
+ metadata.gz: 71f1f8971c40519883ead3fcd2a436a05c7d3826be5d1e1e3d3eae3e7d095a4b2c549228e918c18eff2df744fa4bd61297ec78a6c8481624b5106165aa7e8213
7
+ data.tar.gz: 13f632f4e026a41ebce994abbf3e9ca9505b51ecc551ed44bb325681427aae678305b7ed9b955db674dd6a8c3dc132971408060c51bf269262df33ad3b9f7248
@@ -7,11 +7,13 @@ on:
7
7
  inputs:
8
8
  next_version:
9
9
  description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
10
+ Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
11
+ Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
11
12
  required: true
12
13
  default: 'skip'
13
- push:
14
- tags: [ v* ]
14
+ repository_dispatch:
15
+ types: [ do-release ]
16
+
15
17
 
16
18
  jobs:
17
19
  release:
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /vendor/
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 2.7
11
11
  Rails:
12
12
  Enabled: false
data/Gemfile CHANGED
@@ -5,6 +5,14 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in relaton_cen.gemspec
6
6
  gemspec
7
7
 
8
+ gem "equivalent-xml", "~> 0.6"
9
+ gem "pry-byebug"
8
10
  gem "rake", "~> 13.0"
9
-
10
11
  gem "rspec", "~> 3.0"
12
+ gem "rubocop", "~> 1.17.0"
13
+ gem "rubocop-performance", "~> 1.11.0"
14
+ gem "rubocop-rails", "~> 2.10.0"
15
+ gem "ruby-jing"
16
+ gem "simplecov"
17
+ gem "vcr", "~> 5.0.0"
18
+ gem "webmock"
data/README.adoc CHANGED
@@ -10,7 +10,7 @@ RelatonCen is a Ruby gem that implements the https://github.com/metanorma/metano
10
10
 
11
11
  == Installation
12
12
 
13
- Add this line to your application's Gemfile:
13
+ Add this line to your application's `Gemfile`:
14
14
 
15
15
  [source,ruby]
16
16
  ----
@@ -19,11 +19,17 @@ gem 'relaton-cen'
19
19
 
20
20
  And then execute:
21
21
 
22
- $ bundle install
22
+ [source,sh]
23
+ ----
24
+ $ bundle install
25
+ ----
23
26
 
24
27
  Or install it yourself as:
25
28
 
26
- $ gem install relaton-cen
29
+ [source,sh]
30
+ ----
31
+ $ gem install relaton-cen
32
+ ----
27
33
 
28
34
  == Usage
29
35
 
@@ -42,7 +48,22 @@ item = hit_collection[0].fetch
42
48
  ...
43
49
  ----
44
50
 
51
+ [source,ruby]
52
+ ----
53
+ > RelatonCen::CenBibliography.get "CEN/CLC Guide 6"
54
+ [relaton-cen] ("CEN/CLC Guide 6") fetching...
55
+ [isoics] code   not found in ICS list
56
+ [relaton-cen] ("CEN/CLC Guide 6") found CEN/CLC Guide 6:2014
57
+ =>
58
+ #<RelatonCen::BibliographicItem:0x000000011371cb90
59
+ @abstract=
60
+ [#<RelatonBib::FormattedString:0x000000011371c5f0
61
+ @content=
62
+ "ISO/IEC Guide 71:2014 provides guidance to standards..."
63
+ ----
64
+
45
65
  === XML serialization
66
+
46
67
  [source,ruby]
47
68
  ----
48
69
  item.to_xml
@@ -53,7 +74,9 @@ item.to_xml
53
74
  </bibitem>"
54
75
  ----
55
76
 
56
- With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added.
77
+ With `bibdata: true` option XML output wrapped with `bibdata` element and `ext`
78
+ element added.
79
+
57
80
  [source,ruby]
58
81
  ----
59
82
  item.to_xml bibdata: true
@@ -79,6 +102,7 @@ item.link
79
102
  ----
80
103
 
81
104
  === Get code, and year
105
+
82
106
  [source,ruby]
83
107
  ----
84
108
  RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7:2019"
@@ -95,6 +119,7 @@ RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7", "2019"
95
119
  ----
96
120
 
97
121
  === Create bibliographic item form YAML
122
+
98
123
  [source,ruby]
99
124
  ----
100
125
  hash = YAML.load_file 'spec/fixtures/bibdata.yaml'
@@ -107,6 +132,7 @@ hash = YAML.load_file 'spec/fixtures/bibdata.yaml'
107
132
  ----
108
133
 
109
134
  === Create bibliographic item from XML
135
+
110
136
  [source,ruby]
111
137
  ----
112
138
  RelatonCen::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml", encoding: "UTF-8")
@@ -114,6 +140,7 @@ RelatonCen::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml", encoding:
114
140
  ...
115
141
  ----
116
142
 
143
+
117
144
  == Development
118
145
 
119
146
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -522,7 +522,6 @@
522
522
  <value>tip</value>
523
523
  <value>important</value>
524
524
  <value>caution</value>
525
- <value>statement</value>
526
525
  </choice>
527
526
  </define>
528
527
  <define name="figure">
data/grammars/biblio.rng CHANGED
@@ -216,6 +216,9 @@
216
216
  <optional>
217
217
  <ref name="fullname"/>
218
218
  </optional>
219
+ <zeroOrMore>
220
+ <ref name="credential"/>
221
+ </zeroOrMore>
219
222
  <zeroOrMore>
220
223
  <ref name="affiliation"/>
221
224
  </zeroOrMore>
@@ -232,6 +235,11 @@
232
235
  <ref name="FullNameType"/>
233
236
  </element>
234
237
  </define>
238
+ <define name="credential">
239
+ <element name="credential">
240
+ <text/>
241
+ </element>
242
+ </define>
235
243
  <define name="FullNameType">
236
244
  <choice>
237
245
  <group>
@@ -305,7 +313,9 @@
305
313
  <zeroOrMore>
306
314
  <ref name="affiliationdescription"/>
307
315
  </zeroOrMore>
308
- <ref name="organization"/>
316
+ <optional>
317
+ <ref name="organization"/>
318
+ </optional>
309
319
  </element>
310
320
  </define>
311
321
  <define name="affiliationname">
@@ -1273,7 +1283,7 @@
1273
1283
  <value>mergedInto</value>
1274
1284
  <value>splits</value>
1275
1285
  <value>splitInto</value>
1276
- <value>instance</value>
1286
+ <value>instanceOf</value>
1277
1287
  <value>hasInstance</value>
1278
1288
  <value>exemplarOf</value>
1279
1289
  <value>hasExemplar</value>
@@ -1316,7 +1326,7 @@
1316
1326
  <value>commentaryOf</value>
1317
1327
  <value>hasCommentary</value>
1318
1328
  <value>related</value>
1319
- <value>complements</value>
1329
+ <value>hasComplement</value>
1320
1330
  <value>complementOf</value>
1321
1331
  <value>obsoletes</value>
1322
1332
  <value>obsoletedBy</value>
@@ -22,7 +22,7 @@ module RelatonCen
22
22
  search_page = agent.get "#{DOMAIN}f?p=205:105:0:::::"
23
23
  form = search_page.at "//form[@id='wwvFlowForm']"
24
24
  skip_inputs = %w[f11 essentialCookies]
25
- req_body = form.xpath(".//input").map do |f|
25
+ req_body = form.xpath(".//input").filter_map do |f|
26
26
  next if f[:name].empty? || skip_inputs.include?(f[:name])
27
27
 
28
28
  val = case f[:value]
@@ -39,7 +39,7 @@ module RelatonCen
39
39
  else
40
40
  "#{f[:name]}=#{val}"
41
41
  end
42
- end.compact.join("&")
42
+ end.join("&")
43
43
  resp = agent.post form[:action], req_body
44
44
  @array = hits resp
45
45
  sort
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonCen
4
- VERSION = "1.14.0"
4
+ VERSION = "1.16.0"
5
5
  end
data/relaton_cen.gemspec CHANGED
@@ -8,13 +8,13 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Ribose Inc."]
9
9
  spec.email = ["open.source@ribose.com"]
10
10
 
11
- spec.summary = "RelatonCen: retrieve Cenelec Standards for "\
11
+ spec.summary = "RelatonCen: retrieve Cenelec Standards for " \
12
12
  "bibliographic use using the IsoBibliographicItem model"
13
- spec.description = "RelatonCen: retrieve Cenelec Standards for "\
13
+ spec.description = "RelatonCen: retrieve Cenelec Standards for " \
14
14
  "bibliographic use using the IsoBibliographicItem model"
15
15
  spec.homepage = "https://github.com/metanorma/relaton-cen"
16
16
  spec.license = "BSD-2-Clause"
17
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
17
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
18
18
 
19
19
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
20
20
 
@@ -31,18 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ["lib"]
33
33
 
34
- spec.add_development_dependency "equivalent-xml", "~> 0.6"
35
- spec.add_development_dependency "pry-byebug"
36
- spec.add_development_dependency "rubocop", "~> 1.17.0"
37
- spec.add_development_dependency "rubocop-performance", "~> 1.11.0"
38
- spec.add_development_dependency "rubocop-rails", "~> 2.10.0"
39
- spec.add_development_dependency "ruby-jing"
40
- spec.add_development_dependency "simplecov"
41
- spec.add_development_dependency "vcr", "~> 5.0.0"
42
- spec.add_development_dependency "webmock"
43
-
44
- spec.add_dependency "mechanize"
45
- spec.add_dependency "relaton-iso-bib", "~> 1.14.0"
34
+ spec.add_dependency "mechanize", "~> 2.8.0"
35
+ spec.add_dependency "relaton-iso-bib", "~> 1.16.0"
46
36
 
47
37
  # For more information and examples about making a new gem, checkout our
48
38
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,169 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-cen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-03 00:00:00.000000000 Z
11
+ date: 2023-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: equivalent-xml
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.6'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.6'
27
- - !ruby/object:Gem::Dependency
28
- name: pry-byebug
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
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 1.17.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 1.17.0
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop-performance
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.11.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.11.0
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-rails
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 2.10.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 2.10.0
83
- - !ruby/object:Gem::Dependency
84
- name: ruby-jing
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
- - !ruby/object:Gem::Dependency
98
- name: simplecov
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: vcr
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 5.0.0
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 5.0.0
125
- - !ruby/object:Gem::Dependency
126
- name: webmock
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
13
  - !ruby/object:Gem::Dependency
140
14
  name: mechanize
141
15
  requirement: !ruby/object:Gem::Requirement
142
16
  requirements:
143
- - - ">="
17
+ - - "~>"
144
18
  - !ruby/object:Gem::Version
145
- version: '0'
19
+ version: 2.8.0
146
20
  type: :runtime
147
21
  prerelease: false
148
22
  version_requirements: !ruby/object:Gem::Requirement
149
23
  requirements:
150
- - - ">="
24
+ - - "~>"
151
25
  - !ruby/object:Gem::Version
152
- version: '0'
26
+ version: 2.8.0
153
27
  - !ruby/object:Gem::Dependency
154
28
  name: relaton-iso-bib
155
29
  requirement: !ruby/object:Gem::Requirement
156
30
  requirements:
157
31
  - - "~>"
158
32
  - !ruby/object:Gem::Version
159
- version: 1.14.0
33
+ version: 1.16.0
160
34
  type: :runtime
161
35
  prerelease: false
162
36
  version_requirements: !ruby/object:Gem::Requirement
163
37
  requirements:
164
38
  - - "~>"
165
39
  - !ruby/object:Gem::Version
166
- version: 1.14.0
40
+ version: 1.16.0
167
41
  description: 'RelatonCen: retrieve Cenelec Standards for bibliographic use using the
168
42
  IsoBibliographicItem model'
169
43
  email:
@@ -209,7 +83,7 @@ licenses:
209
83
  metadata:
210
84
  homepage_uri: https://github.com/metanorma/relaton-cen
211
85
  source_code_uri: https://github.com/metanorma/relaton-cen
212
- post_install_message:
86
+ post_install_message:
213
87
  rdoc_options: []
214
88
  require_paths:
215
89
  - lib
@@ -217,15 +91,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
91
  requirements:
218
92
  - - ">="
219
93
  - !ruby/object:Gem::Version
220
- version: 2.5.0
94
+ version: 2.7.0
221
95
  required_rubygems_version: !ruby/object:Gem::Requirement
222
96
  requirements:
223
97
  - - ">="
224
98
  - !ruby/object:Gem::Version
225
99
  version: '0'
226
100
  requirements: []
227
- rubygems_version: 3.2.3
228
- signing_key:
101
+ rubygems_version: 3.3.26
102
+ signing_key:
229
103
  specification_version: 4
230
104
  summary: 'RelatonCen: retrieve Cenelec Standards for bibliographic use using the IsoBibliographicItem
231
105
  model'