nanoc-core 4.13.0 → 4.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nanoc/core/compiler.rb +3 -3
- data/lib/nanoc/core/feature.rb +3 -3
- data/lib/nanoc/core/filter.rb +2 -2
- data/lib/nanoc/core/notification_center.rb +1 -1
- data/lib/nanoc/core/temp_filename_factory.rb +1 -1
- data/lib/nanoc/core/utils.rb +38 -0
- data/lib/nanoc/core/version.rb +1 -1
- data/lib/nanoc/core.rb +0 -1
- metadata +5 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9f5b2b70e1e4aaff3e68685b02cf6db7cae9244ef96fa62d476e0fde695cca7
|
4
|
+
data.tar.gz: b1b67ed41f98b1a5aa27dc3cf779a3ca31482790cc445e9890dff7e59ae2b64d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27dc200f7cd2f29f49ab418c83e432352870a28bda8b6b2af7fd30a66286b44a548b610cbfa2d19be2c1a7457b112f035eeaaf5800df3ae63247d616d2422a21
|
7
|
+
data.tar.gz: 75a14f90fa03071e029e434ad3aafc3f4ec2883806e1a2d51081484fe1b3f317f6417f9a4d9c1ae9f48452495acccf66df93042e4b3869751a828615048c5823
|
data/lib/nanoc/core/compiler.rb
CHANGED
@@ -33,14 +33,14 @@ module Nanoc
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def run_until_preprocessed
|
36
|
-
@
|
36
|
+
@_run_until_preprocessed ||= begin
|
37
37
|
preprocess_stage.call
|
38
38
|
{}
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
42
|
def run_until_reps_built
|
43
|
-
@
|
43
|
+
@_run_until_reps_built ||= begin
|
44
44
|
prev = run_until_preprocessed
|
45
45
|
|
46
46
|
res = build_reps_stage.call
|
@@ -53,7 +53,7 @@ module Nanoc
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def run_until_precompiled
|
56
|
-
@
|
56
|
+
@_run_until_precompiled ||= begin
|
57
57
|
prev = run_until_reps_built
|
58
58
|
action_sequences = prev.fetch(:action_sequences)
|
59
59
|
reps = prev.fetch(:reps)
|
data/lib/nanoc/core/feature.rb
CHANGED
@@ -65,17 +65,17 @@ module Nanoc
|
|
65
65
|
|
66
66
|
# @api private
|
67
67
|
def self.reset_caches
|
68
|
-
@
|
68
|
+
@_enabled_features = nil
|
69
69
|
end
|
70
70
|
|
71
71
|
# @api private
|
72
72
|
def self.enabled_features
|
73
|
-
@
|
73
|
+
@_enabled_features ||= Set.new(ENV.fetch('NANOC_FEATURES', '').split(','))
|
74
74
|
end
|
75
75
|
|
76
76
|
# @api private
|
77
77
|
def self.repo
|
78
|
-
@
|
78
|
+
@_repo ||= {}
|
79
79
|
end
|
80
80
|
|
81
81
|
# @return [Enumerable<String>] Names of features that still exist, but
|
data/lib/nanoc/core/filter.rb
CHANGED
@@ -159,7 +159,7 @@ module Nanoc
|
|
159
159
|
#
|
160
160
|
# @api private
|
161
161
|
def setup
|
162
|
-
@
|
162
|
+
@_setup ||= begin
|
163
163
|
requires.each { |r| require r }
|
164
164
|
true
|
165
165
|
end
|
@@ -228,7 +228,7 @@ module Nanoc
|
|
228
228
|
#
|
229
229
|
# @return [String] The output filename
|
230
230
|
def output_filename
|
231
|
-
@
|
231
|
+
@_output_filename ||=
|
232
232
|
Nanoc::Core::TempFilenameFactory.instance.create(TMP_BINARY_ITEMS_DIR)
|
233
233
|
end
|
234
234
|
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# .sub(/^[A-Z]:/,'')
|
4
|
+
|
5
|
+
module Nanoc
|
6
|
+
module Core
|
7
|
+
# Utilities that don’t fit anywhere else.
|
8
|
+
#
|
9
|
+
# @api private
|
10
|
+
module Utils
|
11
|
+
# Same as File.expand_path, but does not add a drive identifier on
|
12
|
+
# Windows. This is necessary in case the path is a Nanoc path, rather than
|
13
|
+
# a filesystem path.
|
14
|
+
def self.expand_path_without_drive_identifier(file_name, dir_string)
|
15
|
+
res = File.expand_path(file_name, dir_string)
|
16
|
+
|
17
|
+
if windows_fs?
|
18
|
+
# On Windows, strip the drive identifier, e.g. `C:`.
|
19
|
+
res = res.sub(/^[A-Z]:/, '')
|
20
|
+
end
|
21
|
+
|
22
|
+
res
|
23
|
+
end
|
24
|
+
|
25
|
+
# Returns `true` if absolute file paths start with a drive identifier, like `C:`.
|
26
|
+
def self.windows_fs?
|
27
|
+
# NOTE: This isn’t memoized with ||= because @_windows_fs is a boolean.
|
28
|
+
|
29
|
+
return @_windows_fs if defined?(@_windows_fs)
|
30
|
+
|
31
|
+
absolute_path = File.expand_path('/a')
|
32
|
+
@_windows_fs = absolute_path.start_with?(/^[A-Z]:/)
|
33
|
+
|
34
|
+
@_windows_fs
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/nanoc/core/version.rb
CHANGED
data/lib/nanoc/core.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.13.
|
4
|
+
version: 4.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -108,26 +108,6 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.5'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: psych
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '4.0'
|
118
|
-
- - "<"
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '6.0'
|
121
|
-
type: :runtime
|
122
|
-
prerelease: false
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - ">="
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '4.0'
|
128
|
-
- - "<"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '6.0'
|
131
111
|
- !ruby/object:Gem::Dependency
|
132
112
|
name: slow_enumerator_tools
|
133
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -311,6 +291,7 @@ files:
|
|
311
291
|
- lib/nanoc/core/textual_compiled_content_cache.rb
|
312
292
|
- lib/nanoc/core/textual_content.rb
|
313
293
|
- lib/nanoc/core/trivial_error.rb
|
294
|
+
- lib/nanoc/core/utils.rb
|
314
295
|
- lib/nanoc/core/version.rb
|
315
296
|
- lib/nanoc/core/view.rb
|
316
297
|
- lib/nanoc/core/view_context_for_compilation.rb
|
@@ -322,7 +303,7 @@ licenses:
|
|
322
303
|
- MIT
|
323
304
|
metadata:
|
324
305
|
rubygems_mfa_required: 'true'
|
325
|
-
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.13.
|
306
|
+
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.13.2/nanoc-core
|
326
307
|
post_install_message:
|
327
308
|
rdoc_options: []
|
328
309
|
require_paths:
|
@@ -338,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
319
|
- !ruby/object:Gem::Version
|
339
320
|
version: '0'
|
340
321
|
requirements: []
|
341
|
-
rubygems_version: 3.5.
|
322
|
+
rubygems_version: 3.5.21
|
342
323
|
signing_key:
|
343
324
|
specification_version: 4
|
344
325
|
summary: Core of Nanoc
|