mores 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mores/patch/file_utils.rb +3 -3
- data/lib/mores/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4ae50b94b0120512ed6d6aa75d91e31873700a0
|
4
|
+
data.tar.gz: 8c5d35a6f481a508fcff8674dc3dcbb28e5ed2d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adb428334b1aef4b165cd10c7b0acec3e5eac2afd54977808ed810b478def9850cb65e00ed1e35b9a8d74d1be5a7d4ced0d2c968ccc7d965b7a75c2d7bbd20b8
|
7
|
+
data.tar.gz: a913efe235a7e3a24a328a052c1f7ee760b6e33f991fe7d1228a5910f03edcf6e4e892208500fb671c937ec8bc6c6435d2145caf01160b189072af6be023dd20
|
@@ -19,10 +19,10 @@ module Mores::Patch::FileUtils
|
|
19
19
|
[path, File.write(path, string, mode: File::CREAT | File::EXCL | File::WRONLY)]
|
20
20
|
rescue Errno::EEXIST
|
21
21
|
path_fmt ||= File.basename(path, '.*').tap do |base|
|
22
|
-
break path.insert path.rindex(base) + base.length, '%
|
22
|
+
break path.insert path.rindex(base) + base.length, '_%d'
|
23
23
|
end
|
24
|
-
suffix ||=
|
25
|
-
path = path_fmt % suffix.next
|
24
|
+
suffix ||= (0..Float::INFINITY).each
|
25
|
+
path = path_fmt % suffix.next
|
26
26
|
retry
|
27
27
|
end
|
28
28
|
|
data/lib/mores/version.rb
CHANGED