clean up some warnings on trunk ruby

This commit is contained in:
Aaron Patterson 2013-10-31 11:47:51 -07:00
parent f7e0758714
commit 4d4ff531b8
4 changed files with 4 additions and 4 deletions

@ -92,7 +92,7 @@ def execute_if_updated
def watched
@watched || begin
all = @files.select { |f| File.exists?(f) }
all = @files.select { |f| File.exist?(f) }
all.concat(Dir[@glob]) if @glob
all
end

@ -223,7 +223,7 @@ def isolate_namespace(mod)
# you need to load files in lib/ during the application configuration as well.
def add_lib_to_load_path! #:nodoc:
path = File.join config.root, 'lib'
if File.exists?(path) && !$LOAD_PATH.include?(path)
if File.exist?(path) && !$LOAD_PATH.include?(path)
$LOAD_PATH.unshift(path)
end
end

@ -90,7 +90,7 @@ def paths
# Loads and returns the configuration of the database.
def database_configuration
yaml = paths["config/database"].first
if File.exists?(yaml)
if File.exist?(yaml)
require "erb"
YAML.load ERB.new(IO.read(yaml)).result
elsif ENV['DATABASE_URL']

@ -198,7 +198,7 @@ def expanded
# Returns all expanded paths but only if they exist in the filesystem.
def existent
expanded.select { |f| File.exists?(f) }
expanded.select { |f| File.exist?(f) }
end
def existent_directories