Skip to content

Commit

Permalink
Removed duplicated method find_root_with_flag
Browse files Browse the repository at this point in the history
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information
drogus authored and spastorino committed Oct 15, 2010
1 parent 21ff884 commit b0157f8
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions railties/lib/rails/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,21 +343,6 @@ def inherited(base)
super
end

def find_root_with_flag(flag, default=nil)
root_path = self.called_from

while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}")
parent = File.dirname(root_path)
root_path = parent != root_path && parent
end

root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root

RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ?
Pathname.new(root).expand_path : Pathname.new(root).realpath
end

def endpoint(endpoint = nil)
@endpoint = endpoint if endpoint
@endpoint
Expand Down

0 comments on commit b0157f8

Please sign in to comment.