nanoc 4.12.3 → 4.12.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +29 -0
- data/lib/nanoc/data_sources/filesystem/parser.rb +2 -1
- data/lib/nanoc/data_sources/filesystem.rb +1 -1
- data/lib/nanoc/filters/relativize_paths.rb +3 -2
- data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +0 -2
- data/lib/nanoc/version.rb +1 -1
- metadata +15 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7930f72e16665dbb7ec96deb6430f004a6c67fc948809ee464786910138aa702
|
4
|
+
data.tar.gz: dd34cd1ee0145b4308351885bda5d5a7b9d7b81025d76e0c253e7577e2baf2d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 327c9540056f40e9bf62b2f8fab40eb6d0b28c21b255f38350fefc8132732249289368a88aa98c7871298f58c7b289c7fe0cb29413108b2d3f20151adc0f9309
|
7
|
+
data.tar.gz: 05a90540eb2bda0268bb00d82fde2d498e8eb60be6640c19d9ae77a3a630d22ecd7788f80862032b8088aee361766036b6fac9e3690a8aeb56f26e7eb3c07543
|
data/NEWS.md
CHANGED
@@ -1,5 +1,34 @@
|
|
1
1
|
# Nanoc news
|
2
2
|
|
3
|
+
## 4.12.6 (2022-05-28)
|
4
|
+
|
5
|
+
Fixes:
|
6
|
+
|
7
|
+
- Fixed a crash in `nanc view` when a TUN device is present (#1567) [Sergio Durigan Junior]
|
8
|
+
- Fixed a crash when content/ has non-writable binary files (#1576)
|
9
|
+
- Fixed inconsistency in allowed YAML classes in metadata (#1574) [Daniel Aleksandersen]
|
10
|
+
|
11
|
+
## 4.12.5 (2022-01-22)
|
12
|
+
|
13
|
+
Fixes:
|
14
|
+
|
15
|
+
- Prefer YAML.safe_load over YAML.load (#1566)
|
16
|
+
|
17
|
+
Enhancements:
|
18
|
+
|
19
|
+
- Added `Time` to the list of permitted classes for YAML (#1565) [Hideaki Nagamine]
|
20
|
+
|
21
|
+
## 4.12.4 (2022-01-15)
|
22
|
+
|
23
|
+
Fixes:
|
24
|
+
|
25
|
+
- Fixed “can’t be called from trap context” exception (#1559, #1564)
|
26
|
+
|
27
|
+
Enhancements:
|
28
|
+
|
29
|
+
- Added `Date` to the list of permitted classes for YAML (#1560) [Damien Mathieu]
|
30
|
+
- Made Nanoc log the filename when it is not absolute (#1557) [Johnny Willemsen]
|
31
|
+
|
3
32
|
## 4.12.3 (2021-10-09)
|
4
33
|
|
5
34
|
Fixes:
|
@@ -4,6 +4,7 @@
|
|
4
4
|
class Nanoc::DataSources::Filesystem
|
5
5
|
class Parser
|
6
6
|
SEPARATOR = /(-{5}|-{3})/.source
|
7
|
+
PERMITTED_YAML_CLASSES = [Symbol, Date, Time].freeze
|
7
8
|
|
8
9
|
class ParseResult
|
9
10
|
attr_reader :content
|
@@ -60,7 +61,7 @@ class Nanoc::DataSources::Filesystem
|
|
60
61
|
# @return [Hash]
|
61
62
|
def parse_metadata(data, filename)
|
62
63
|
begin
|
63
|
-
meta = YAML.
|
64
|
+
meta = YAML.safe_load(data, permitted_classes: PERMITTED_YAML_CLASSES) || {}
|
64
65
|
rescue => e
|
65
66
|
raise Errors::UnparseableMetadata.new(filename, e)
|
66
67
|
end
|
@@ -150,7 +150,7 @@ module Nanoc::DataSources
|
|
150
150
|
is_binary = content_filename && !@site_config[:text_extensions].include?(File.extname(content_filename)[1..-1])
|
151
151
|
|
152
152
|
if is_binary && klass == Nanoc::Core::Item
|
153
|
-
meta = (meta_filename && YAML.load_file(meta_filename)) || {}
|
153
|
+
meta = (meta_filename && YAML.load_file(meta_filename, permitted_classes: Parser::PERMITTED_YAML_CLASSES)) || {}
|
154
154
|
|
155
155
|
ProtoDocument.new(is_binary: true, filename: content_filename, attributes: meta)
|
156
156
|
elsif is_binary && klass == Nanoc::Core::Layout
|
@@ -8,7 +8,7 @@ module Nanoc::Filters
|
|
8
8
|
require 'nanoc/helpers/link_to'
|
9
9
|
include Nanoc::Helpers::LinkTo
|
10
10
|
|
11
|
-
|
11
|
+
prepend MemoWise
|
12
12
|
|
13
13
|
SELECTORS =
|
14
14
|
[
|
@@ -79,7 +79,7 @@ module Nanoc::Filters
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
|
82
|
+
def excludes(params)
|
83
83
|
raw = [params.fetch(:exclude, [])].flatten
|
84
84
|
raw.map do |exclusion|
|
85
85
|
case exclusion
|
@@ -90,6 +90,7 @@ module Nanoc::Filters
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
93
|
+
memo_wise :excludes
|
93
94
|
|
94
95
|
def exclude?(path, params)
|
95
96
|
# TODO: Use #match? on newer Ruby versions
|
data/lib/nanoc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.12.
|
4
|
+
version: 4.12.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -45,6 +45,9 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 1.0.2
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,34 +55,37 @@ dependencies:
|
|
52
55
|
- - "~>"
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '1.0'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 1.0.2
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: nanoc-cli
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - '='
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.12.
|
67
|
+
version: 4.12.6
|
62
68
|
type: :runtime
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - '='
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.12.
|
74
|
+
version: 4.12.6
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: nanoc-core
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - '='
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.12.
|
81
|
+
version: 4.12.6
|
76
82
|
type: :runtime
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - '='
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: 4.12.
|
88
|
+
version: 4.12.6
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: nanoc-deploying
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -227,7 +233,8 @@ files:
|
|
227
233
|
homepage: https://nanoc.ws/
|
228
234
|
licenses:
|
229
235
|
- MIT
|
230
|
-
metadata:
|
236
|
+
metadata:
|
237
|
+
rubygems_mfa_required: 'true'
|
231
238
|
post_install_message:
|
232
239
|
rdoc_options: []
|
233
240
|
require_paths:
|
@@ -243,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
250
|
- !ruby/object:Gem::Version
|
244
251
|
version: '0'
|
245
252
|
requirements: []
|
246
|
-
rubygems_version: 3.
|
253
|
+
rubygems_version: 3.3.14
|
247
254
|
signing_key:
|
248
255
|
specification_version: 4
|
249
256
|
summary: A static-site generator with a focus on flexibility.
|