Module: HTAuth
- Defined in:
- lib/htauth.rb,
lib/htauth/cli.rb,
lib/htauth/md5.rb,
lib/htauth/file.rb,
lib/htauth/sha1.rb,
lib/htauth/crypt.rb,
lib/htauth/entry.rb,
lib/htauth/error.rb,
lib/htauth/argon2.rb,
lib/htauth/bcrypt.rb,
lib/htauth/console.rb,
lib/htauth/version.rb,
lib/htauth/algorithm.rb,
lib/htauth/plaintext.rb,
lib/htauth/cli/digest.rb,
lib/htauth/cli/passwd.rb,
lib/htauth/digest_file.rb,
lib/htauth/passwd_file.rb,
lib/htauth/digest_entry.rb,
lib/htauth/passwd_entry.rb,
lib/htauth/descendant_tracker.rb
Overview
With many thanks to JEG2 - graysoftinc.com/terminal-tricks/random-access-terminal
Defined Under Namespace
Modules: CLI, DescendantTracker Classes: Algorithm, Argon2, Bcrypt, Console, ConsoleError, Crypt, DigestEntry, DigestFile, DigestFileError, Entry, Error, File, FileAccessError, InvalidAlgorithmError, InvalidDigestEntry, InvalidPasswdEntry, Md5, PasswdEntry, PasswdFile, PasswdFileError, PasswordError, Plaintext, Sha1, TempFileError
Constant Summary collapse
- VERSION =
Public: The version of the htauth library
"2.3.0"
Class Method Summary collapse
- .lib_path(*args) ⇒ Object
-
.root_dir ⇒ Object
The root directory of the project is considered to be the parent directory of the ‘lib’ directory.
- .sub_path(sub, *args) ⇒ Object
Class Method Details
.lib_path(*args) ⇒ Object
20 21 22 |
# File 'lib/htauth.rb', line 20 def self.lib_path( *args ) self.sub_path( "lib", *args ) end |
.root_dir ⇒ Object
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.( __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 |
.sub_path(sub, *args) ⇒ Object
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 |