relaton-bipm 1.8.0 → 1.9.1

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: 4e9171f0d010265f11f0a93e38f366807b29adb777373e3f54e97cbfe0e6af31
4
- data.tar.gz: d011a570dc1d2704c2025d3fe8519c9afcf85d9fab6b04a0c0092657e38dd556
3
+ metadata.gz: 14553012c5084d04727a4dc053691295f9dbfb1d9844ba7abeaf78de950c28ff
4
+ data.tar.gz: f665d38e8f7d94f7f33787fb8a759c96579a4cfcfe943bcc5bc170b13fd0ef78
5
5
  SHA512:
6
- metadata.gz: 73bdd4e5894404346621a2179f73f76e6c62f710b171c26c463bf7fb50a5f7a3e7f9c7c91a4d967965269599381707d4d37a2cd69bf45ad0eb36b716ea15eb99
7
- data.tar.gz: b308d2e5818a9eb08903a55f40c997e1ec7d1224e7949f561a11891c94e73e32689ccefbd71b617a37f9b5f79fb7bf26c68a7b0a5c029f94bcc5b3394cdd0d3d
6
+ metadata.gz: 8805d5051e4716d05b0e039e7433d3709d527541fd0971106974e8119e0dc07a3c17bb9544b2550d4d3aaed4aa3cefc42860d0837add025693faa89586f3c389
7
+ data.tar.gz: 369846fe5052361189fe0aa63eba5459083617ad025f753b2b16bcba76d6c3a5decd65ee92cee5875101913ea56537b4a74eef3d16072263061749cf16bd557a
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
data/.rubocop.yml CHANGED
@@ -5,6 +5,6 @@
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
7
  AllCops:
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
  Rails:
10
10
  Enabled: false
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in relaton_bipm.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake", "~> 12.0"
6
+ gem "rake", "~> 13.0"
7
7
  gem "rspec", "~> 3.0"
data/grammars/biblio.rng CHANGED
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
data/grammars/bipm.rng CHANGED
@@ -245,6 +245,9 @@
245
245
  <optional>
246
246
  <ref name="doctype"/>
247
247
  </optional>
248
+ <optional>
249
+ <ref name="docsubtype"/>
250
+ </optional>
248
251
  <ref name="editorialgroup"/>
249
252
  <optional>
250
253
  <ref name="comment-period"/>
data/grammars/isodoc.rng CHANGED
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -199,6 +204,18 @@
199
204
  </zeroOrMore>
200
205
  </element>
201
206
  </define>
207
+ <define name="dt">
208
+ <element name="dt">
209
+ <optional>
210
+ <attribute name="id">
211
+ <data type="ID"/>
212
+ </attribute>
213
+ </optional>
214
+ <zeroOrMore>
215
+ <ref name="TextElement"/>
216
+ </zeroOrMore>
217
+ </element>
218
+ </define>
202
219
  <define name="example">
203
220
  <element name="example">
204
221
  <attribute name="id">
@@ -543,6 +560,9 @@
543
560
  </define>
544
561
  <define name="BibDataExtensionType">
545
562
  <ref name="doctype"/>
563
+ <optional>
564
+ <ref name="docsubtype"/>
565
+ </optional>
546
566
  <optional>
547
567
  <ref name="editorialgroup"/>
548
568
  </optional>
@@ -890,6 +910,14 @@
890
910
  </define>
891
911
  </include>
892
912
  <!-- end overrides -->
913
+ <define name="docsubtype">
914
+ <element name="subdoctype">
915
+ <ref name="DocumentSubtype"/>
916
+ </element>
917
+ </define>
918
+ <define name="DocumentSubtype">
919
+ <text/>
920
+ </define>
893
921
  <define name="colgroup">
894
922
  <element name="colgroup">
895
923
  <oneOrMore>
@@ -939,7 +967,34 @@
939
967
  <define name="concept">
940
968
  <element name="concept">
941
969
  <optional>
942
- <attribute name="term"/>
970
+ <attribute name="ital">
971
+ <data type="boolean"/>
972
+ </attribute>
973
+ </optional>
974
+ <optional>
975
+ <attribute name="ref">
976
+ <data type="boolean"/>
977
+ </attribute>
978
+ </optional>
979
+ <optional>
980
+ <element name="refterm">
981
+ <zeroOrMore>
982
+ <choice>
983
+ <ref name="PureTextElement"/>
984
+ <ref name="stem"/>
985
+ </choice>
986
+ </zeroOrMore>
987
+ </element>
988
+ </optional>
989
+ <optional>
990
+ <element name="renderterm">
991
+ <zeroOrMore>
992
+ <choice>
993
+ <ref name="PureTextElement"/>
994
+ <ref name="stem"/>
995
+ </choice>
996
+ </zeroOrMore>
997
+ </element>
943
998
  </optional>
944
999
  <choice>
945
1000
  <ref name="eref"/>
@@ -965,6 +1020,9 @@
965
1020
  </attribute>
966
1021
  <attribute name="name"/>
967
1022
  <attribute name="action"/>
1023
+ <optional>
1024
+ <attribute name="class"/>
1025
+ </optional>
968
1026
  <zeroOrMore>
969
1027
  <choice>
970
1028
  <ref name="TextElement"/>
@@ -1191,13 +1249,17 @@
1191
1249
  </define>
1192
1250
  <define name="IsoWorkgroup">
1193
1251
  <optional>
1194
- <attribute name="number">
1195
- <data type="int"/>
1196
- </attribute>
1252
+ <attribute name="number"/>
1197
1253
  </optional>
1198
1254
  <optional>
1199
1255
  <attribute name="type"/>
1200
1256
  </optional>
1257
+ <optional>
1258
+ <attribute name="identifier"/>
1259
+ </optional>
1260
+ <optional>
1261
+ <attribute name="prefix"/>
1262
+ </optional>
1201
1263
  <text/>
1202
1264
  </define>
1203
1265
  <define name="ics">
@@ -1459,26 +1521,26 @@
1459
1521
  <optional>
1460
1522
  <ref name="section-title"/>
1461
1523
  </optional>
1462
- <group>
1524
+ <choice>
1463
1525
  <choice>
1464
1526
  <group>
1465
- <zeroOrMore>
1527
+ <oneOrMore>
1466
1528
  <ref name="BasicBlock"/>
1467
- </zeroOrMore>
1529
+ </oneOrMore>
1468
1530
  <zeroOrMore>
1469
1531
  <ref name="note"/>
1470
1532
  </zeroOrMore>
1471
1533
  </group>
1472
1534
  <ref name="amend"/>
1473
1535
  </choice>
1474
- <zeroOrMore>
1536
+ <oneOrMore>
1475
1537
  <choice>
1476
1538
  <ref name="clause-subsection"/>
1477
1539
  <ref name="terms"/>
1478
1540
  <ref name="definitions"/>
1479
1541
  </choice>
1480
- </zeroOrMore>
1481
- </group>
1542
+ </oneOrMore>
1543
+ </choice>
1482
1544
  </define>
1483
1545
  <define name="Annex-Section">
1484
1546
  <optional>
@@ -28,12 +28,12 @@ module RelatonBipm
28
28
  def initialize(**args) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
29
29
  if args[:docstatus] && !STATUSES.include?(args[:docstatus].stage.value)
30
30
  warn "[relaton-bipm] Warning: invalid docstatus: #{args[:docstatus].stage.value}. "\
31
- "It should be one of: #{STATUSES}"
31
+ "It should be one of: #{STATUSES}"
32
32
  end
33
33
 
34
34
  if args[:si_aspect] && !SI_ASPECTS.include?(args[:si_aspect])
35
35
  warn "[relaton-bipm] Warning: invalid si_aspect: #{args[:si_aspect]}. "\
36
- "It should be one of: #{SI_ASPECTS}"
36
+ "It should be one of: #{SI_ASPECTS}"
37
37
  end
38
38
 
39
39
  @comment_period = args.delete :comment_period
@@ -46,7 +46,7 @@ module RelatonBipm
46
46
  # @return [RelatonBipm::BipmBibliographicItem]
47
47
  def self.from_hash(hash)
48
48
  item_hash = ::RelatonBipm::HashConverter.hash_to_bib(hash)
49
- new **item_hash
49
+ new(**item_hash)
50
50
  end
51
51
 
52
52
  # @param opts [Hash]
@@ -83,7 +83,7 @@ module RelatonBipm
83
83
  # @param prefix [String]
84
84
  # @return [String]
85
85
  def to_asciibib(prefix = "")
86
- pref = prefix.empty? ? prefix : prefix + "."
86
+ pref = prefix.empty? ? prefix : "#{prefix}."
87
87
  out = super
88
88
  out += comment_period.to_asciibib prefix if comment_period
89
89
  out += "#{pref}si_aspect:: #{si_aspect}\n" if si_aspect
@@ -4,38 +4,11 @@ module RelatonBipm
4
4
  class BipmBibliography
5
5
  GH_ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-bipm/master/data/".freeze
6
6
  IOP_DOMAIN = "https://iopscience.iop.org".freeze
7
- USERAGENTS = [
8
- "Mozilla/5.0 CK={} (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
9
- "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
10
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)",
11
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)",
12
- "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
13
- "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; KTXN)",
14
- "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1",
15
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)",
16
- "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0",
17
- "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1",
18
- "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
19
- "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)",
20
- "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
21
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko)",
22
- "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
23
- "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
24
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
25
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko)",
26
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)",
27
- "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko",
28
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)",
29
- "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
30
- "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36",
31
- "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1",
32
- "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)",
33
- ].freeze
34
7
 
35
8
  class << self
36
9
  # @param text [String]
37
10
  # @return [RelatonBipm::BipmBibliographicItem]
38
- def search(text, _year = nil, _opts = {})
11
+ def search(text, _year = nil, _opts = {}) # rubocop:disable Metrics/AbcSize
39
12
  warn "[relaton-bipm] (\"#{text}\") fetching..."
40
13
  ref = text.sub(/^BIPM\s/, "")
41
14
  item = ref.match?(/^Metrologia/i) ? get_metrologia(ref, magent) : get_bipm(ref, magent)
@@ -48,17 +21,18 @@ module RelatonBipm
48
21
  end
49
22
 
50
23
  # @return [Mechanize]
51
- def magent
24
+ def magent # rubocop:disable Metrics/MethodLength
52
25
  a = Mechanize.new
53
26
  a.request_headers = {
54
- "Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,"\
55
- "*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
27
+ "Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,"\
28
+ "image/avif,image/webp,image/apng,"\
29
+ "*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
56
30
  "Accept-Encoding" => "gzip, deflate, br",
57
31
  "Accept-Language" => "en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7",
58
32
  "Cache-Control" => "max-age=0",
59
33
  "Upgrade-Insecure-Requests" => "1",
60
- "User-Agent" => USERAGENTS.shuffle.first,
61
34
  }
35
+ a.user_agent_alias = Mechanize::AGENT_ALIASES.map(&:first).shuffle.first
62
36
  a
63
37
  end
64
38
 
@@ -66,12 +40,12 @@ module RelatonBipm
66
40
  # @param agent [Mechanize]
67
41
  # @return [RelatonBipm::BipmBibliographicItem]
68
42
  def get_bipm(ref, agent)
69
- url = "#{GH_ENDPOINT}#{ref.downcase.split(' ').join '-'}.yaml"
43
+ url = "#{GH_ENDPOINT}#{ref.upcase.split.join '-'}.yaml"
70
44
  resp = agent.get url
71
45
  return unless resp.code == "200"
72
46
 
73
47
  bib_hash = HashConverter.hash_to_bib YAML.safe_load(resp.body, [Date])
74
- BipmBibliographicItem.new **bib_hash
48
+ BipmBibliographicItem.new(**bib_hash)
75
49
  end
76
50
 
77
51
  # @param ref [String]
@@ -79,7 +53,7 @@ module RelatonBipm
79
53
  # @return [RelatonBipm::BipmBibliographicItem]
80
54
  def get_metrologia(ref, agent)
81
55
  agent.redirect_ok = false
82
- ref_arr = ref.split(" ")
56
+ ref_arr = ref.split
83
57
  case ref_arr.size
84
58
  when 1 then get_journal agent
85
59
  when 2 then get_volume ref_arr[1], agent
@@ -91,7 +65,7 @@ module RelatonBipm
91
65
  # @param agent [Mechanize]
92
66
  # @return [RelatonBipm::BipmBibliographicItem]
93
67
  def get_journal(agent)
94
- url = IOP_DOMAIN + "/journal/0026-1394"
68
+ url = "#{IOP_DOMAIN}/journal/0026-1394"
95
69
  rsp = agent.get url
96
70
  rel = rsp.xpath('//select[@id="allVolumesSelector"]/option').map do |v|
97
71
  { type: "partOf", bibitem: journal_rel(v) }
@@ -129,7 +103,7 @@ module RelatonBipm
129
103
  docid = doc_id [vol, ish]
130
104
  t = elm.at "p"
131
105
  title_fref = t ? { title: titles(t.text) } : { formattedref: fref(docid.id) }
132
- BipmBibliographicItem.new **title_fref, docid: [docid], link: blink(url)
106
+ BipmBibliographicItem.new(**title_fref, docid: [docid], link: blink(url))
133
107
  end
134
108
 
135
109
  # @param title [String]
@@ -234,10 +208,10 @@ module RelatonBipm
234
208
  # @param agent [Mechanize]
235
209
  # @return [RelatonBipm::BipmBibliographicItem]
236
210
  def get_article(path, vol, ish, agent) # rubocop:disable Metrics/AbcSize
237
- url = URI IOP_DOMAIN + path
238
- rsp = agent.get url
211
+ rsp = agent.get path
212
+ url = rsp.uri
239
213
  bib = rsp.link_with(text: "BibTeX").href
240
- rsp = agent.get URI IOP_DOMAIN + bib
214
+ rsp = agent.get bib
241
215
  bt = BibTeX.parse(rsp.body).first
242
216
  bibitem(docid: btdocid(bt), title: titles(bt.title.to_s), abstract: btabstract(bt), doctype: bt.type.to_s,
243
217
  link: btlink(bt, url), date: btdate(bt), contributor: btcontrib(bt), series: series,
@@ -248,7 +222,7 @@ module RelatonBipm
248
222
  # @return [RelatonBipm::BipmBibliographicItem]
249
223
  def bibitem(**args)
250
224
  BipmBibliographicItem.new(
251
- fetched: Date.today.to_s, type: "standard", language: ["en"], script: ["Latn"], **args
225
+ fetched: Date.today.to_s, type: "standard", language: ["en"], script: ["Latn"], **args,
252
226
  )
253
227
  end
254
228
 
@@ -291,7 +265,7 @@ module RelatonBipm
291
265
  # @return [Array<Hash>]
292
266
  def btcontrib(bibtex)
293
267
  surname, initial = bibtex.author.split ", "
294
- initial = initial.split(" ").map { |i| RelatonBib::LocalizedString.new i, "en", "Latn" }
268
+ initial = initial.split.map { |i| RelatonBib::LocalizedString.new i, "en", "Latn" }
295
269
  surname = RelatonBib::LocalizedString.new surname, "en", "Latn"
296
270
  name = RelatonBib::FullName.new surname: surname, initial: initial
297
271
  author = RelatonBib::Person.new name: name
@@ -31,7 +31,7 @@ module RelatonBipm
31
31
  # @param prefix [String]
32
32
  # @return [String]
33
33
  def to_asciibib(prefix)
34
- pref = prefix.empty? ? prefix : prefix + "."
34
+ pref = prefix.empty? ? prefix : "#{prefix}."
35
35
  pref += "commentperiod"
36
36
  out = "#{pref}.from:: #{from}\n"
37
37
  out += "#{pref}.to:: #{to}\n" if to
@@ -28,7 +28,7 @@ module RelatonBipm
28
28
  # @param count [Integer]
29
29
  # @return [String]
30
30
  def to_asciibib(prefix, count = 1)
31
- pref = prefix.empty? ? prefix : prefix + "."
31
+ pref = prefix.empty? ? prefix : "#{prefix}."
32
32
  pref += "committee"
33
33
  out = count > 1 ? "#{pref}::\n" : ""
34
34
  out += "#{pref}.acronym:: #{acronym}\n"
@@ -39,8 +39,9 @@ module RelatonBipm
39
39
  def to_hash
40
40
  hash = { "acronym" => acronym }
41
41
  cnt = content.to_hash
42
- if cnt.is_a? Array then hash["variants"] = cnt
43
- elsif cnt.is_a? Hash then hash.merge! cnt
42
+ case cnt
43
+ when Array then hash["variants"] = cnt
44
+ when Hash then hash.merge! cnt
44
45
  else hash["content"] = cnt
45
46
  end
46
47
  hash
@@ -23,7 +23,7 @@ module RelatonBipm
23
23
  # @param prefix [String]
24
24
  # @return [String]
25
25
  def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize
26
- pref = prefix.empty? ? prefix : prefix + "."
26
+ pref = prefix.empty? ? prefix : "#{prefix}."
27
27
  pref += "editorialgroup"
28
28
  out = ""
29
29
  committee.each { |c| out += c.to_asciibib pref, committee.size }
@@ -23,14 +23,13 @@ module RelatonBipm
23
23
  # @param item_hash [Hash]
24
24
  # @return [RelatonBib::BibliographicItem]
25
25
  def bib_item(item_hash)
26
- BipmBibliographicItem.new **item_hash
26
+ BipmBibliographicItem.new(**item_hash)
27
27
  end
28
28
 
29
29
  # @param ret [Hash]
30
30
  def title_hash_to_bib(ret)
31
- ret[:title] &&= array(ret[:title]).reduce(
32
- RelatonBib::TypedTitleStringCollection.new
33
- ) do |m, t|
31
+ ret[:title] &&= array(ret[:title])
32
+ .reduce(RelatonBib::TypedTitleStringCollection.new) do |m, t|
34
33
  m << if t.is_a? Hash
35
34
  RelatonBib::TypedTitleString.new(**t)
36
35
  else
@@ -55,16 +54,14 @@ module RelatonBipm
55
54
  # @param ret [Hash]
56
55
  def dates_hash_to_bib(ret)
57
56
  super
58
- ret[:date] &&= ret[:date].map do |d|
59
- BibliographicDate.new **d
60
- end
57
+ ret[:date] &&= ret[:date].map { |d| BibliographicDate.new(**d) }
61
58
  end
62
59
 
63
60
  # @param ret [Hash]
64
61
  def relations_hash_to_bib(ret)
65
62
  super
66
63
  ret[:relation] &&= ret[:relation].map do |r|
67
- RelatonBipm::DocumentRelation.new **r
64
+ RelatonBipm::DocumentRelation.new(**r)
68
65
  end
69
66
  end
70
67
 
@@ -77,7 +74,7 @@ module RelatonBipm
77
74
  content = RelatonBib::LocalizedString.new vars
78
75
  Committee.new acronym: c[:acronym], content: content
79
76
  else
80
- Committee.new **c
77
+ Committee.new(**c)
81
78
  end
82
79
  end
83
80
  wg = array(ret[:editorialgroup][:workgroup]).map do |w|
@@ -100,7 +97,7 @@ module RelatonBipm
100
97
  # @param ret [Hash]
101
98
  def structuredidentifier_hash_to_bib(ret)
102
99
  ret[:structuredidentifier] &&= StructuredIdentifier.new(
103
- **ret[:structuredidentifier]
100
+ **ret[:structuredidentifier],
104
101
  )
105
102
  end
106
103
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.8.0".freeze
2
+ VERSION = "1.9.1".freeze
3
3
  end
@@ -20,7 +20,7 @@ module RelatonBipm
20
20
  # @param item_hash [Hash]
21
21
  # @return [RelatonBipm::BipmBibliographicItem]
22
22
  def bib_item(item_hash)
23
- BipmBibliographicItem.new **item_hash
23
+ BipmBibliographicItem.new(**item_hash)
24
24
  end
25
25
 
26
26
  # @param item [Nokogiri::XML::Element]
data/relaton_bipm.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
12
12
  "bibliographic use using the BibliographicItem model"
13
13
  spec.homepage = "https://github.com/relaton/relaton-bipm"
14
14
  spec.license = "BSD-2-Clause"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
16
16
 
17
17
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
18
18
 
@@ -36,14 +36,14 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
36
36
  # spec.add_development_dependency "debase"
37
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
38
38
  spec.add_development_dependency "pry-byebug"
39
- spec.add_development_dependency "rake", "~> 10.0"
39
+ # spec.add_development_dependency "rake", "~> 13.0"
40
40
  # spec.add_development_dependency "ruby-debug-ide"
41
41
  spec.add_development_dependency "ruby-jing"
42
42
  spec.add_development_dependency "simplecov"
43
43
  spec.add_development_dependency "vcr"
44
44
  spec.add_development_dependency "webmock"
45
45
 
46
- spec.add_dependency "mechanize", "~> 2.7.0"
47
- spec.add_dependency "relaton-bib", "~> 1.8.0"
46
+ spec.add_dependency "mechanize", "~> 2.8.0"
47
+ spec.add_dependency "relaton-bib", "~> 1.9.0"
48
48
  spec.add_dependency "serrano", "~> 1.0"
49
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-17 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  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
55
  - !ruby/object:Gem::Dependency
70
56
  name: ruby-jing
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -128,28 +114,28 @@ dependencies:
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: 2.7.0
117
+ version: 2.8.0
132
118
  type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: 2.7.0
124
+ version: 2.8.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: relaton-bib
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: 1.8.0
131
+ version: 1.9.0
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: 1.8.0
138
+ version: 1.9.0
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: serrano
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -218,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
204
  requirements:
219
205
  - - ">="
220
206
  - !ruby/object:Gem::Version
221
- version: 2.4.0
207
+ version: 2.5.0
222
208
  required_rubygems_version: !ruby/object:Gem::Requirement
223
209
  requirements:
224
210
  - - ">="