relaton-cli 1.7.3 → 1.9.0

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: d320bdb2aed574b0d56fb8bb94e4b7128d5261c8e88ac9fbeb25739392c96ca8
4
- data.tar.gz: 88adb33264d4bfee902cff4f12a0cfc3e50ce99b61bc5c7841e6b09400f85003
3
+ metadata.gz: a742751991033708b0285b4ae906c32c286c1f96c6187cf6ce3138ab866cbc56
4
+ data.tar.gz: d8215fdf8f4a33f8f6d71e3dc5d5336395be5b5be958d59f1bd93d988ed8f035
5
5
  SHA512:
6
- metadata.gz: d7c396fe7319104f8433ebaf1778b291e2526fd95f8f8a6d7f8b12d375d767d4ce4cc494df8c8d2f7bf442b27154c1a9ef2059205e0468510a6c4ec2ab3dbbce
7
- data.tar.gz: 81399b3e5b6685c76602282b4b95ece2865fa666c840bad188b150f530984d5da4113dd4f6414f9648e2ae7997fe44ae05acbd09475f73e418567fe5bdd279d6
6
+ metadata.gz: 9de6a8ec79b10ca88c674e38a5c6f39940b140e24e5e39f8572e65f8e9528d6ad848588ad1600fac67981f11835e610781f0093033ad6e29408c7f757ee786a3
7
+ data.tar.gz: 8cb24d8a76dcd230706c74d51b0ec0bc4a7847042d1bd78a3cd5c30fff5f0a54405231ae90349ab06f9c5e640f89c84ef60e497b526063d57c3af92d98494c55
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
data/.rubocop.yml CHANGED
@@ -5,6 +5,6 @@
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
7
  AllCops:
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
  Rails:
10
10
  Enabled: true
data/docs/README.adoc CHANGED
@@ -310,38 +310,38 @@ Import document or collection from XML `FILE` into `COLLECTION`.
310
310
  * `COLLECTION` is optional. If collection doesn't exist then it will be created.
311
311
  * `DIRECTORY` is optional, and specifies path to a directory with collections. Default is `$HOME/.relaton/collections`.
312
312
 
313
- === Cache DB manipulation
313
+ === Dadabase manipulation
314
314
 
315
- ==== Create cache DB
315
+ ==== Create database
316
316
 
317
317
  ----
318
318
  $ relaton db create DIR
319
319
  ----
320
320
 
321
- Creates a new cache DB in a directory `DIR` (optional, deafult is `/home/USER/.relaton/dbpath`). In case the target directory exists it will be used as a cache DB.
321
+ Creates a new database in a directory `DIR` (optional, deafult is `/home/USER/.relaton/dbpath`). In case the target directory exists it will be used as a database.
322
322
 
323
323
  ----
324
324
  $ relaton db create
325
- Cache DB is in "/Users/user/.relaton/cache"
325
+ Database is in "/Users/user/.relaton/cache"
326
326
 
327
327
  $ relaton db create cachedb
328
- Cache DB is in "/Users/user/RubyProjects/relaton-cli/cachedb"
328
+ Database is in "/Users/user/RubyProjects/relaton-cli/cachedb"
329
329
  ----
330
330
 
331
- ==== Move cache DB
331
+ ==== Move database
332
332
 
333
333
  ----
334
334
  $ relaton db mv DIR
335
335
  ----
336
336
 
337
- Move cache DB to another place `DIR`.
337
+ Move database to another place `DIR`.
338
338
 
339
339
  ----
340
340
  $ relaton db mv cache_dir
341
- Cache DB is moved to "/Users/user/RubyProjects/relaton-cli/cache_dir"
341
+ Database is moved to "/Users/user/RubyProjects/relaton-cli/cache_dir"
342
342
  ----
343
343
 
344
- ==== Clear cache DB
344
+ ==== Clear database
345
345
 
346
346
  Delete all entries from a chache DB.
347
347
 
@@ -349,13 +349,13 @@ Delete all entries from a chache DB.
349
349
  $ relaton db clear
350
350
  ----
351
351
 
352
- ==== Fetch from cache DB
352
+ ==== Fetch from database
353
353
 
354
354
  ----
355
355
  $ relaton db fetch -t TYPE -f FORMAT -y YEAR
356
356
  ----
357
357
 
358
- Fetch an entry from a cache DB. See [relaton fetch](#relaton-fetch) for the arguments explanation.
358
+ Fetch an entry from a database. See [relaton fetch](#relaton-fetch) for the arguments explanation.
359
359
 
360
360
  ==== Fetch all
361
361
 
@@ -14,19 +14,19 @@ module Relaton
14
14
 
15
15
  desc "fetch CODE", "Fetch Relaton XML for Standard identifier CODE"
16
16
  option :type, aliases: :t, desc: "Type of standard to "\
17
- "get bibliographic entry for"
17
+ "get bibliographic entry for"
18
18
  option :format, aliases: :f, desc: "Output format (xml, yaml, bibtex). "\
19
- "Default xml."
19
+ "Default xml."
20
20
  option :year, aliases: :y, type: :numeric, desc: "Year the standard was "\
21
- "published"
21
+ "published"
22
22
  option :"all-parts", type: :boolean, desc: "Fetch all parts"
23
23
  option :"keep-year", type: :boolean, desc: "Undated reference should "\
24
- "return actual reference with year"
24
+ "return actual reference with year"
25
25
  option :retries, aliases: :r, type: :numeric, desc: "Number of network "\
26
26
  "retries. Default 1."
27
27
 
28
28
  def fetch(code)
29
- io = IO.new(STDOUT.fcntl(::Fcntl::F_DUPFD), mode: "w:UTF-8")
29
+ io = IO.new($stdout.fcntl(::Fcntl::F_DUPFD), mode: "w:UTF-8")
30
30
  io.puts(fetch_document(code, options) || supported_type_message)
31
31
  end
32
32
 
@@ -43,7 +43,7 @@ module Relaton
43
43
  "DIRECTORY (containing Relaton-XML or YAML) into a Relaton Collection"
44
44
  option :title, aliases: :t, desc: "Title of resulting Relaton collection"
45
45
  option :organization, aliases: :g, desc: "Organization owner of Relaton "\
46
- "collection"
46
+ "collection"
47
47
  option :extension, aliases: :x, desc: "File extension of destination "\
48
48
  "Relaton file, defaults to 'rxl'"
49
49
 
@@ -61,15 +61,15 @@ module Relaton
61
61
  end
62
62
 
63
63
  desc "yaml2xml YAML", "Convert Relaton YAML into Relaton Collection XML "\
64
- "or separate files"
64
+ "or separate files"
65
65
  option :extension, aliases: :x, default: "rxl", desc: "File extension "\
66
66
  "of Relaton XML files, defaults to 'rxl'"
67
67
  option :prefix, aliases: :p, desc: "Filename prefix of individual "\
68
- "Relaton XML files, defaults to empty"
68
+ "Relaton XML files, defaults to empty"
69
69
  option :outdir, aliases: :o, desc: "Output to the specified directory "\
70
70
  "with individual Relaton Bibdata XML files"
71
71
  option :require, aliases: :r, type: :array, desc: "Require LIBRARY "\
72
- "prior to execution"
72
+ "prior to execution"
73
73
  option :overwrite, aliases: :f, type: :boolean, default: false,
74
74
  desc: "Overwrite the existing file"
75
75
 
@@ -78,15 +78,15 @@ module Relaton
78
78
  end
79
79
 
80
80
  desc "xml2yaml XML", "Convert Relaton XML into Relaton Bibdata / "\
81
- "Bibcollection YAML (and separate files)"
81
+ "Bibcollection YAML (and separate files)"
82
82
  option :extension, aliases: :x, default: "yaml", desc: "File extension "\
83
83
  "of Relaton YAML files, defaults to 'yaml'"
84
84
  option :prefix, aliases: :p, desc: "Filename prefix of Relaton XML "\
85
- "files, defaults to empty"
85
+ "files, defaults to empty"
86
86
  option :outdir, aliases: :o, desc: "Output to the specified directory "\
87
- "with individual Relaton Bibdata YAML files"
87
+ "with individual Relaton Bibdata YAML files"
88
88
  option :require, aliases: :r, type: :array, desc: "Require LIBRARY "\
89
- "prior to execution"
89
+ "prior to execution"
90
90
  option :overwrite, aliases: :f, type: :boolean, default: false,
91
91
  desc: "Overwrite the existing file"
92
92
 
@@ -95,9 +95,9 @@ module Relaton
95
95
  end
96
96
 
97
97
  desc "xml2html RELATON-INDEX-XML", "Convert Relaton Collection XML into "\
98
- "HTML"
98
+ "HTML"
99
99
  option :stylesheet, aliases: :s, desc: "Stylesheet file path for "\
100
- "rendering HTML index"
100
+ "rendering HTML index"
101
101
  option :templatedir, aliases: :t, desc: "Liquid template directory for "\
102
102
  "rendering Relaton items and collection"
103
103
  option :overwrite, aliases: :f, type: :boolean, default: false,
@@ -108,9 +108,9 @@ module Relaton
108
108
  end
109
109
 
110
110
  desc "yaml2html RELATON-INDEX-YAML", "Concatenate Relaton Collection "\
111
- "YAML into HTML"
111
+ "YAML into HTML"
112
112
  option :stylesheet, aliases: :s, desc: "Stylesheet file path for "\
113
- "rendering HTML index"
113
+ "rendering HTML index"
114
114
  option :templatedir, aliases: :t, desc: "Liquid template directory for "\
115
115
  "rendering Relaton items and collection"
116
116
  option :overwrite, aliases: :f, type: :boolean, default: false,
@@ -137,7 +137,7 @@ module Relaton
137
137
  when "asciibib" then "adoc"
138
138
  else options[:format]
139
139
  end
140
- output = options[:output] || file.sub(/(?<=\.)[^\.]+$/, ext)
140
+ output = options[:output] || file.sub(/(?<=\.)[^.]+$/, ext)
141
141
  File.write output, result, encoding: "UTF-8"
142
142
  end
143
143
 
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "1.7.3".freeze
3
+ VERSION = "1.9.0".freeze
4
4
  end
5
5
  end
data/relaton-cli.gemspec CHANGED
@@ -20,7 +20,7 @@ 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.4.0"
23
+ spec.required_ruby_version = ">= 2.5.0"
24
24
 
25
25
  spec.add_development_dependency "byebug", "~> 11.0"
26
26
  # spec.add_development_dependency "debase"
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "webmock"
37
37
 
38
38
  spec.add_runtime_dependency "liquid", "~> 4"
39
- spec.add_runtime_dependency "relaton", ">=1.7.7"
39
+ spec.add_runtime_dependency "relaton", "~> 1.9.0"
40
40
  spec.add_runtime_dependency "thor"
41
41
  spec.add_runtime_dependency "thor-hollaback"
42
42
  end
@@ -17,7 +17,7 @@
17
17
 
18
18
  <div class="doc-type-wrap">
19
19
  <div class="doc-type {{ document.type | downcase | split: " " | join: "-" }}">
20
- {{ document.type }}
20
+ {{ document.doctype }}
21
21
  </div>
22
22
  </div>
23
23
  </div>
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.7.3
4
+ version: 1.9.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: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -168,16 +168,16 @@ dependencies:
168
168
  name: relaton
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.7.7
173
+ version: 1.9.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.7.7
180
+ version: 1.9.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: thor
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -262,14 +262,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
262
262
  requirements:
263
263
  - - ">="
264
264
  - !ruby/object:Gem::Version
265
- version: 2.4.0
265
+ version: 2.5.0
266
266
  required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  requirements:
268
268
  - - ">="
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
271
  requirements: []
272
- rubygems_version: 3.0.6
272
+ rubygems_version: 3.2.3
273
273
  signing_key:
274
274
  specification_version: 4
275
275
  summary: Relaton Command-line Interface