Module: DohBoot
- Defined in:
- lib/doh/boot/find_dohruby_19.rb,
lib/doh/boot/find_dohruby_18.rb
Overview
case 2 is: /usr/local/lib/ruby/gems/1.9.1/gems/dohboot-1/lib/doh/boot/find_dohruby_19.rb /usr/local/lib/ruby/gems/1.9.1/gems/dohboot-1/lib/doh/boot/find_dohruby.rb /usr/local/lib/ruby/gems/1.9.1/gems/dohboot-1/lib/doh/boot/find_dohruby.rb /usr/local/lib/ruby/gems/1.9.1/gems/dohboot-1/lib/doh/boot/init_runnable.rb /usr/local/lib/ruby/gems/1.9.1/gems/dohboot-1/lib/doh/boot/init_runnable.rb /rails/app/path/config/environment.rb
Constant Summary collapse
- @@start_path =
nil
Class Method Summary collapse
-
.find_dohruby_in_parents(dir, max_tries = 20) ⇒ Object
puts “*** ending trace”.
Class Method Details
.find_dohruby_in_parents(dir, max_tries = 20) ⇒ Object
puts “*** ending trace”
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/doh/boot/find_dohruby_19.rb', line 40 def self.find_dohruby_in_parents(dir, max_tries = 20) path = File.(dir) raise "unable to find dohruby" if (path == '/') || (max_tries <= 0) if File.exist?(File.join(path, 'dohruby')) return File.join(path, 'dohruby') else return find_dohruby_in_parents(File.join(path, '..'), max_tries - 1) end end |