nanoc-core 4.12.5 → 4.12.6

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: 38679d28c863c8f0780b95fff9f5d6605e935c6f66fefebe80ac1dbc9dbb027e
4
- data.tar.gz: 86addc1455cc60c1bf36a4a17fda2f91dfe4eacc2bade6ba1993c439d9274418
3
+ metadata.gz: d49707fbc3c897e11757663c5d79f8b75349b34ac7e110f2609b59c080214b20
4
+ data.tar.gz: d2b88897dd12e0d4cbedbde6a8fde5bcf61613adceb7214589d6f7b3d8fa90fc
5
5
  SHA512:
6
- metadata.gz: 310c159faa4a9b4ca44cc4b8a02d1f4620ffc8fd2410f737d66a00bc1f60f3096514d6bf28f82828726e27778dff3eae4104e7e26c1714f6b50eee4ed3265eb8
7
- data.tar.gz: 7f37f412f1718f1863df6f90c54d351d379f7f16a954824f04f8d7b0d68df4da9c8bfe0de5c068837453c34eb0978956f0e5724e5966c81a1c0022b184fff1ce
6
+ metadata.gz: e9c958ab4f52a499a95d483dbea86b8e1e2a0fbe41cddd29a46b13b3dd5c2d95924df6b216798c43cf9565be67084ce4cba19da33ffc7f022b61250f839f1141
7
+ data.tar.gz: 1679adcebcdc5380ceac677ad11460db995cd5b8c0491cb484b69c9ae0b6e98aa1a06fb87f662a6653641020120fde2288c8e75e3f94632b422b0d4858d906ef
@@ -92,6 +92,10 @@ module Nanoc
92
92
  end
93
93
  end
94
94
 
95
+ def use_clonefile?
96
+ defined?(Clonefile)
97
+ end
98
+
95
99
  private
96
100
 
97
101
  def dirname
@@ -132,7 +136,7 @@ module Nanoc
132
136
  # changed outside of Nanoc.
133
137
 
134
138
  # Try clonefile
135
- if defined?(Clonefile)
139
+ if use_clonefile?
136
140
  FileUtils.rm_f(to)
137
141
  begin
138
142
  res = Clonefile.always(from, to)
@@ -142,6 +146,9 @@ module Nanoc
142
146
  end
143
147
 
144
148
  # Fall back to old-school copy
149
+ if File.file?(to)
150
+ FileUtils.rm_f(to)
151
+ end
145
152
  FileUtils.cp(from, to)
146
153
  end
147
154
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Core
5
- VERSION = '4.12.5'
5
+ VERSION = '4.12.6'
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.12.5
4
+ version: 4.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-22 00:00:00.000000000 Z
11
+ date: 2022-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -301,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
301
  - !ruby/object:Gem::Version
302
302
  version: '0'
303
303
  requirements: []
304
- rubygems_version: 3.3.5
304
+ rubygems_version: 3.3.14
305
305
  signing_key:
306
306
  specification_version: 4
307
307
  summary: Core of Nanoc