nanoc 4.12.1 → 4.12.5

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: 03e5fe63fbd9c83f6e9cda3917fee02b124812dab948dc0e08517bec14e209e5
4
- data.tar.gz: 503710ac47ccea7c3a4c30c2bea8dd566598c5a4369f6412b087f04488d3e9fa
3
+ metadata.gz: 0e1fc36b38a9ca9529217edb459536688d3b29ff876c438806b83b4cf7f6f8b3
4
+ data.tar.gz: 528d649a25b7c8612ea168a70c36f68278a313d8ad5d82a22c4426fdd0f88d81
5
5
  SHA512:
6
- metadata.gz: 89416645ab505a5d48e4a7ed5da24c62f9c69fde586c86a9ad8d01b0c8ee19c24e24c503124c5e943d2cd92587891e9c0a50ed7ba7d1f41d236517567c96710f
7
- data.tar.gz: f571bb80982f05073f382d7b54b89c7a4e88054a0e92d0d7dcc56c3a0a9404ca80a6e31df0bbe2811a86341dc51c347e9d8de76d18096ed8c95aa2865537b180
6
+ metadata.gz: 9d815e3792672ae7d5cdddff184fa120616118b642674565b5194b826e93a05f70fc770ab9f99935b28934e66530899da424a6135e63ad19c171fddb13f97f52
7
+ data.tar.gz: d0a04cec9ae44a92f0de95ef4cc8647f40f3dfcdf6e09648ef100d71d3a1e51ab7413c7798019971eef9cdc92a5d6e59d95fa8904873d00a81e247f0e24d6882
data/NEWS.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Nanoc news
2
2
 
3
+ ## 4.12.5 (2022-01-22)
4
+
5
+ Fixes:
6
+
7
+ - Prefer YAML.safe_load over YAML.load (#1566)
8
+
9
+ Enhancements:
10
+
11
+ - Added `Time` to the list of permitted classes for YAML (#1565) [Hideaki Nagamine]
12
+
13
+ ## 4.12.4 (2022-01-15)
14
+
15
+ Fixes:
16
+
17
+ - Fixed “can’t be called from trap context” exception (#1559, #1564)
18
+
19
+ Enhancements:
20
+
21
+ - Added `Date` to the list of permitted classes for YAML (#1560) [Damien Mathieu]
22
+ - Made Nanoc log the filename when it is not absolute (#1557) [Johnny Willemsen]
23
+
24
+ ## 4.12.3 (2021-10-09)
25
+
26
+ Fixes:
27
+
28
+ - Switched ERB to use keyword arguments (#1547, #1550) [Daniel Aleksandersen]
29
+ - Removed use_helper re-definition warning (#1548, #1553) [Daniel Aleksandersen]
30
+ - Fixed issue which could cause items not to be recalculated when removing items in the preprocess block (#1554, #1555)
31
+ - Dropped Nokogumbo in favor of Nokogiri (#1546, #1549) [Daniel Aleksandersen]
32
+
33
+ ## 4.12.2 (2021-05-28)
34
+
35
+ Enhancements:
36
+
37
+ - Add support for `video/@poster` to relativize_paths (#1544) [Masayuki Higashino]
38
+
3
39
  ## 4.12.1 (2021-04-05)
4
40
 
5
41
  Enhancements:
@@ -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.load(data) || {}
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
@@ -80,7 +80,7 @@ module Nanoc::Filters
80
80
  require 'nokogiri'
81
81
  Nokogiri::HTML
82
82
  when :html5
83
- require 'nokogumbo'
83
+ require 'nokogiri'
84
84
  Nokogiri::HTML5
85
85
  when :xml, :xhtml
86
86
  require 'nokogiri'
@@ -27,7 +27,7 @@ module Nanoc::Filters
27
27
 
28
28
  # Get result
29
29
  trim_mode = params[:trim_mode]
30
- erb = ::ERB.new(content, nil, trim_mode)
30
+ erb = ::ERB.new(content, trim_mode: trim_mode)
31
31
  erb.filename = filename
32
32
  erb.result(assigns_binding)
33
33
  end
@@ -8,13 +8,14 @@ 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
  [
15
15
  '*/@href',
16
16
  '*/@src',
17
17
  'object/@data',
18
+ 'video/@poster',
18
19
  'param[@name="movie"]/@value',
19
20
  'form/@action',
20
21
  'comment()',
@@ -78,7 +79,7 @@ module Nanoc::Filters
78
79
  end
79
80
  end
80
81
 
81
- memoized def excludes(params)
82
+ def excludes(params)
82
83
  raw = [params.fetch(:exclude, [])].flatten
83
84
  raw.map do |exclusion|
84
85
  case exclusion
@@ -89,6 +90,7 @@ module Nanoc::Filters
89
90
  end
90
91
  end
91
92
  end
93
+ memo_wise :excludes
92
94
 
93
95
  def exclude?(path, params)
94
96
  # TODO: Use #match? on newer Ruby versions
@@ -113,7 +115,7 @@ module Nanoc::Filters
113
115
  require 'nokogiri'
114
116
  ::Nokogiri::HTML
115
117
  when :html5
116
- require 'nokogumbo'
118
+ require 'nokogiri'
117
119
  ::Nokogiri::HTML5
118
120
  when :xml
119
121
  require 'nokogiri'
@@ -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.1'
5
+ VERSION = '4.12.5'
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.1
4
+ version: 4.12.5
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-04-05 00:00:00.000000000 Z
11
+ date: 2022-01-22 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.1
67
+ version: 4.12.5
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.1
74
+ version: 4.12.5
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.1
81
+ version: 4.12.5
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.1
88
+ version: 4.12.5
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:
@@ -236,14 +243,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
243
  requirements:
237
244
  - - ">="
238
245
  - !ruby/object:Gem::Version
239
- version: '2.5'
246
+ version: '2.6'
240
247
  required_rubygems_version: !ruby/object:Gem::Requirement
241
248
  requirements:
242
249
  - - ">="
243
250
  - !ruby/object:Gem::Version
244
251
  version: '0'
245
252
  requirements: []
246
- rubygems_version: 3.2.15
253
+ rubygems_version: 3.3.5
247
254
  signing_key:
248
255
  specification_version: 4
249
256
  summary: A static-site generator with a focus on flexibility.