hpcloud 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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