metanorma-cli 1.6.12 → 1.6.13.pre.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 697e289ca000fca61cc7d9bffab96ff8f94567e7cd6fa6bd3b375339a086c8c1
4
- data.tar.gz: '0218a133849ae5b7905a8d683ab05a340cb179838ed114f433b1abf7701fac95'
3
+ metadata.gz: 71c6f33aa5986a4fa3b5054ff98deb8b1ba11eb862a4cf258235091abe717607
4
+ data.tar.gz: b7540dc077134eeeb8cd470bb74ddda591de4caf985a5681d38815ded0e71465
5
5
  SHA512:
6
- metadata.gz: 46447fd354bbcdef4d56cd13a8f32eff5b242ba29cefbf1f905156358c595b3679c6aa1b2bd9839c4cca6e39b5ebbf4806ee25b5d659c89cef7998ca277a31d1
7
- data.tar.gz: 1afba882aac189cd113eebcd2caa1982d1271f7c69fc24be45ed4808033f10b0dda1916ebe7130ec583eb0b23cd400858976d3899d2e931d9d9f917d9ed4a5fd
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.exists?(config_path)
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.exists?(config_path)
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.exists?(config_path) || create_default_config
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("site").to_s,
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 "\
@@ -129,7 +129,6 @@ module Metanorma
129
129
  end
130
130
 
131
131
  def create_file(source, destination)
132
- p "source=#{source} destination=#{destination}"
133
132
  target_path = [document_path, destination].join("/")
134
133
  target_path = Pathname.new(target_path)
135
134
 
@@ -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(:output_dir, "site").to_s
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
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.6.12".freeze
3
+ VERSION = "1.6.13-pre".freeze
4
4
  end
5
5
  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.12
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-01-24 00:00:00.000000000 Z
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: '0'
511
+ version: 1.3.1
512
512
  requirements: []
513
513
  rubygems_version: 3.3.26
514
514
  signing_key: