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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d667fdfe9740b04cfb89b52ae97602abc239d3744d85667b049a477fd7340c3a
4
- data.tar.gz: 58b70ca67a73647560e0761af9cc6d26ebd9eef643fa5145eae850209a096194
3
+ metadata.gz: b9f5b2b70e1e4aaff3e68685b02cf6db7cae9244ef96fa62d476e0fde695cca7
4
+ data.tar.gz: b1b67ed41f98b1a5aa27dc3cf779a3ca31482790cc445e9890dff7e59ae2b64d
5
5
  SHA512:
6
- metadata.gz: f4199cfa2dbbc0306afb33e476c72b258b1dd61fc979ca3d8ea4d4a49fb3d66fc8972f9577ea5d3ac264bdf15be6782538d392758ae5642cf304580e7e56259e
7
- data.tar.gz: cfc6633370c3a6784061518d8001396fc094c5529e596c2283b75cc4ec8f581f29ac5c401c12253df1cb4a5982192648f3a02d5ad67a271d218ea53e729b8544
6
+ metadata.gz: 27dc200f7cd2f29f49ab418c83e432352870a28bda8b6b2af7fd30a66286b44a548b610cbfa2d19be2c1a7457b112f035eeaaf5800df3ae63247d616d2422a21
7
+ data.tar.gz: 75a14f90fa03071e029e434ad3aafc3f4ec2883806e1a2d51081484fe1b3f317f6417f9a4d9c1ae9f48452495acccf66df93042e4b3869751a828615048c5823
@@ -33,14 +33,14 @@ module Nanoc
33
33
  end
34
34
 
35
35
  def run_until_preprocessed
36
- @_res_preprocessed ||= begin
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
- @_res_reps_built ||= begin
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
- @_res_precompiled ||= begin
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)
@@ -65,17 +65,17 @@ module Nanoc
65
65
 
66
66
  # @api private
67
67
  def self.reset_caches
68
- @enabled_features = nil
68
+ @_enabled_features = nil
69
69
  end
70
70
 
71
71
  # @api private
72
72
  def self.enabled_features
73
- @enabled_features ||= Set.new(ENV.fetch('NANOC_FEATURES', '').split(','))
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
- @repo ||= {}
78
+ @_repo ||= {}
79
79
  end
80
80
 
81
81
  # @return [Enumerable<String>] Names of features that still exist, but
@@ -159,7 +159,7 @@ module Nanoc
159
159
  #
160
160
  # @api private
161
161
  def setup
162
- @setup ||= begin
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
- @output_filename ||=
231
+ @_output_filename ||=
232
232
  Nanoc::Core::TempFilenameFactory.instance.create(TMP_BINARY_ITEMS_DIR)
233
233
  end
234
234
 
@@ -26,7 +26,7 @@ module Nanoc
26
26
  end
27
27
 
28
28
  def start
29
- @thread ||= Thread.new do
29
+ @thread ||= Thread.new do # rubocop:disable Naming/MemoizedInstanceVariableName
30
30
  Thread.current.abort_on_exception = true
31
31
 
32
32
  loop do
@@ -8,7 +8,7 @@ module Nanoc
8
8
 
9
9
  # @return [Nanoc::Core::TempFilenameFactory] A common instance
10
10
  def self.instance
11
- @instance ||= new
11
+ @_instance ||= new
12
12
  end
13
13
 
14
14
  def initialize
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Core
5
- VERSION = '4.13.0'
5
+ VERSION = '4.13.2'
6
6
  end
7
7
  end
data/lib/nanoc/core.rb CHANGED
@@ -4,7 +4,6 @@
4
4
  require 'base64'
5
5
  require 'fiber'
6
6
  require 'find'
7
- require 'pstore'
8
7
  require 'singleton'
9
8
  require 'tmpdir'
10
9
  require 'yaml'
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.0
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-06-19 00:00:00.000000000 Z
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.0/nanoc-core
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.11
322
+ rubygems_version: 3.5.21
342
323
  signing_key:
343
324
  specification_version: 4
344
325
  summary: Core of Nanoc