nanoc 4.11.20 → 4.12.1
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/NEWS.md +40 -0
- data/lib/nanoc/data_sources/filesystem.rb +12 -6
- data/lib/nanoc/data_sources/filesystem/tools.rb +9 -0
- data/lib/nanoc/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03e5fe63fbd9c83f6e9cda3917fee02b124812dab948dc0e08517bec14e209e5
|
4
|
+
data.tar.gz: 503710ac47ccea7c3a4c30c2bea8dd566598c5a4369f6412b087f04488d3e9fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89416645ab505a5d48e4a7ed5da24c62f9c69fde586c86a9ad8d01b0c8ee19c24e24c503124c5e943d2cd92587891e9c0a50ed7ba7d1f41d236517567c96710f
|
7
|
+
data.tar.gz: f571bb80982f05073f382d7b54b89c7a4e88054a0e92d0d7dcc56c3a0a9404ca80a6e31df0bbe2811a86341dc51c347e9d8de76d18096ed8c95aa2865537b180
|
data/NEWS.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
# Nanoc news
|
2
2
|
|
3
|
+
## 4.12.1 (2021-04-05)
|
4
|
+
|
5
|
+
Enhancements:
|
6
|
+
|
7
|
+
- Made Nanoc expand paths containing `~` (home directory) in the filesystem data source configuration (!4, !5, !6)
|
8
|
+
|
9
|
+
## 4.12.0 (2021-02-20)
|
10
|
+
|
11
|
+
Features:
|
12
|
+
|
13
|
+
- Added `-W`/`--watch` flag to the `compile` command (requires the `nanoc-live` gem)
|
14
|
+
|
15
|
+
Enhancements:
|
16
|
+
|
17
|
+
- Made the compiler cache binary items
|
18
|
+
|
19
|
+
## 4.11.23 (2021-01-16)
|
20
|
+
|
21
|
+
Fixes:
|
22
|
+
|
23
|
+
- Fixed issue which could cause nanoc-live to keep running and use 100% CPU (#1538)
|
24
|
+
|
25
|
+
## 4.11.22 (2021-01-01)
|
26
|
+
|
27
|
+
Changes:
|
28
|
+
|
29
|
+
- Dropped support for Ruby 2.4 (EOL)
|
30
|
+
|
31
|
+
Fixes:
|
32
|
+
|
33
|
+
- Added support for Ruby 3.0
|
34
|
+
|
35
|
+
## 4.11.21 (2020-12-18)
|
36
|
+
|
37
|
+
Fixes:
|
38
|
+
|
39
|
+
- Made clonefile usage optional
|
40
|
+
|
41
|
+
You can add `clonefile` to your Gemfile to let Nanoc make use of your filesystem’s copy-on-write functionality (if available), which is not only faster but also more space-efficient. In the previous release, 4.11.20, clonefile was mandatory, even though it won’t properly compile on older operating systems.
|
42
|
+
|
3
43
|
## 4.11.20 (2020-12-18)
|
4
44
|
|
5
45
|
Enhancements:
|
@@ -92,14 +92,16 @@ module Nanoc::DataSources
|
|
92
92
|
require 'listen'
|
93
93
|
|
94
94
|
Nanoc::Core::ChangesStream.new do |cl|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
95
|
+
if dir
|
96
|
+
listener =
|
97
|
+
Listen.to(File.expand_path(dir)) do |_modifieds, _addeds, _deleteds|
|
98
|
+
cl.unknown
|
99
|
+
end
|
99
100
|
|
100
|
-
|
101
|
+
listener.start
|
101
102
|
|
102
|
-
|
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)$/ }
|
@@ -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
|
#
|
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.
|
4
|
+
version: 4.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-05 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.
|
61
|
+
version: 4.12.1
|
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.
|
68
|
+
version: 4.12.1
|
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.
|
75
|
+
version: 4.12.1
|
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.
|
82
|
+
version: 4.12.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: nanoc-deploying
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -228,23 +228,23 @@ homepage: https://nanoc.ws/
|
|
228
228
|
licenses:
|
229
229
|
- MIT
|
230
230
|
metadata: {}
|
231
|
-
post_install_message:
|
231
|
+
post_install_message:
|
232
232
|
rdoc_options: []
|
233
233
|
require_paths:
|
234
234
|
- lib
|
235
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
236
236
|
requirements:
|
237
|
-
- - "
|
237
|
+
- - ">="
|
238
238
|
- !ruby/object:Gem::Version
|
239
|
-
version: '2.
|
239
|
+
version: '2.5'
|
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.
|
247
|
-
signing_key:
|
246
|
+
rubygems_version: 3.2.15
|
247
|
+
signing_key:
|
248
248
|
specification_version: 4
|
249
249
|
summary: A static-site generator with a focus on flexibility.
|
250
250
|
test_files: []
|