metanorma-cli 1.6.12 → 1.6.13.pre.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71c6f33aa5986a4fa3b5054ff98deb8b1ba11eb862a4cf258235091abe717607
|
4
|
+
data.tar.gz: b7540dc077134eeeb8cd470bb74ddda591de4caf985a5681d38815ded0e71465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ce83fc8b69e758e233e9cf9a8eac7aa017abf700fe04138860599c9c1778d65df8e830175fc09211dc86c679cc82830383d57de42d2acb207d5287ea432a7c
|
7
|
+
data.tar.gz: 8272ad07ae94ee6509c3c8d850a2972e954c1e41941798f6b8c0d8ea293c248b14a940db723acfa075651adfa557c391e349bb08c2d82d1139e7e3f5397b5575
|
@@ -16,7 +16,7 @@ module Metanorma
|
|
16
16
|
def get(name = nil)
|
17
17
|
config, config_path = load_config(options[:global], create_default_config: false)
|
18
18
|
|
19
|
-
if name.nil? && File.
|
19
|
+
if name.nil? && File.exist?(config_path)
|
20
20
|
UI.say File.read(config_path, encoding: "utf-8")
|
21
21
|
else
|
22
22
|
UI.say(config.dig(*dig_path(name)) || "nil")
|
@@ -54,7 +54,7 @@ module Metanorma
|
|
54
54
|
def self.load_configs(options, configs = [Metanorma::Cli.global_config_path, Metanorma::Cli.local_config_path])
|
55
55
|
result = options.dup
|
56
56
|
configs.each do |config_path|
|
57
|
-
next unless File.
|
57
|
+
next unless File.exist?(config_path)
|
58
58
|
|
59
59
|
config_values = ::YAML::load_file(config_path).symbolize_all_keys[:cli] || {}
|
60
60
|
result.merge!(config_values)
|
@@ -82,7 +82,7 @@ module Metanorma
|
|
82
82
|
def load_config(global_config, create_default_config: true)
|
83
83
|
config_path = Metanorma::Cli.config_path(global_config)
|
84
84
|
|
85
|
-
unless File.
|
85
|
+
unless File.exist?(config_path) || create_default_config
|
86
86
|
config_path = Metanorma::Cli.config_path(true)
|
87
87
|
end
|
88
88
|
|
@@ -6,12 +6,14 @@ module Metanorma
|
|
6
6
|
module Cli
|
7
7
|
module Commands
|
8
8
|
class Site < ThorWithConfig
|
9
|
+
SITE_OUTPUT_DIRNAME = "_site".freeze
|
10
|
+
|
9
11
|
desc "generate [SOURCE_PATH]", "Generate site from collection"
|
10
12
|
option :config, aliases: "-c", desc: "Metanorma configuration file"
|
11
13
|
option(
|
12
14
|
:output_dir,
|
13
15
|
aliases: "-o",
|
14
|
-
default: Pathname.new(Dir.pwd).join(
|
16
|
+
default: Pathname.new(Dir.pwd).join(SITE_OUTPUT_DIRNAME).to_s,
|
15
17
|
desc: "Output directory for generated site",
|
16
18
|
)
|
17
19
|
option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
|
@@ -8,7 +8,9 @@ module Metanorma
|
|
8
8
|
def initialize(source, options = {}, compile_options = {})
|
9
9
|
@collection_queue = []
|
10
10
|
@source = find_realpath(source)
|
11
|
-
@site_path = options.fetch(
|
11
|
+
@site_path = options.fetch(
|
12
|
+
:output_dir, Commands::Site::SITE_OUTPUT_DIRNAME
|
13
|
+
).to_s
|
12
14
|
@asset_folder = options.fetch(:asset_folder, "documents").to_s
|
13
15
|
@collection_name = options.fetch(:collection_name, "documents.xml")
|
14
16
|
|
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.
|
4
|
+
version: 1.6.13.pre.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: 2023-
|
11
|
+
date: 2023-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -506,9 +506,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
506
506
|
version: 2.7.0
|
507
507
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
508
508
|
requirements:
|
509
|
-
- - "
|
509
|
+
- - ">"
|
510
510
|
- !ruby/object:Gem::Version
|
511
|
-
version:
|
511
|
+
version: 1.3.1
|
512
512
|
requirements: []
|
513
513
|
rubygems_version: 3.3.26
|
514
514
|
signing_key:
|