pathutil 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pathutil/helpers.rb +2 -1
- data/lib/pathutil/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: 864e32b983eecdfbc1d928d509e4ca432ae92b4e
|
4
|
+
data.tar.gz: 29d984696ed37007719707369022c6f015dd3744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dde75fdcebede966d9ece517593bd1e8c6db7c4ee6cd91bba57a7218b185754dde2abe8f879d01c4132d9e3bc6437f6384128f407dca659c66173fb2055989e
|
7
|
+
data.tar.gz: d8d52741f92e185cc132186439e9657c2422492cd8fafbed06057b5b4a0c6a417a046acab5101fd35233aeb6aa0b24dbfb21eceb0ad678c3c156fade8703ac9c
|
data/lib/pathutil/helpers.rb
CHANGED
@@ -34,11 +34,12 @@ class Pathutil
|
|
34
34
|
|
35
35
|
# ------------------------------------------------------------------------
|
36
36
|
|
37
|
-
def make_tmpname(prefix = "", suffix = nil, root =
|
37
|
+
def make_tmpname(prefix = "", suffix = nil, root = nil)
|
38
38
|
prefix = prefix.join("-") if prefix.is_a?(Array)
|
39
39
|
suffix = suffix.join("-") if suffix.is_a?(Array)
|
40
40
|
suffix = suffix.gsub(/\A\-/, "") unless !suffix || suffix.empty?
|
41
41
|
prefix = prefix.gsub(/\-\Z/, "") + "-" unless prefix.empty?
|
42
|
+
root ||= Dir::Tmpname.tmpdir
|
42
43
|
|
43
44
|
File.join(root, Dir::Tmpname.make_tmpname(
|
44
45
|
prefix, suffix
|
data/lib/pathutil/version.rb
CHANGED