charmkit 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/charmkit/fs.rb +4 -14
- data/lib/charmkit/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: '085bbf025dc62ab2a3055ece656da11355623e06'
|
4
|
+
data.tar.gz: b34202cdbab9d6d49d3a2d7285cdd5ff01f9fa00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7f6052e9e05a23d5aa9256320916666ca9c9280c7040dac21226efda3abff7f986915a1fc11dd8874e6bf3936e740ef81855ed1c6f7f760e2989cf4e23a7746
|
7
|
+
data.tar.gz: 92fb9c39b875643eff49593b2097138cf8c511be8121fa26dc9459d09917f9f94269bba8f86e230fe859278b94381bdfbeacb960d58d5dbfcf460d35b1ff028b
|
data/lib/charmkit/fs.rb
CHANGED
@@ -2,24 +2,14 @@ require 'fileutils'
|
|
2
2
|
|
3
3
|
module Charmkit
|
4
4
|
module DSL
|
5
|
-
|
6
|
-
|
5
|
+
FileUtils.singleton_methods.each do |m|
|
6
|
+
define_method m, FileUtils.method(m).to_proc
|
7
7
|
end
|
8
|
-
|
9
8
|
def is_file?(path)
|
10
|
-
return File.exists?
|
9
|
+
return File.exists? path
|
11
10
|
end
|
12
|
-
|
13
11
|
def is_dir?(path)
|
14
|
-
return Dir.exists?
|
15
|
-
end
|
16
|
-
|
17
|
-
def mkdir(path)
|
18
|
-
FileUtils.mkdir_p path
|
19
|
-
end
|
20
|
-
|
21
|
-
def rm(path)
|
22
|
-
FileUtils.rm_rf(path, :force => true)
|
12
|
+
return Dir.exists? path
|
23
13
|
end
|
24
14
|
end
|
25
15
|
end
|
data/lib/charmkit/version.rb
CHANGED