relaton-cli 1.15.3 → 1.15.5

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: ee715fcdbc10e796d236363c05c45f3d0a50f1a64f542274a25e8abf8909b996
4
- data.tar.gz: 23e164c5e9907b0d1a2fe917e4a65b1e7f0d2740e9caaaf0acb5804692cecddc
3
+ metadata.gz: 151725e983cf56f7b6d9317835473bd5e6ceb17f423c88793d1e13eea972e47c
4
+ data.tar.gz: 7611e6f1b8eb6a2894568a5c732141f0420d97f90b69d88755b58debd90e5419
5
5
  SHA512:
6
- metadata.gz: 89f6d0068c10ef1983ce9ab07c53fb389396b2ea37a9c47953d336c07cf3feb3d193a553658055636e740b6b742af3e384fe97cec0dec72c77e88069a87aa6b8
7
- data.tar.gz: a4f5ba155868d820b9ee3608c0d2eb746972c33857a4a1c20955cd6bdcfcea2fc63687949a0c5735ce7998ff9ca1a6760e3add59ac62436c25fa70dbc99744e8
6
+ metadata.gz: 664aa116e26a6bced9f0b5e97c838e557f4543c0cb76fe397b73be1740032150bf29c740902df2b438eec06b39e46823a048cef7c1b4cc70ca9f9fc7d1ca90d2
7
+ data.tar.gz: 1c166d27823de99cffbc4b3c4d9fb3bb86a03d0c0e856120b44bfa7479c6020627fbf37a11baf0780b3236293800c6695be82f5f2f8eceb17dad501429bd8a64
data/.gitignore CHANGED
@@ -8,6 +8,7 @@
8
8
  /tmp/
9
9
  /.pryrc
10
10
  /.rubocop-https*
11
+ /vendor/
11
12
 
12
13
  .rspec_status
13
14
  .vscode/
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 2.6
10
+ TargetRubyVersion: 2.7
11
11
  Rails:
12
12
  Enabled: true
data/Gemfile CHANGED
@@ -3,8 +3,13 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in gemspec
4
4
  gemspec
5
5
 
6
+ gem "byebug", "~> 11.0"
7
+ gem "equivalent-xml", "~> 0.6"
6
8
  gem "pry"
7
9
  gem "rake"
10
+ gem "rspec", "~> 3.0"
11
+ gem "rspec-command", "~> 1.0.3"
12
+ gem "rspec-core", "~> 3.4"
8
13
  gem "simplecov"
9
14
  gem "vcr"
10
15
  gem "webmock"
data/docs/README.adoc CHANGED
@@ -82,6 +82,7 @@ The following datasets are available:
82
82
  * `bipm-data-outcomes` - looks for the BIPM dataset in the local `./bipm-data-outcomes` directory. The dataset could be downloaded from https://github.com/metanorma/bipm-data-outcomes repository
83
83
  * `si-brochure` - looks for the SI-Brochure dataset in the local `./bipm-si-brocure` directory. The dataset could be downloaded from https://github.com/metanorma/bipm-si-brochure repository
84
84
  * `ecma-standards` - https://www.ecma-international.org/publications/standards/
85
+ * `itu-r` - https://extranet.itu.int/brdocsearch
85
86
 
86
87
  Options:
87
88
 
@@ -258,7 +259,7 @@ Convert a Relaton XML document into YAML, AsciiBib, or BibTex format. Allowed -f
258
259
  === relaton version
259
260
  ----
260
261
  $ relaton version
261
- CLI => 1.15.2
262
+ CLI => 1.15.3
262
263
  relaton => 1.15.1
263
264
  relaton-bib => 1.14.11
264
265
  relaton-iso-bib => 1.14.0
@@ -4,8 +4,8 @@ module Relaton
4
4
  include Relaton::Cli
5
5
  class_option :verbose, aliases: :v, type: :boolean, desc: "Output warnings"
6
6
 
7
- desc "create DIR", "Create new cache DB. Default DIR is "\
8
- "/home/user/.relaon/cache/"
7
+ desc "create DIR", "Create new cache DB. Default DIR is " \
8
+ "/home/user/.relaon/cache/"
9
9
 
10
10
  def create(dir = nil)
11
11
  db = Relaton.db (dir && File.expand_path(dir))
@@ -27,18 +27,19 @@ module Relaton
27
27
  desc "clear", "Clear cache DB"
28
28
 
29
29
  def clear
30
- Relaton.db.clear
30
+ db = Relaton.db
31
+ db.clear
31
32
  warn "Cache DB is cleared"
32
33
  end
33
34
 
34
- desc "fetch CODE", "Fetch Relaton XML for Standard identifier CODE from "\
35
- "cache DB"
36
- option :type, aliases: :t, desc: "Type of standard to "\
37
- "get bibliographic entry for"
38
- option :format, aliases: :f, desc: "Output format (xml, yaml, bibtex). "\
39
- "Default xml."
40
- option :year, aliases: :y, type: :numeric, desc: "Year the standard was "\
41
- "published"
35
+ desc "fetch CODE", "Fetch Relaton XML for Standard identifier CODE " \
36
+ "from cache DB"
37
+ option :type, aliases: :t, desc: "Type of standard to " \
38
+ "get bibliographic entry for"
39
+ option :format, aliases: :f, desc: "Output format (xml, yaml, bibtex). " \
40
+ "Default xml."
41
+ option :year, aliases: :y, type: :numeric, desc: "Year the standard " \
42
+ "was published"
42
43
 
43
44
  def fetch(code)
44
45
  io = IO.new($stdout.fcntl(::Fcntl::F_DUPFD), mode: "w:UTF-8")
@@ -46,12 +47,12 @@ module Relaton
46
47
  io.puts(fetch_document(code, opts) || supported_type_message)
47
48
  end
48
49
 
49
- desc "fetch_all TEXT", "Query for all documents in a cache DB for a "\
50
- "certain string"
50
+ desc "fetch_all TEXT", "Query for all documents in a cache DB for a " \
51
+ "certain string"
51
52
  option :edition, aliases: :e, desc: "Filter entries by edition"
52
53
  option :year, aliases: :y, desc: "Filter entries by year"
53
- option :format, aliases: :f, desc: "Output format (xml, yaml, bibtex). "\
54
- "Default xml."
54
+ option :format, aliases: :f, desc: "Output format (xml, yaml, bibtex). " \
55
+ "Default xml."
55
56
 
56
57
  def fetch_all(text = nil) # rubocop:disable Metrics/AbcSize
57
58
  io = IO.new($stdout.fcntl(::Fcntl::F_DUPFD), mode: "w:UTF-8")
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "1.15.3".freeze
3
+ VERSION = "1.15.5".freeze
4
4
  end
5
5
  end
@@ -1,6 +1,5 @@
1
1
  require "nokogiri"
2
2
  require "liquid"
3
- require "pp"
4
3
 
5
4
  module Relaton::Cli
6
5
  class XmlToHtmlRenderer
data/relaton-cli.gemspec CHANGED
@@ -20,16 +20,10 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = "exe"
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
- spec.required_ruby_version = ">= 2.6.0"
24
-
25
- spec.add_development_dependency "byebug", "~> 11.0"
26
- spec.add_development_dependency "equivalent-xml", "~> 0.6"
27
- spec.add_development_dependency "rspec", "~> 3.0"
28
- spec.add_development_dependency "rspec-command", "~> 1.0.3"
29
- spec.add_development_dependency "rspec-core", "~> 3.4"
23
+ spec.required_ruby_version = ">= 2.7.0"
30
24
 
31
25
  spec.add_runtime_dependency "liquid", "~> 5"
32
- spec.add_runtime_dependency "relaton", "~> 1.15.1"
26
+ spec.add_runtime_dependency "relaton", "~> 1.15.4"
33
27
  spec.add_runtime_dependency "thor"
34
28
  spec.add_runtime_dependency "thor-hollaback"
35
29
  end
metadata CHANGED
@@ -1,85 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.3
4
+ version: 1.15.5
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-06 00:00:00.000000000 Z
11
+ date: 2023-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: byebug
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '11.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '11.0'
27
- - !ruby/object:Gem::Dependency
28
- name: equivalent-xml
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.6'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.6'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec-command
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.0.3
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.0.3
69
- - !ruby/object:Gem::Dependency
70
- name: rspec-core
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.4'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.4'
83
13
  - !ruby/object:Gem::Dependency
84
14
  name: liquid
85
15
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +30,14 @@ dependencies:
100
30
  requirements:
101
31
  - - "~>"
102
32
  - !ruby/object:Gem::Version
103
- version: 1.15.1
33
+ version: 1.15.4
104
34
  type: :runtime
105
35
  prerelease: false
106
36
  version_requirements: !ruby/object:Gem::Requirement
107
37
  requirements:
108
38
  - - "~>"
109
39
  - !ruby/object:Gem::Version
110
- version: 1.15.1
40
+ version: 1.15.4
111
41
  - !ruby/object:Gem::Dependency
112
42
  name: thor
113
43
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
124
  requirements:
195
125
  - - ">="
196
126
  - !ruby/object:Gem::Version
197
- version: 2.6.0
127
+ version: 2.7.0
198
128
  required_rubygems_version: !ruby/object:Gem::Requirement
199
129
  requirements:
200
130
  - - ">="