dev 2.0.82 → 2.0.83
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dev_environment.rb +15 -20
- 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: fbfd7fab2e5827783e8be33b07190f743374e916
|
4
|
+
data.tar.gz: b1cc7722ffda474137895171364d1607276ec750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 086a10c44739e0598d93732b33ba802323eee49be06e3db3755de9b1b0b754132de94be1d51e1b3e8ff6c0c2eed0a603a18e42da88124c3d318f0fefe98ecc1b
|
7
|
+
data.tar.gz: 97daa9f3ed9fd7d154ed6077f0d0e5159d8e671b31249de0d71ba378a1f818ec1037ff144d5282a0a1e3482e5f0f1072cd65dcdbf6842f2c04a2c42ef74396f4
|
data/lib/dev_environment.rb
CHANGED
@@ -53,28 +53,23 @@ class File
|
|
53
53
|
def self.publish destination, source_dir, source_glob='**/*'
|
54
54
|
|
55
55
|
output = "\n"
|
56
|
-
|
57
|
-
|
58
|
-
puts "File.publish: destination #{destination} already exists"
|
59
|
-
else
|
60
|
-
# directory
|
61
|
-
FileUtils.mkdir_p destination if !File.exists? destination
|
56
|
+
# directory
|
57
|
+
FileUtils.mkdir_p destination if !File.exists? destination
|
62
58
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
59
|
+
files=nil
|
60
|
+
Dir.chdir(source_dir) do
|
61
|
+
files=FileList.new(source_glob).to_a
|
62
|
+
end
|
63
|
+
output = output + "\nfiles: #{files}.to_s"
|
68
64
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
output
|
65
|
+
Dir.chdir(source_dir) do
|
66
|
+
files.each{|f|
|
67
|
+
file="#{destination}/#{f}"
|
68
|
+
dirname=File.dirname(file)
|
69
|
+
FileUtils.mkdir_p dirname if !File.exists? dirname
|
70
|
+
FileUtils.cp(f,file) if !File.exists? file
|
71
|
+
}
|
78
72
|
end
|
73
|
+
output
|
79
74
|
end
|
80
75
|
end
|