relaton-calconnect 1.14.2 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 181a7e1a48eb95ff2558f0895621f59fb8a52f167c0ccac81433f5346e52e38a
4
- data.tar.gz: a24dae24e0803340a07ddf3882a0343bb8ba52f05bb2d923df016d33dfd4e7cb
3
+ metadata.gz: 61a4cc200fc734369371f45f1333152f0680a618d00789df5e2eb59d67ffedff
4
+ data.tar.gz: 79b164ad5afcffd22d57d6ca80edf4cb17ceb7302151be4d9267633c835f4600
5
5
  SHA512:
6
- metadata.gz: aab8cae2f19844f9a7d8d999b568d16f1a22344d88d3df81f924ef0e7c225f58d0c05616b6f6b73e3a6d3b8b116bc3df7c33e5ca3f3cd187391c1b7d4d4163fc
7
- data.tar.gz: 12b98b7c9ae142bebd87bf4201889c471f28b5c477dc364936e0d94d3c6a3a0c1dd4a8a01cce9367b44183a2fcde70bdde43a50d2f58da04433318ab2f58939a
6
+ metadata.gz: 50e66f424c080ee02333e8af0c49b130c27303c0ec737191a0d201b2f111331748011f6835c0ab2f87fa56db3260fb795272b33576d1ef0b34fc9fb4914fe5af
7
+ data.tar.gz: db45ccdedfa3f1885445592fe7ff5a0fed0305ffcfda55a0cee8bd083e55c64842817ebdde40a4191e9750bdf91aeea0e3be28ae1d051be67971ae8f9bce3791
@@ -7,7 +7,8 @@ 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
14
  repository_dispatch:
data/grammars/biblio.rng CHANGED
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -29,11 +29,11 @@ module RelatonCalconnect
29
29
  end
30
30
  end
31
31
 
32
- warn "[relaton-calconnect] (\"#{ref}\") fetching..."
32
+ Util.warn "(#{ref}) fetching..."
33
33
  result = search(code, year, opts) || (return nil)
34
34
  ret = bib_results_filter(result, year)
35
35
  if ret[:ret]
36
- warn "[relaton-calconnect] (\"#{ref}\") found #{ret[:ret].docidentifier.first.id}"
36
+ Util.warn "(#{ref}) found `#{ret[:ret].docidentifier.first.id}`"
37
37
  ret[:ret]
38
38
  else
39
39
  fetch_ref_err(code, year, ret[:years])
@@ -73,12 +73,12 @@ module RelatonCalconnect
73
73
  # @param year [String]
74
74
  # @param missed_years [Array<Strig>]
75
75
  def fetch_ref_err(code, year, missed_years)
76
- id = year ? "#{code} year #{year}" : code
77
- warn "[relaton-calconnect] WARNING: no match found online for #{id}. " \
78
- "The code must be exactly like it is on the standards website."
76
+ id = year ? "`#{code}` year `#{year}`" : code
77
+ Util.warn "WARNING: no match found online for #{id}. " \
78
+ "The code must be exactly like it is on the standards website."
79
79
  unless missed_years.empty?
80
- warn "[relaton-calconnect] (There was no match for #{year}, though " \
81
- "there were matches found for #{missed_years.join(', ')}.)"
80
+ Util.warn "(There was no match for `#{year}`, though there " \
81
+ "were matches found for `#{missed_years.join('`, `')}`.)"
82
82
  end
83
83
  nil
84
84
  end
@@ -0,0 +1,10 @@
1
+ module RelatonCalconnect
2
+ module Config
3
+ include RelatonBib::Config
4
+ end
5
+ extend Config
6
+
7
+ class Configuration < RelatonBib::Configuration
8
+ PROGNAME = "relaton-calconnect".freeze
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ module RelatonCalconnect
2
+ module Util
3
+ extend RelatonBib::Util
4
+
5
+ def self.logger
6
+ RelatonCalconnect.configuration.logger
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module RelatonCalconnect
2
- VERSION = "1.14.2".freeze
2
+ VERSION = "1.16.1".freeze
3
3
  end
@@ -3,7 +3,7 @@ module RelatonCalconnect
3
3
  class << self
4
4
  # override RelatonBib::BibliographicItem.bib_item method
5
5
  # @param item_hash [Hash]
6
- # @return [RelatonIsoBib::IsoBibliographicItem]
6
+ # @return [RelatonCalconnect::CcBibliographicItem]
7
7
  def bib_item(item_hash)
8
8
  CcBibliographicItem.new(**item_hash)
9
9
  end
@@ -1,6 +1,8 @@
1
1
  require "relaton/index"
2
2
  require "relaton_bib"
3
3
  require "relaton_calconnect/version"
4
+ require "relaton_calconnect/config"
5
+ require "relaton_calconnect/util"
4
6
  require "relaton_calconnect/cc_bibliography"
5
7
  require "relaton_calconnect/hit_collection"
6
8
  require "relaton_calconnect/hit"
@@ -17,9 +19,9 @@ module RelatonCalconnect
17
19
  # Returns hash of XML reammar
18
20
  # @return [String]
19
21
  def self.grammar_hash
20
- gem_path = File.expand_path "..", __dir__
21
- grammars_path = File.join gem_path, "grammars", "*"
22
- grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
23
- Digest::MD5.hexdigest grammars
22
+ # gem_path = File.expand_path "..", __dir__
23
+ # grammars_path = File.join gem_path, "grammars", "*"
24
+ # grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
25
+ Digest::MD5.hexdigest RelatonCalconnect::VERSION + RelatonBib::VERSION # grammars
24
26
  end
25
27
  end
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
28
28
 
29
29
  spec.add_dependency "faraday", "~> 2.7.0"
30
- spec.add_dependency "relaton-bib", "~> 1.14.0"
30
+ spec.add_dependency "relaton-bib", "~> 1.16.0"
31
31
  spec.add_dependency "relaton-index", "~> 0.2.0"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-calconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.2
4
+ version: 1.16.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: 2023-05-24 00:00:00.000000000 Z
11
+ date: 2023-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.14.0
33
+ version: 1.16.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.14.0
40
+ version: 1.16.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: relaton-index
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,7 @@ files:
80
80
  - lib/relaton_calconnect.rb
81
81
  - lib/relaton_calconnect/cc_bibliographic_item.rb
82
82
  - lib/relaton_calconnect/cc_bibliography.rb
83
+ - lib/relaton_calconnect/config.rb
83
84
  - lib/relaton_calconnect/data_fetcher.rb
84
85
  - lib/relaton_calconnect/hash_converter.rb
85
86
  - lib/relaton_calconnect/hit.rb
@@ -87,6 +88,7 @@ files:
87
88
  - lib/relaton_calconnect/processor.rb
88
89
  - lib/relaton_calconnect/scrapper.rb
89
90
  - lib/relaton_calconnect/technical_committee.rb
91
+ - lib/relaton_calconnect/util.rb
90
92
  - lib/relaton_calconnect/version.rb
91
93
  - lib/relaton_calconnect/xml_parser.rb
92
94
  - relaton_calconnect.gemspec