relaton-cli 1.18.1 → 1.19.0

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: 7868403c6d6c286eec16cc4f9edf15c54f5ee1d0afb7e6065976342602d3ae66
4
- data.tar.gz: 48db249ce5c7e4800aee49426fdc740007dda34323813db93b2ffe1f429b75c5
3
+ metadata.gz: c4cc7b7a7da76d043e0da80641006a5e90b76ba6983c19adca9940130619b26d
4
+ data.tar.gz: 7c81c109a19135188353a97d243445ea141cec69211404514f00899ee2182826
5
5
  SHA512:
6
- metadata.gz: 6c3b3d3aa9490a9541488afcb21465af1a171a9938fdd41a94189aa8701fe6641496a84fb9b21293d97ee5b8fd9db6cdbbfcef12b7f80ead42bf91495e06b249
7
- data.tar.gz: 2ca49b30d7c00720a649a1556a77443feae1061044cfb137f22000fbf5c2e7daa132032d5aeed20d9c599e7d7b7b0f7753e6cbd3f3bd09c3bd8b1812625fbdb8
6
+ metadata.gz: 7e7b4b0485d49cb95fd10e3557551095516fccd041fff16707b4143047e9a1e07cc00d6eb9e8a5e9384e32bd9f0fb783eac170d320d3c74d633f9e2d38b951a5
7
+ data.tar.gz: 13c1eba87f92bb02d2b5d5af83e10ccac18c36143452af40b61af24a4ac39bae402bd664b71aa634a33cbd43bc66491a4a2ea25c74d558867062794d7a4403a7
@@ -161,9 +161,12 @@ module Relaton
161
161
 
162
162
  no_commands do
163
163
  def relaton_config
164
- log_type = options[:verbose] ? ::Logger::INFO : ::Logger::WARN
165
- Relaton.configure do |conf|
166
- conf.logger.level = log_type
164
+ Relaton::Logger.configure do |conf|
165
+ if options[:verbose]
166
+ conf.logger_pool[:default].add_level :info
167
+ else
168
+ conf.logger_pool[:default].remove_level :info
169
+ end
167
170
  end
168
171
  end
169
172
  end
@@ -4,7 +4,7 @@ module Relaton
4
4
  def fetch(source, options)
5
5
  processor = Relaton::Registry.instance.find_processor_by_dataset source
6
6
  unless processor
7
- Util.warn "WARNING: no processor found for `#{source}`"
7
+ Util.warn "no processor found for `#{source}`"
8
8
  return
9
9
  end
10
10
 
@@ -114,7 +114,7 @@ module Relaton
114
114
  coll = read_collection colfile
115
115
  coll << doc
116
116
  File.write colfile, coll.to_yaml, encoding: "UTF-8"
117
- else Util.warn "No matching bibliographic entry found"
117
+ else Util.info "No matching bibliographic entry found"
118
118
  end
119
119
  end
120
120
 
@@ -165,7 +165,7 @@ module Relaton
165
165
  def read_yaml(file)
166
166
  YAML.load_file file if File.file? file
167
167
  rescue Psych::SyntaxError
168
- Util.warn "WARNING: the file `#{file}` isn't a collection."
168
+ Util.error "the file `#{file}` isn't a collection."
169
169
  nil
170
170
  end
171
171
 
@@ -2,10 +2,7 @@ module Relaton
2
2
  module Cli
3
3
  module Util
4
4
  extend RelatonBib::Util
5
-
6
- def self.logger
7
- Relaton::Cli.configuration.logger
8
- end
5
+ PROGNAME = "relaton-cli".freeze
9
6
  end
10
7
  end
11
8
  end
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "1.18.1".freeze
3
+ VERSION = "1.19.0".freeze
4
4
  end
5
5
  end
data/lib/relaton/cli.rb CHANGED
@@ -2,7 +2,6 @@ require "thor"
2
2
  require "thor/hollaback"
3
3
  require "relaton"
4
4
  require "relaton/cli/version"
5
- require_relative "cli/config"
6
5
  require_relative "cli/util"
7
6
  require_relative "cli/command"
8
7
 
data/relaton-cli.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.required_ruby_version = ">= 3.0.0"
24
24
 
25
25
  spec.add_runtime_dependency "liquid", "~> 5"
26
- spec.add_runtime_dependency "relaton", "~> 1.18.2"
26
+ spec.add_runtime_dependency "relaton", "~> 1.19.0"
27
27
  spec.add_runtime_dependency "thor"
28
28
  spec.add_runtime_dependency "thor-hollaback"
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.1
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-07 00:00:00.000000000 Z
11
+ date: 2024-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.18.2
33
+ version: 1.19.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.18.2
40
+ version: 1.19.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,7 +98,6 @@ files:
98
98
  - lib/relaton/cli.rb
99
99
  - lib/relaton/cli/base_convertor.rb
100
100
  - lib/relaton/cli/command.rb
101
- - lib/relaton/cli/config.rb
102
101
  - lib/relaton/cli/data_fetcher.rb
103
102
  - lib/relaton/cli/full_text_search.rb
104
103
  - lib/relaton/cli/relaton_file.rb
@@ -1,12 +0,0 @@
1
- module Relaton
2
- module Cli
3
- module Config
4
- include RelatonBib::Config
5
- end
6
- extend Config
7
-
8
- class Configuration < RelatonBib::Configuration
9
- PROGNAME = "relaton-cli".freeze
10
- end
11
- end
12
- end