relaton-doi 1.14.4 → 1.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -1
- data/README.adoc +14 -0
- data/lib/relaton_doi/config.rb +10 -0
- data/lib/relaton_doi/crossref.rb +5 -2
- data/lib/relaton_doi/processor.rb +1 -1
- data/lib/relaton_doi/util.rb +9 -0
- data/lib/relaton_doi/version.rb +1 -1
- data/lib/relaton_doi.rb +9 -0
- data/relaton-doi.gemspec +5 -5
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '058c5f5551b87b97c9233448210c2e19394a590fc83fffbb28a925d9b9a88c5c'
|
4
|
+
data.tar.gz: a2231749ac4c0e15b626dba1b95977562e7f19a2f9937193383e421f1cafc020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b80efebfe1483f54f358b55cc451fc6786d9f79ebad8ca511a6a979e284f9c59b9b7335b66bbf34734e874fb6fefac19d38fa7c87ab5ce5891cc7cf91fc8018b
|
7
|
+
data.tar.gz: af171143ae77d7550d01dc45616a667f951efe49551ce202e2dea71f6410fc52c837f8407718d496810143f985d937c400303dd7acd56c39098300608df4d05d
|
@@ -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/README.adoc
CHANGED
@@ -39,6 +39,20 @@ $ gem install relaton-doi
|
|
39
39
|
|
40
40
|
== Usage
|
41
41
|
|
42
|
+
=== Configuration
|
43
|
+
|
44
|
+
Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `RelatonDoi.configure` block.
|
45
|
+
|
46
|
+
[source,ruby]
|
47
|
+
----
|
48
|
+
require 'relaton_doi'
|
49
|
+
=> true
|
50
|
+
|
51
|
+
RelatonDoi.configure do |config|
|
52
|
+
config.logger.level = Logger::DEBUG
|
53
|
+
end
|
54
|
+
----
|
55
|
+
|
42
56
|
=== Retrieving items of known type using DOI
|
43
57
|
|
44
58
|
If the resulting bibliographic item returned from CrossRef is a known Relaton
|
data/lib/relaton_doi/crossref.rb
CHANGED
@@ -12,11 +12,14 @@ module RelatonDoi
|
|
12
12
|
# RelatonNist::NistBibliographicItem] The bibitem.
|
13
13
|
#
|
14
14
|
def get(doi)
|
15
|
-
warn "
|
15
|
+
Util.warn "(#{doi}) fetching..."
|
16
16
|
id = doi.sub(%r{^doi:}, "")
|
17
17
|
message = get_by_id id
|
18
|
-
warn "
|
18
|
+
Util.warn "(#{doi}) found `#{message['DOI']}`"
|
19
19
|
Parser.parse message
|
20
|
+
rescue Serrano::NotFound
|
21
|
+
Util.warn "(#{doi}) not found"
|
22
|
+
nil
|
20
23
|
end
|
21
24
|
|
22
25
|
#
|
data/lib/relaton_doi/version.rb
CHANGED
data/lib/relaton_doi.rb
CHANGED
@@ -8,6 +8,8 @@ require "relaton_ietf"
|
|
8
8
|
require "relaton_ieee"
|
9
9
|
require "relaton_nist"
|
10
10
|
require_relative "relaton_doi/version"
|
11
|
+
require_relative "relaton_doi/config"
|
12
|
+
require_relative "relaton_doi/util"
|
11
13
|
require_relative "relaton_doi/parser"
|
12
14
|
require_relative "relaton_doi/crossref"
|
13
15
|
|
@@ -16,4 +18,11 @@ Serrano.configuration do |config|
|
|
16
18
|
end
|
17
19
|
|
18
20
|
module RelatonDoi
|
21
|
+
extend self
|
22
|
+
|
23
|
+
def grammar_hash
|
24
|
+
Digest::MD5.hexdigest(
|
25
|
+
RelatonNist::VERSION + RelatonIetf::VERSION + RelatonIeee::VERSION + RelatonBipm::VERSION + RelatonBib::VERSION,
|
26
|
+
)
|
27
|
+
end
|
19
28
|
end
|
data/relaton-doi.gemspec
CHANGED
@@ -34,11 +34,11 @@ Gem::Specification.new do |spec|
|
|
34
34
|
# Uncomment to register a new dependency of your gem
|
35
35
|
# spec.add_dependency "example-gem", "~> 1.0"
|
36
36
|
|
37
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
38
|
-
spec.add_dependency "relaton-bipm", "~> 1.
|
39
|
-
spec.add_dependency "relaton-ieee", "~> 1.
|
40
|
-
spec.add_dependency "relaton-ietf", "~> 1.
|
41
|
-
spec.add_dependency "relaton-nist", "~> 1.
|
37
|
+
spec.add_dependency "relaton-bib", "~> 1.16.0"
|
38
|
+
spec.add_dependency "relaton-bipm", "~> 1.16.0"
|
39
|
+
spec.add_dependency "relaton-ieee", "~> 1.16.0"
|
40
|
+
spec.add_dependency "relaton-ietf", "~> 1.16.0"
|
41
|
+
spec.add_dependency "relaton-nist", "~> 1.16.0"
|
42
42
|
# spec.add_dependency "relaton-w3c", "~> 1.10.0"
|
43
43
|
spec.add_dependency "serrano", "~> 1.4.0"
|
44
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-doi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
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-
|
11
|
+
date: 2023-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton-bib
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.16.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: relaton-bipm
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
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.
|
40
|
+
version: 1.16.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-ieee
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.16.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.16.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: relaton-ietf
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.16.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.16.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: relaton-nist
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.16.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 1.16.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: serrano
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,9 +115,11 @@ files:
|
|
115
115
|
- bin/rspec
|
116
116
|
- bin/setup
|
117
117
|
- lib/relaton_doi.rb
|
118
|
+
- lib/relaton_doi/config.rb
|
118
119
|
- lib/relaton_doi/crossref.rb
|
119
120
|
- lib/relaton_doi/parser.rb
|
120
121
|
- lib/relaton_doi/processor.rb
|
122
|
+
- lib/relaton_doi/util.rb
|
121
123
|
- lib/relaton_doi/version.rb
|
122
124
|
- relaton-doi.gemspec
|
123
125
|
homepage: https://github.com/relaton/relaton-doi
|