metanorma-cli 1.6.12 → 1.6.13
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: 8e981a8cca8c5cae1cda5827f4ff58a1ee6c4b4fd88fe21e690b3d916608ffb8
|
4
|
+
data.tar.gz: 2ccc77fef41b7195711de6c9fce1cbf4c4190f84c5f563c87bf3748c8996c873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e376ab6703fda4488ae8ad959422488146da8693256261a6c01e9a45456ddf3401cec1e25eb94fd13bd3a6bfe6c1577d52546cd41c4ea2f78e7d938a66745427
|
7
|
+
data.tar.gz: 894e96abc464503da2861917204cb7795db1e3096ff3a0e648d00d135f1c5ceb78cf71c40c4c19d57f7b3429babb463256dcb279382f50b1fc69bab5a96bc8d3
|
@@ -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
|
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
|