Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def project_home_directory
- # Scan for parrents directory and return the project home path
- curr_dir = Dir.pwd
- loop do
- return curr_dir if File.file?("#{curr_dir}/Gemfile")
- curr_dir = File.expand_path('..', curr_dir)
- break if curr_dir == '/'
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement