nanoc 4.12.3 → 4.12.4

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: 8f2b5030c2fc46edeec3c725dfa6264fa32f7afa58531960e355479bbef66821
4
- data.tar.gz: 25f70a7eb276e2cf83e984c43d69b3f622298ddf82755f4388671f028a6937e9
3
+ metadata.gz: 437153302bf3976f9e3187df89dec7ef4da2f63a4bafe681adefbe348a06d31d
4
+ data.tar.gz: 40b66e18acae6aeb83de12c47f9672aac6c2135e536b74f0a06c8fa73acf95f3
5
5
  SHA512:
6
- metadata.gz: 35a0eae0e232086859c07bc620f53d4478558252dd290f2f19d54abbb76f9e3a839af9eb36e1c107ec78bac643e511cab1693d3f98078a063a7c500841ea5a6b
7
- data.tar.gz: 88ae09d525cd7a475cc36c48dbfdcba9dfbefafe33e400795cbcbaa17c0dc140447aba434b83c37a0394243856c2a451053f54dcd646cbbf616f9e746f15cffc
6
+ metadata.gz: 1210addd31a8f1e795d67bc8371e97f594cb6950374514f1e7a641635816c1923468588e2d63b26f86c12c537bc4b3b4ecee01694acc99f403b787c606518d8a
7
+ data.tar.gz: 3e1ab8785fffb97d55274196e509aaf1dceda6e080b852e639316eb0fc5e9f86dcbf243bda070dc478452e46fd4a6c70af9e42d36c095cc0570a61a07d5eeec6
data/NEWS.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Nanoc news
2
2
 
3
+ ## 4.12.4 (2022-01-15)
4
+
5
+ Fixes:
6
+
7
+ - Fixed “can’t be called from trap context” exception (#1559, #1564)
8
+
9
+ Enhancements:
10
+
11
+ - Added `Date` to the list of permitted classes for YAML (#1560) [Damien Mathieu]
12
+ - Made Nanoc log the filename when it is not absolute (#1557) [Johnny Willemsen]
13
+
3
14
  ## 4.12.3 (2021-10-09)
4
15
 
5
16
  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].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.load(data) || {}
64
+ meta = YAML.load(data, permitted_classes: PERMITTED_YAML_CLASSES) || {}
64
65
  rescue => e
65
66
  raise Errors::UnparseableMetadata.new(filename, e)
66
67
  end
@@ -8,7 +8,7 @@ module Nanoc::Filters
8
8
  require 'nanoc/helpers/link_to'
9
9
  include Nanoc::Helpers::LinkTo
10
10
 
11
- DDMemoize.activate(self)
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
- memoized def excludes(params)
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
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Nanoc::RuleDSL
4
4
  class ActionSequenceCalculator
5
- DDMemoize.activate(self)
6
-
7
5
  class UnsupportedObjectTypeException < ::Nanoc::Error
8
6
  def initialize(obj)
9
7
  super("Do not know how to calculate the action sequence for #{obj.inspect}")
data/lib/nanoc/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nanoc
4
4
  # The current Nanoc version.
5
- VERSION = '4.12.3'
5
+ VERSION = '4.12.4'
6
6
  end
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.3
4
+ version: 4.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-09 00:00:00.000000000 Z
11
+ date: 2022-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 4.12.3
61
+ version: 4.12.4
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 4.12.3
68
+ version: 4.12.4
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: nanoc-core
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 4.12.3
75
+ version: 4.12.4
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 4.12.3
82
+ version: 4.12.4
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: nanoc-deploying
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -227,7 +227,8 @@ files:
227
227
  homepage: https://nanoc.ws/
228
228
  licenses:
229
229
  - MIT
230
- metadata: {}
230
+ metadata:
231
+ rubygems_mfa_required: 'true'
231
232
  post_install_message:
232
233
  rdoc_options: []
233
234
  require_paths:
@@ -243,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
244
  - !ruby/object:Gem::Version
244
245
  version: '0'
245
246
  requirements: []
246
- rubygems_version: 3.2.28
247
+ rubygems_version: 3.3.4
247
248
  signing_key:
248
249
  specification_version: 4
249
250
  summary: A static-site generator with a focus on flexibility.