nanoc-cli 4.12.17 → 4.12.18
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 +4 -4
- data/lib/nanoc/cli/commands/create-site.rb +10 -1
- data/lib/nanoc/cli/error_handler.rb +17 -6
- data/lib/nanoc/cli/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06a03025f7eef087022fff79f2c76e348399cbb8534452b0859817ac1ab8f8e2
|
|
4
|
+
data.tar.gz: af695835bf0f91fa37ce37cd7382810fe13219eada71486e4ee73feff4c15fea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad2e443bf66d784f8bc467c3f8e0fd38ad58b016a3fa372e10f7e9bc8bd81c95d633ba57a3b4da1dcce4e776cf052f4096f0b34e092654e45bdbd9dfe22e3122
|
|
7
|
+
data.tar.gz: 831aa210f969ed6f564b83fea38dd7ae8e21dd6d52600f77f558dd8133ffccd735aaa00e2aae4f3b2ca462c15df33df2f67cb23e8445e9ef5db4b74aef71868d
|
|
@@ -18,6 +18,14 @@ module Nanoc::CLI::Commands
|
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
DEFAULT_GEMFILE = <<~EOS unless defined? DEFAULT_GEMFILE
|
|
22
|
+
# frozen_string_literal: true
|
|
23
|
+
|
|
24
|
+
source 'https://rubygems.org'
|
|
25
|
+
|
|
26
|
+
gem 'nanoc', '~> #{Nanoc::VERSION.split('.').take(2).join('.')}'
|
|
27
|
+
EOS
|
|
28
|
+
|
|
21
29
|
DEFAULT_CONFIG = <<~EOS unless defined? DEFAULT_CONFIG
|
|
22
30
|
# A list of file extensions that Nanoc will consider to be textual rather than
|
|
23
31
|
# binary. If an item with an extension not in this list is found, the file
|
|
@@ -54,7 +62,7 @@ module Nanoc::CLI::Commands
|
|
|
54
62
|
# layout '/default.*'
|
|
55
63
|
#
|
|
56
64
|
# if item.identifier =~ '**/index.*'
|
|
57
|
-
# write item.identifier.
|
|
65
|
+
# write item.identifier.without_ext + '.html'
|
|
58
66
|
# else
|
|
59
67
|
# write item.identifier.without_ext + '/index.html'
|
|
60
68
|
# end
|
|
@@ -240,6 +248,7 @@ module Nanoc::CLI::Commands
|
|
|
240
248
|
FileUtils.mkdir_p('lib')
|
|
241
249
|
FileUtils.mkdir_p('output')
|
|
242
250
|
|
|
251
|
+
write('Gemfile', DEFAULT_GEMFILE)
|
|
243
252
|
write('nanoc.yaml', DEFAULT_CONFIG)
|
|
244
253
|
write('Rules', DEFAULT_RULES)
|
|
245
254
|
write('content/index.html', DEFAULT_ITEM)
|
|
@@ -38,7 +38,7 @@ module Nanoc::CLI
|
|
|
38
38
|
%w[INT TERM].each do |signal|
|
|
39
39
|
Signal.trap(signal) do
|
|
40
40
|
puts
|
|
41
|
-
exit
|
|
41
|
+
exit(0)
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -55,10 +55,21 @@ module Nanoc::CLI
|
|
|
55
55
|
|
|
56
56
|
# Run
|
|
57
57
|
yield
|
|
58
|
-
rescue
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
59
|
+
# The exception could be wrapped in a
|
|
60
|
+
# Nanoc::Core::Errors::CompilationError, so find the
|
|
61
|
+
# underlying exception and handle that one instead.
|
|
62
|
+
e = unwrap_error(e)
|
|
63
|
+
|
|
64
|
+
case e
|
|
65
|
+
when Interrupt
|
|
66
|
+
puts
|
|
67
|
+
exit(1)
|
|
68
|
+
when StandardError, ScriptError
|
|
69
|
+
handle_error(e, exit_on_error: exit_on_error)
|
|
70
|
+
else
|
|
71
|
+
raise e
|
|
72
|
+
end
|
|
62
73
|
end
|
|
63
74
|
|
|
64
75
|
def handle_error(error, exit_on_error:)
|
|
@@ -131,7 +142,7 @@ module Nanoc::CLI
|
|
|
131
142
|
#
|
|
132
143
|
# @return [void]
|
|
133
144
|
def write_verbose_error(error, stream)
|
|
134
|
-
stream.puts "
|
|
145
|
+
stream.puts "Crash log created at #{Time.now}"
|
|
135
146
|
|
|
136
147
|
write_error_message(stream, error, verbose: true)
|
|
137
148
|
write_error_detail(stream, error)
|
data/lib/nanoc/cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nanoc-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.12.
|
|
4
|
+
version: 4.12.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Defreyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cri
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - '='
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 4.12.
|
|
47
|
+
version: 4.12.18
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - '='
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 4.12.
|
|
54
|
+
version: 4.12.18
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: zeitwerk
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|