metanorma-cli 1.6.2 → 1.6.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: eb0751037e69234f0d34223e742f107ebd69a095c803d639ff7b4574bef06be1
4
- data.tar.gz: b776d0d285d1e06cb71071460b1bcd46f33252c6ee76ac7024eb37063ef5341c
3
+ metadata.gz: 83ab2e94f18cd751ef590a43c00d854b9815c250cfe891e469cf04c9e686602e
4
+ data.tar.gz: 82a3bedaa67c437cd24b594afad77ac4f89f4135d6bd98381d00ef60fc4885e8
5
5
  SHA512:
6
- metadata.gz: e7c3fc02662624ff2b68bbc147a6aa4707d0f90db24ba317adcb44bae25e9c2c2b846dfebc10f8cebd4c040ac58057f9e67c7db6d333672e2064fed46b051d65
7
- data.tar.gz: cc329f85a1c4220f4fc29ebc765992116c78c7802041cb546e9a61333a268540cb683cf1a482c85d12d3c3e03bb0f83b84510da8191a1ed52244d2af93d95f45
6
+ metadata.gz: 3a206d1f4cfd66a660abd4bdf1423ae4c5d5e568f2f8ede333a422b70f6026497029fefd0aff7f7bae9f5071da938b2a939a02c2c2ff0fb38c0ad6ee6dbb838d
7
+ data.tar.gz: 6c0044c6c1e6ae0875ba12d3b2fe67e7bef91161ada459a5169a05c48f569e21cedaa8c8a0b71d319f56f6dab4b1c222fa12bb8dee248534a72d98c7d567ead7
@@ -6,6 +6,7 @@ module Metanorma
6
6
  def initialize(file, options)
7
7
  @file = file
8
8
  @options = Cli.with_indifferent_access(options)
9
+ @output_dir = @options.delete(:output_dir)
9
10
  @compile_options = @options.delete(:compile)
10
11
  end
11
12
 
@@ -33,12 +34,22 @@ module Metanorma
33
34
  def collection_options
34
35
  @collection_options ||= {
35
36
  compile: @compile_options,
37
+ output_folder: build_output_folder,
36
38
  coverpage: options.fetch(:coverpage, nil),
37
- output_folder: options.fetch(:output_folder, source_folder),
38
39
  format: collection_output_formats(options.fetch(:format, "")),
39
40
  }
40
41
  end
41
42
 
43
+ def build_output_folder
44
+ output_folder = options.fetch(:output_folder, nil)
45
+
46
+ if output_folder && @output_dir
47
+ @output_dir.join(output_folder).to_s
48
+ else
49
+ output_folder || source_folder
50
+ end
51
+ end
52
+
42
53
  def collection_output_formats(formats)
43
54
  if formats.is_a?(String)
44
55
  formats = formats.split(",")
@@ -178,7 +178,11 @@ module Metanorma
178
178
  job = @collection_queue.pop
179
179
 
180
180
  if job
181
- Cli::Collection.render(job, compile: @compile_options)
181
+ Cli::Collection.render(
182
+ job,
183
+ compile: @compile_options,
184
+ output_dir: @asset_directory.join(".."),
185
+ )
182
186
  end
183
187
  end
184
188
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.6.2".freeze
3
+ VERSION = "1.6.3".freeze
4
4
  end
5
5
  end
@@ -56,13 +56,12 @@ Gem::Specification.new do |spec|
56
56
  spec.add_runtime_dependency "metanorma-iho", "~> 0.6.0"
57
57
  spec.add_runtime_dependency "metanorma-itu", "~> 2.1.0"
58
58
  # spec.add_runtime_dependency "metanorma-nist", "~> 2.1.0"
59
- spec.add_runtime_dependency "metanorma-ieee", "~> 0.0.1"
59
+ spec.add_runtime_dependency "metanorma-ieee", "~> 0.1.0"
60
60
  spec.add_runtime_dependency "metanorma-ogc", "~> 2.2.0"
61
61
  spec.add_runtime_dependency "metanorma-un", "~> 0.9.0"
62
62
  spec.add_runtime_dependency "relaton-cli", ">= 0.8.2"
63
63
 
64
64
  spec.add_runtime_dependency "socksify"
65
65
  # spec.metadata["rubygems_mfa_required"] = "true"
66
- # spec.metadata["rubygems_mfa_required"] = "true"
67
66
  # NOBODY UNCOMMENTS THIS WITHOUT EXPLAINING TO ME HOW TO USE MFA
68
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.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: 2022-09-26 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug
@@ -380,14 +380,14 @@ dependencies:
380
380
  requirements:
381
381
  - - "~>"
382
382
  - !ruby/object:Gem::Version
383
- version: 0.0.1
383
+ version: 0.1.0
384
384
  type: :runtime
385
385
  prerelease: false
386
386
  version_requirements: !ruby/object:Gem::Requirement
387
387
  requirements:
388
388
  - - "~>"
389
389
  - !ruby/object:Gem::Version
390
- version: 0.0.1
390
+ version: 0.1.0
391
391
  - !ruby/object:Gem::Dependency
392
392
  name: metanorma-ogc
393
393
  requirement: !ruby/object:Gem::Requirement