lib/vitrine.rb in vitrine-0.0.2 vs lib/vitrine.rb in vitrine-0.0.3
- old
+ new
@@ -7,15 +7,15 @@
module Vitrine
DEFAULTS = { root: Dir.getwd, port: 4000, host: '127.0.0.1' }
def self.check_dirs_present!
views = DEFAULTS[:root] + '/views'
- unless File.exist?(views) and File.dir?(views)
+ unless File.exist?(views) and File.directory?(views)
$stderr.puts "WARNING: `views' directory not found under the current tree, you might want to create it"
end
public = DEFAULTS[:root] + '/public'
- unless File.exist?(views) and File.dir?(views)
+ unless File.exist?(views) and File.directory?(views)
$stderr.puts "ERROR: `public' directory not found under the current tree, you might want to create it"
exit 1
end
end
\ No newline at end of file