relaton-ieee 1.16.1 → 1.16.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e079c3a74f3f1ee1a1c3571fad7415228bc2f97e302612adf3d308bd799f613
|
4
|
+
data.tar.gz: 56928364c2d39df1e75e2034348e0ae25dad573b6e99d4ebe7d6c2faf9419abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6298c1fb4d18e8cc8c03535978d5bfd1ab632fe6d772dde22357a5196da75a812bffbb53fea47b52017fa6e55fbcf41257c5140f8cebe2d8e2ec7d45a61f6697
|
7
|
+
data.tar.gz: 5137a02683f0bc8dd1032f216f574d2f9ecdc000a12faa807b0604467ef4c4c7e0339822cf7d603f1bbae3b8c7cde20eb5df070c77dc5b04030a50b055e01cc8
|
data/README.adoc
CHANGED
@@ -23,13 +23,24 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
== Usage
|
25
25
|
|
26
|
-
===
|
26
|
+
=== Configuration
|
27
|
+
|
28
|
+
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 `RelatonIeee.configure` block.
|
27
29
|
|
28
30
|
[source,ruby]
|
29
31
|
----
|
30
32
|
require 'relaton_ieee'
|
31
33
|
=> true
|
32
34
|
|
35
|
+
RelatonIeee.configure do |config|
|
36
|
+
config.logger.level = Logger::DEBUG
|
37
|
+
end
|
38
|
+
----
|
39
|
+
|
40
|
+
=== Search for a standard using keywords
|
41
|
+
|
42
|
+
[source,ruby]
|
43
|
+
----
|
33
44
|
item = RelatonIeee::IeeeBibliography.search("IEEE 528-2019")
|
34
45
|
=> #<RelatonIeee::IeeeBibliographicItem:0x00007fe12ebc8cb8
|
35
46
|
...
|
@@ -73,8 +84,8 @@ item.to_xml bibdata: true
|
|
73
84
|
[source,ruby]
|
74
85
|
----
|
75
86
|
RelatonIeee::IeeeBibliography.get("IEEE 528-2019")
|
76
|
-
[relaton-ieee] (
|
77
|
-
[relaton-ieee] (
|
87
|
+
[relaton-ieee] (IEEE 528-2019) fetching...
|
88
|
+
[relaton-ieee] (IEEE 528-2019) found `IEEE 528-2019`
|
78
89
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007fceb52a6e40
|
79
90
|
...
|
80
91
|
----
|
@@ -25,11 +25,11 @@ module RelatonIeee
|
|
25
25
|
#
|
26
26
|
def initialize(**args) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
27
27
|
if args[:doctype] && !DOCTYPES.include?(args[:doctype])
|
28
|
-
Util.warn "
|
28
|
+
Util.warn "Invalid doctype: `#{args[:doctype]}`. " \
|
29
29
|
"It should be one of: `#{DOCTYPES.join('`, `')}`."
|
30
30
|
end
|
31
31
|
if args[:docsubtype] && !SUBTYPES.include?(args[:docsubtype])
|
32
|
-
Util.warn "
|
32
|
+
Util.warn "Invalid docsubtype: `#{args[:docsubtype]}`. " \
|
33
33
|
"It should be one of: `#{SUBTYPES.join('`, `')}`."
|
34
34
|
end
|
35
35
|
eg = args.delete(:editorialgroup)
|
@@ -38,13 +38,13 @@ module RelatonIeee
|
|
38
38
|
# if document is found else returns NilClass
|
39
39
|
#
|
40
40
|
def get(code, _year = nil, _opts = {}) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
41
|
-
Util.warn "(#{code})
|
41
|
+
Util.warn "(#{code}) Fetching from Relaton repository ..."
|
42
42
|
item = search(code)
|
43
43
|
if item
|
44
|
-
Util.warn "(#{code})
|
44
|
+
Util.warn "(#{code}) Found: `#{item.docidentifier.first.id}`"
|
45
45
|
item
|
46
46
|
else
|
47
|
-
Util.warn "(#{code})
|
47
|
+
Util.warn "(#{code}) Not found."
|
48
48
|
nil
|
49
49
|
end
|
50
50
|
end
|
data/lib/relaton_ieee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.2
|
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-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|