mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Removed duplicated method find_root_with_flag
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
parent
21ff8849bb
commit
b0157f8d04
1 changed files with 0 additions and 15 deletions
|
@ -343,21 +343,6 @@ module Rails
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue