relaton-ieee 1.16.1 → 1.16.3

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: 4776aa01882239661d49f30ea9783fb75aa0a767118ed9fb87b456bb5284fbdf
4
- data.tar.gz: cf54b9c410b1e1d533e355c55609eb509da7d57a8a777eee85ae43c3f19e760b
3
+ metadata.gz: f7048767fa74b6c8decd55108cf55dcd3e8547d37fb929b673f7b7721ed67f57
4
+ data.tar.gz: c04a8ba724bbd38e0de394b80a319d629f9f42045ac6133861ee1d4ae6247103
5
5
  SHA512:
6
- metadata.gz: b47ad55bd3dd0b063ab0cc4703dfe1a3a52b801ab27e7802b5247ed2f8d7e08ed2d59e167b193a102239d2457c68578d33c50c01350255d41a6a451c2768852d
7
- data.tar.gz: d6d8b7de8e9a50cb90f977f3e503dbcac671157e5025d75ccbf6b6e71a342d6936146118244cea4be6200048a24530ad1f8d19381411d3f9e96d649be585f808
6
+ metadata.gz: 2384b71e26cbc6c95ad6fccff1852971d442c3c445578f26a2d380fbc54913665ed1e7c7240978da31dd567a5f327b8736485b03c6636ff25d7ffb67716963dc
7
+ data.tar.gz: 63d840ef41faaf02d8680f7dbb81a341e0e51dc681b284d8d07628fe5cdbce9529189f08561c79144d143632566e7473bab04ac34a6acc8ef87427e617f87a45
data/README.adoc CHANGED
@@ -23,13 +23,24 @@ Or install it yourself as:
23
23
 
24
24
  == Usage
25
25
 
26
- === Search for a standard using keywords
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] ("IEEE 528-2019") fetching...
77
- [relaton-ieee] ("IEEE 528-2019") found IEEE 528-2019
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
  ----
@@ -5,7 +5,7 @@ module RelatonIeee
5
5
 
6
6
  def initialize(value:, abbreviation: nil)
7
7
  unless STAGES.include?(value.downcase)
8
- Util.warn "Stage value must be one of `#{STAGES.join('`, `')}`"
8
+ Util.warn "Stage value must be one of: `#{STAGES.join('`, `')}`"
9
9
  end
10
10
  super
11
11
  end
@@ -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 "invalid doctype `#{args[:doctype]}`. " \
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 "invalid docsubtype `#{args[:docsubtype]}`. " \
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}) fetching..."
41
+ Util.warn "(#{code}) Fetching from Relaton repository ..."
42
42
  item = search(code)
43
43
  if item
44
- Util.warn "(#{code}) found `#{item.docidentifier.first.id}`"
44
+ Util.warn "(#{code}) Found: `#{item.docidentifier.first.id}`"
45
45
  item
46
46
  else
47
- Util.warn "(#{code}) not found"
47
+ Util.warn "(#{code}) Not found."
48
48
  nil
49
49
  end
50
50
  end
@@ -7,7 +7,7 @@ module RelatonIeee
7
7
  def initialize # rubocop:disable Lint/MissingSuper
8
8
  @short = :relaton_ieee
9
9
  @prefix = "IEEE"
10
- @defaultprefix = %r{^(?:ANSI/)?IEEE\s}
10
+ @defaultprefix = %r{^(?:(?:(?:ANSI|NACE)/)?IEEE|ANSI|AIEE|ASA|NACE|IRE)\s}
11
11
  @idtype = "IEEE"
12
12
  @datasets = %w[ieee-rawbib]
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonIeee
2
- VERSION = "1.16.1".freeze
2
+ VERSION = "1.16.3".freeze
3
3
  end
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.1
4
+ version: 1.16.3
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-09-21 00:00:00.000000000 Z
11
+ date: 2023-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday