module Dt::Rake

Constants

SCRIPT_RAILS
VERSION

Public Class Methods

get_rails_dir(dir) click to toggle source
# File lib/dt/rake.rb, line 10
def self.get_rails_dir(dir)
  path = ::Pathname.new(dir)

  while path != path.parent
    return path if rails_dir?(path)
    path = path.parent
  end

  raise "No rails dir found in path"
end
rails_dir?(dir) click to toggle source
# File lib/dt/rake.rb, line 21
def self.rails_dir?(dir)
  return File.exists? ("#{dir}/#{SCRIPT_RAILS}")
end