Permalink
Browse files

clean up some warnings on trunk ruby

  • Loading branch information...
1 parent f7e0758 commit 4d4ff531b8807ee88a3fc46875c7e76f613956fb @tenderlove tenderlove committed Oct 31, 2013
@@ -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

0 comments on commit 4d4ff53

Please sign in to comment.