nanoc 4.11.23 → 4.12.3

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: 62aca390e356bc49d4e3b3f8208d246a8f52e4dd5b55bc5e75ad23f2d17c4997
4
- data.tar.gz: 5f1839b2db8203b370e53ae5d2e1a596508dd689a64fd7cb91bd196ff96c0efc
3
+ metadata.gz: 8f2b5030c2fc46edeec3c725dfa6264fa32f7afa58531960e355479bbef66821
4
+ data.tar.gz: 25f70a7eb276e2cf83e984c43d69b3f622298ddf82755f4388671f028a6937e9
5
5
  SHA512:
6
- metadata.gz: 81bc493f92db0f0bedc4f4ea9a8716e1c438bdcd47022f5882ff60ead2046dd00356700e1b54e82f57d370a4711664c9dc62e1847c2b089fac450261e1e5ea64
7
- data.tar.gz: 9ef9a998a577c49e47231f641ed4af366c6db7f2386501fe18ec16033513148a34d9474f483fba73f8f41b3fde31b743cd98d0a75f9d044de654454df1b4d68d
6
+ metadata.gz: 35a0eae0e232086859c07bc620f53d4478558252dd290f2f19d54abbb76f9e3a839af9eb36e1c107ec78bac643e511cab1693d3f98078a063a7c500841ea5a6b
7
+ data.tar.gz: 88ae09d525cd7a475cc36c48dbfdcba9dfbefafe33e400795cbcbaa17c0dc140447aba434b83c37a0394243856c2a451053f54dcd646cbbf616f9e746f15cffc
data/NEWS.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Nanoc news
2
2
 
3
+ ## 4.12.3 (2021-10-09)
4
+
5
+ Fixes:
6
+
7
+ - Switched ERB to use keyword arguments (#1547, #1550) [Daniel Aleksandersen]
8
+ - Removed use_helper re-definition warning (#1548, #1553) [Daniel Aleksandersen]
9
+ - Fixed issue which could cause items not to be recalculated when removing items in the preprocess block (#1554, #1555)
10
+ - Dropped Nokogumbo in favor of Nokogiri (#1546, #1549) [Daniel Aleksandersen]
11
+
12
+ ## 4.12.2 (2021-05-28)
13
+
14
+ Enhancements:
15
+
16
+ - Add support for `video/@poster` to relativize_paths (#1544) [Masayuki Higashino]
17
+
18
+ ## 4.12.1 (2021-04-05)
19
+
20
+ Enhancements:
21
+
22
+ - Made Nanoc expand paths containing `~` (home directory) in the filesystem data source configuration (!4, !5, !6)
23
+
24
+ ## 4.12.0 (2021-02-20)
25
+
26
+ Features:
27
+
28
+ - Added `-W`/`--watch` flag to the `compile` command (requires the `nanoc-live` gem)
29
+
30
+ Enhancements:
31
+
32
+ - Made the compiler cache binary items
33
+
3
34
  ## 4.11.23 (2021-01-16)
4
35
 
5
36
  Fixes:
@@ -81,6 +81,15 @@ class Nanoc::DataSources::Filesystem < Nanoc::DataSource
81
81
  end.compact.flatten
82
82
  end
83
83
 
84
+ # Expands the path (including resolving ~ for home directory) and returns
85
+ # a relative path to the expanded path.
86
+ def expand_and_relativize_path(path)
87
+ from = Pathname.new(Dir.getwd)
88
+ to = Pathname.new(File.expand_path(path))
89
+
90
+ to.relative_path_from(from).to_s
91
+ end
92
+
84
93
  # Returns all files and directories in the given directory and
85
94
  # directories below it.
86
95
  #
@@ -92,14 +92,16 @@ module Nanoc::DataSources
92
92
  require 'listen'
93
93
 
94
94
  Nanoc::Core::ChangesStream.new do |cl|
95
- listener =
96
- Listen.to(dir) do |_modifieds, _addeds, _deleteds|
97
- cl.unknown
98
- end
95
+ if dir
96
+ listener =
97
+ Listen.to(File.expand_path(dir)) do |_modifieds, _addeds, _deleteds|
98
+ cl.unknown
99
+ end
99
100
 
100
- listener.start
101
+ listener.start
101
102
 
102
- cl.to_stop { listener.stop }
103
+ cl.to_stop { listener.stop }
104
+ end
103
105
 
104
106
  sleep
105
107
  end
@@ -182,6 +184,8 @@ module Nanoc::DataSources
182
184
 
183
185
  return [] if dir_name.nil?
184
186
 
187
+ dir_name = Tools.expand_and_relativize_path(dir_name)
188
+
185
189
  each_content_meta_pair_in(dir_name) do |content_filename, meta_filename|
186
190
  proto_doc = read_proto_document(content_filename, meta_filename, klass)
187
191
 
@@ -295,6 +299,8 @@ module Nanoc::DataSources
295
299
  # 'content/qux' => [ nil, ['html'] ]
296
300
  # }
297
301
  def all_split_files_in(dir_name)
302
+ dir_name = Tools.expand_and_relativize_path(dir_name)
303
+
298
304
  by_basename =
299
305
  all_files_in(dir_name)
300
306
  .reject { |fn| fn =~ /(~|\.orig|\.rej|\.bak)$/ }
@@ -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
@@ -15,6 +15,7 @@ module Nanoc::Filters
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()',
@@ -113,7 +114,7 @@ module Nanoc::Filters
113
114
  require 'nokogiri'
114
115
  ::Nokogiri::HTML
115
116
  when :html5
116
- require 'nokogumbo'
117
+ require 'nokogiri'
117
118
  ::Nokogiri::HTML5
118
119
  when :xml
119
120
  require 'nokogiri'
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.11.23'
5
+ VERSION = '4.12.3'
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.11.23
4
+ version: 4.12.3
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-01-16 00:00:00.000000000 Z
11
+ date: 2021-10-09 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.11.23
61
+ version: 4.12.3
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.11.23
68
+ version: 4.12.3
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.11.23
75
+ version: 4.12.3
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.11.23
82
+ version: 4.12.3
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: nanoc-deploying
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -236,14 +236,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
236
  requirements:
237
237
  - - ">="
238
238
  - !ruby/object:Gem::Version
239
- version: '2.5'
239
+ version: '2.6'
240
240
  required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  requirements:
242
242
  - - ">="
243
243
  - !ruby/object:Gem::Version
244
244
  version: '0'
245
245
  requirements: []
246
- rubygems_version: 3.2.5
246
+ rubygems_version: 3.2.28
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: A static-site generator with a focus on flexibility.