def find_package(name, ref = nil)
      repo = find_repository(name)
      ref ||= repo.latest_package_version || repo.current_ref
      raise "invalid references" unless repo.has_ref?(ref)
      Models::Package.find_by(
        :repo_name => name,
        :rev_hash => repo.rev_hash[ref],
      )
    end
def find_package(name, ref = nil)
      repo = find_repository(name)
      ref ||= repo.latest_package_version || repo.current_ref
      raise "invalid references" unless repo.has_ref?(ref)
      Models::Package.find_by(
        :repo_name => name,
        :rev_hash => repo.rev_hash[ref],
      )
    end
Find repository by repo name

 @param name [String] The name of repository