Module: HTAuth

Defined in:
lib/htauth.rb,
lib/htauth/md5.rb,
lib/htauth/file.rb,
lib/htauth/sha1.rb,
lib/htauth/entry.rb,
lib/htauth/crypt.rb,
lib/htauth/passwd.rb,
lib/htauth/digest.rb,
lib/htauth/version.rb,
lib/htauth/plaintext.rb,
lib/htauth/algorithm.rb,
lib/htauth/digest_file.rb,
lib/htauth/passwd_file.rb,
lib/htauth/passwd_entry.rb,
lib/htauth/digest_entry.rb

Overview

-- Copyrigth (c) 2008 Jeremy Hinegardner All rights reserved. See LICENSE and/or COPYING for details ++

Defined Under Namespace

Modules: Version Classes: Algorithm, Crypt, Digest, DigestEntry, DigestFile, DigestFileError, Entry, File, FileAccessError, InvalidAlgorithmError, InvalidDigestEntry, InvalidPasswdEntry, Md5, Passwd, PasswdEntry, PasswdFile, PasswdFileError, PasswordError, Plaintext, Sha1, TempFileError

Constant Summary

VERSION =
Version.to_s

Class Method Summary (collapse)

Class Method Details

+ (Object) lib_path(*args)



20
21
22
# File 'lib/htauth.rb', line 20

def self.lib_path( *args )
  self.sub_path( "lib", *args )
end

+ (Object) root_dir

The root directory of the project is considered to be the parent directory of the 'lib' directory.



11
12
13
14
15
16
17
18
# File 'lib/htauth.rb', line 11

def self.root_dir
  unless @root_dir
    path_parts = ::File.expand_path( __FILE__ ).split( ::File::SEPARATOR )
    lib_index  = path_parts.rindex( 'lib' )
    @root_dir  = path_parts[ 0...lib_index].join( ::File::SEPARATOR ) + ::File::SEPARATOR
  end
  return @root_dir
end

+ (Object) sub_path(sub, *args)



24
25
26
27
# File 'lib/htauth.rb', line 24

def self.sub_path( sub, *args )
  sp = ::File.join( root_dir, sub ) + ::File::SEPARATOR
  sp = ::File.join( sp, *args ) if args
end