metanorma-cli 1.6.2.pre → 1.6.3.pre

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: 3bbf2b70bffbc74fe2df7f16aa0c0a49916d428d6407bcf0212de2285a005839
4
- data.tar.gz: 4541690386d3fc84c27db373f8008c51b53bbb468f1686716ae084e3d783557a
3
+ metadata.gz: 6043f295df8815a798e0a62501ff5d1a3ea0cc9cd831e212753a8281914608be
4
+ data.tar.gz: 308b10325ef83ec35c171dc0e28625f0d1905328238bcb0a0b224bdb19fcb640
5
5
  SHA512:
6
- metadata.gz: faa58b11e49e675ff16943bde16bc53630e508128cd361d41a87c456f2457bda12f523ffaa35398bcd2379b123a736dd4ac9ffde1f257e099ab74cdacbc6e135
7
- data.tar.gz: 1ccd402cd2a4ce9c95d0420a48a6cd99e5317f290994cf36ca1b4e30ff0beb4d5a2a5d7e14cb27b7ce9aff6155ddb6d9a7b99d55899bd61f028722b76ad67871
6
+ metadata.gz: e39c0050164d033a9b3525ba4cf5024763fc22faeec751879026c2e3dc2ec508ec8b17650ea713dcc31954604a48d9ef6f5aeac04fd3b24c32e087259ff0ce3f
7
+ data.tar.gz: 13d390d95b304077cd7c2dc60c274e1dbe495fe88c6594cc934d9927c6b54f40e5a4fd5a24877b5521fbf57961a75c69abf50ecdb5faec44965582c0e129b746
@@ -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.pre".freeze
3
+ VERSION = "1.6.3.pre".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.pre
4
+ version: 1.6.3.pre
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-10 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