nanoc-core 4.13.1 → 4.13.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: 5062e63e6a103ccdb96cfb8ab76da7a558f5e2f4c2f393a4346a494f15e9b296
4
- data.tar.gz: 826c0f6abd8c0bdc4015868e049dfbc7dd3a2b25a99993b864001ab2c8f91c33
3
+ metadata.gz: 7e6c97176b06fc6e36cbe73c77589ec6c745b053b40616da81f36b639869d0f6
4
+ data.tar.gz: 407d91dcc36e7435debe7bfd52356cb88b09f5cf23c8d4b539b5497432cbba83
5
5
  SHA512:
6
- metadata.gz: a767c88091e4f319e95834d3eb3cb10f2777f6202c47b021347de92c15481e295bf66e22a63756179292d17ed034537839c730183ce29c0c6c2a23b877578421
7
- data.tar.gz: 2bc8697eaf3176def11da3bd991e41866dc97fbd17f7b87745c134bfba59d1cc9056a18c7bed28629aef51c5104a0532d334dfa2b6f94d8acb16d1067082732b
6
+ metadata.gz: 86b66a9cd073606a2a001f1e0ae2ef6f8ba1ece1756791eebf1a609d723714552e759319b84bd34570b63bf6575c9116cf4adc932a8ba230e44a9c4732a3bdb8
7
+ data.tar.gz: 14c58ee6fa75b9e1a1101bcad88f261334f6e1eda10bddf423a8d9769b4f27795e683c3a5a614f19a30db37bc6b9d89b69940079371682777ad0d59b3d28d167
@@ -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.3'
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.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: 2024-11-04 00:00:00.000000000 Z
11
+ date: 2024-11-23 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.3/nanoc-core
307
307
  post_install_message:
308
308
  rdoc_options: []
309
309
  require_paths:
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
321
  requirements: []
322
- rubygems_version: 3.5.21
322
+ rubygems_version: 3.5.22
323
323
  signing_key:
324
324
  specification_version: 4
325
325
  summary: Core of Nanoc