nanoc-core 4.11.20 → 4.11.21
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.rb +7 -1
- data/lib/nanoc/core/item_rep_writer.rb +7 -5
- data/lib/nanoc/core/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9f63cf9ed0953520b811eb964d1b71cad082bc07f945c5b9c838a3730dc9cc2
|
4
|
+
data.tar.gz: 58e44db73eb2a9fdd8959964802b78570e15ddc2e4ae8afd2a5da9161da06c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4d4b9458fc23a57bb961c0ed9ff31dd82b43f243cf92d2c45424efda54d3ccacab16be0fd36805f606958eb9167b6537c178ff23c15947f2a2f667bd9901f40
|
7
|
+
data.tar.gz: 4668c6c8188d5c885829421d4d4e3564146f9f935576be13daed38410ca7537781545d2f44f4c3a44fdb1c145d1331baf84526b37732f85cdfb9e1e77ce3ccdd
|
data/lib/nanoc/core.rb
CHANGED
@@ -9,7 +9,6 @@ require 'tmpdir'
|
|
9
9
|
require 'yaml'
|
10
10
|
|
11
11
|
# External gems
|
12
|
-
require 'clonefile'
|
13
12
|
require 'concurrent-ruby'
|
14
13
|
require 'json_schema'
|
15
14
|
require 'ddmemoize'
|
@@ -21,6 +20,13 @@ require 'tomlrb'
|
|
21
20
|
require 'tty-platform'
|
22
21
|
require 'zeitwerk'
|
23
22
|
|
23
|
+
# External gems (optional)
|
24
|
+
begin
|
25
|
+
require 'clonefile'
|
26
|
+
rescue LoadError
|
27
|
+
# ignore
|
28
|
+
end
|
29
|
+
|
24
30
|
module Nanoc
|
25
31
|
module Core
|
26
32
|
# Similar to `nil` except that it can only be compared against using
|
@@ -79,11 +79,13 @@ module Nanoc
|
|
79
79
|
|
80
80
|
def smart_cp(from, to)
|
81
81
|
# Try clonefile
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
82
|
+
if defined?(Clonefile)
|
83
|
+
FileUtils.rm_f(to)
|
84
|
+
begin
|
85
|
+
res = Clonefile.always(from, to)
|
86
|
+
return if res
|
87
|
+
rescue Clonefile::UnsupportedPlatform, Errno::ENOTSUP, Errno::EXDEV, Errno::EINVAL
|
88
|
+
end
|
87
89
|
end
|
88
90
|
|
89
91
|
# Try with hardlink
|
data/lib/nanoc/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.11.
|
4
|
+
version: 4.11.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
@@ -10,20 +10,6 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: clonefile
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.5.2
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.5.2
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: concurrent-ruby
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|