nanoc-core 4.13.1 → 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: 5062e63e6a103ccdb96cfb8ab76da7a558f5e2f4c2f393a4346a494f15e9b296
4
- data.tar.gz: 826c0f6abd8c0bdc4015868e049dfbc7dd3a2b25a99993b864001ab2c8f91c33
3
+ metadata.gz: b9f5b2b70e1e4aaff3e68685b02cf6db7cae9244ef96fa62d476e0fde695cca7
4
+ data.tar.gz: b1b67ed41f98b1a5aa27dc3cf779a3ca31482790cc445e9890dff7e59ae2b64d
5
5
  SHA512:
6
- metadata.gz: a767c88091e4f319e95834d3eb3cb10f2777f6202c47b021347de92c15481e295bf66e22a63756179292d17ed034537839c730183ce29c0c6c2a23b877578421
7
- data.tar.gz: 2bc8697eaf3176def11da3bd991e41866dc97fbd17f7b87745c134bfba59d1cc9056a18c7bed28629aef51c5104a0532d334dfa2b6f94d8acb16d1067082732b
6
+ metadata.gz: 27dc200f7cd2f29f49ab418c83e432352870a28bda8b6b2af7fd30a66286b44a548b610cbfa2d19be2c1a7457b112f035eeaaf5800df3ae63247d616d2422a21
7
+ data.tar.gz: 75a14f90fa03071e029e434ad3aafc3f4ec2883806e1a2d51081484fe1b3f317f6417f9a4d9c1ae9f48452495acccf66df93042e4b3869751a828615048c5823
@@ -14,13 +14,25 @@ module Nanoc
14
14
  def self.expand_path_without_drive_identifier(file_name, dir_string)
15
15
  res = File.expand_path(file_name, dir_string)
16
16
 
17
- if Nanoc::Core.on_windows?
17
+ if windows_fs?
18
18
  # On Windows, strip the drive identifier, e.g. `C:`.
19
19
  res = res.sub(/^[A-Z]:/, '')
20
20
  end
21
21
 
22
22
  res
23
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
24
36
  end
25
37
  end
26
38
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Core
5
- VERSION = '4.13.1'
5
+ VERSION = '4.13.2'
6
6
  end
7
7
  end
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.1
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-04 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
@@ -303,7 +303,7 @@ licenses:
303
303
  - MIT
304
304
  metadata:
305
305
  rubygems_mfa_required: 'true'
306
- source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.13.1/nanoc-core
306
+ source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-core-v4.13.2/nanoc-core
307
307
  post_install_message:
308
308
  rdoc_options: []
309
309
  require_paths: