relaton-iana 1.14.3 → 1.16.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: dbfa9e6bb7c8bdc2772554010aaedc00425f0f43d757ac6d0a4b22688a9e52d7
4
- data.tar.gz: 67b12ec014b790910297134c3a8b5fccc6ad14c9f0f085038942a26afd8b3bbb
3
+ metadata.gz: b9e7fe65f2c63a9d011127f013f61f5bd85b1dc32043f80eb2eb2653755facd4
4
+ data.tar.gz: d0cc07f003041384cfe5c43bdff9f7bfa399ab37c752446746fe3d52b454107e
5
5
  SHA512:
6
- metadata.gz: 5c5d6e87589523a0eda7d29f9cc99f70fb541f62b2be4e60ab286356fda69eaa1f7a3afc9de8359fbef33618a3d1573204632a845c305c802223cd6a6789733a
7
- data.tar.gz: a0dab69a5515878c328fd837e048c6b9e47f44803d33ed3cf0e07bfea53f55223d7b8693bf1775b8f9fec7aa3651b13350fcdcf9dc2a07e4ed5a83f42f878c26
6
+ metadata.gz: ba25eadde028828f0a016fc4ee186166c5e012062ef8f46838d1ddb401768da7680321cd73469fe1cfe1032e1b6d37b26c8c121e26d98ae8065340101e2d8124
7
+ data.tar.gz: 269afa4728fb2bdd13722c8a3b91df76bef7dec287eb004d7c5ac1d240bc6e72a75860acd777ad46587119c11b95932f1314d43d9b996f5fe8755f371dd90748
@@ -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/Gemfile CHANGED
@@ -9,6 +9,7 @@ gem "rake", "~> 13.0"
9
9
 
10
10
  gem "rspec", "~> 3.0"
11
11
 
12
+ gem "equivalent-xml", "~> 0.6"
12
13
  gem "rubocop", "~> 1.7"
13
14
  gem "rubocop-performance"
14
15
  gem "rubocop-rails"
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>
@@ -0,0 +1,10 @@
1
+ module RelatonIana
2
+ module Config
3
+ include RelatonBib::Config
4
+ end
5
+ extend Config
6
+
7
+ class Configuration < RelatonBib::Configuration
8
+ PROGNAME = "relaton-iana".freeze
9
+ end
10
+ end
@@ -34,11 +34,14 @@ module RelatonIana
34
34
  # @param opts [Hash] options
35
35
  # @return [RelatonIana::IanaBibliographicItem]
36
36
  def get(ref, _year = nil, _opts = {})
37
- warn "[relaton-iana] (\"#{ref}\") fetching..."
37
+ Util.warn "(#{ref}) fetching..."
38
38
  result = search(ref)
39
- return unless result
39
+ unless result
40
+ Util.warn "(#{ref}) not found"
41
+ return
42
+ end
40
43
 
41
- warn "[relaton-iana] (\"#{ref}\") found #{result.docidentifier[0].id}"
44
+ Util.warn "(#{ref}) found `#{result.docidentifier[0].id}`"
42
45
  result
43
46
  end
44
47
 
@@ -0,0 +1,9 @@
1
+ module RelatonIana
2
+ module Util
3
+ extend RelatonBib::Util
4
+
5
+ def self.logger
6
+ RelatonIana.configuration.logger
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIana
4
- VERSION = "1.14.3"
4
+ VERSION = "1.16.1"
5
5
  end
data/lib/relaton_iana.rb CHANGED
@@ -4,6 +4,8 @@ require "faraday"
4
4
  require "relaton/index"
5
5
  require "relaton_bib"
6
6
  require_relative "relaton_iana/version"
7
+ require_relative "relaton_iana/config"
8
+ require_relative "relaton_iana/util"
7
9
  require_relative "relaton_iana/iana_bibliographic_item"
8
10
  require_relative "relaton_iana/xml_parser"
9
11
  require_relative "relaton_iana/hash_converter"
@@ -17,9 +19,9 @@ module RelatonIana
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 RelatonIana::VERSION + RelatonBib::VERSION # grammars
24
26
  end
25
27
  end
data/relaton_iana.gemspec CHANGED
@@ -30,10 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_development_dependency "equivalent-xml", "~> 0.6"
34
-
35
33
  spec.add_dependency "faraday", "~> 2.7.0"
36
- spec.add_dependency "relaton-bib", "~> 1.14.0"
34
+ spec.add_dependency "relaton-bib", "~> 1.16.0"
37
35
  spec.add_dependency "relaton-index", "~> 0.2.0"
38
36
 
39
37
  # Uncomment to register a new dependency of your gem
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.3
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-25 00:00:00.000000000 Z
11
+ date: 2023-09-20 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
13
  - !ruby/object:Gem::Dependency
28
14
  name: faraday
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +30,14 @@ dependencies:
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 1.14.0
33
+ version: 1.16.0
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 1.14.0
40
+ version: 1.16.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: relaton-index
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -91,12 +77,14 @@ files:
91
77
  - grammars/relaton-iana-compile.rng
92
78
  - grammars/relaton-iana.rng
93
79
  - lib/relaton_iana.rb
80
+ - lib/relaton_iana/config.rb
94
81
  - lib/relaton_iana/data_fetcher.rb
95
82
  - lib/relaton_iana/hash_converter.rb
96
83
  - lib/relaton_iana/iana_bibliographic_item.rb
97
84
  - lib/relaton_iana/iana_bibliography.rb
98
85
  - lib/relaton_iana/parser.rb
99
86
  - lib/relaton_iana/processor.rb
87
+ - lib/relaton_iana/util.rb
100
88
  - lib/relaton_iana/version.rb
101
89
  - lib/relaton_iana/xml_parser.rb
102
90
  - relaton_iana.gemspec