hpcloud 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hpcloud/server_helper.rb +5 -1
- data/lib/hpcloud/version.rb +2 -2
- metadata +1 -1
@@ -206,11 +206,15 @@ module HP
|
|
206
206
|
def set_personality(directory)
|
207
207
|
return if directory.nil?
|
208
208
|
@personality = []
|
209
|
+
unless File.exists?(directory)
|
210
|
+
set_error("Directory does not exists '#{directory}'")
|
211
|
+
return false
|
212
|
+
end
|
209
213
|
Dir.glob("#{directory}/**/*").each { |file|
|
210
214
|
unless File.directory?(file)
|
211
215
|
rfile = file.gsub(directory, '')
|
212
216
|
hsh = { "path" => rfile,
|
213
|
-
"contents" =>
|
217
|
+
"contents" => File.read(file) }
|
214
218
|
@personality << hsh
|
215
219
|
end
|
216
220
|
}
|
data/lib/hpcloud/version.rb
CHANGED