G
gga
Getopt-Declare
--------------
There's a new bug fix release of Getopt-Declare, the port of Perl's
module by the same name.
This is a simple command parser using regexes where the help
documentation *is* the parser.
This version fixes some casting bug with private types and improves the
performance of parsing isolated flags a little.
GGEnv
-----
This is a simple for manipulation of environment variables that deals
with paths, using all of ruby's array functionality.
It should work properly across different platforms.
When loaded, it creates a module called Env.
Within it, it defines methods for [] and []=, so that you can do the
following:
Env.check_directories = false # turn off verification that
# directories exist (default: true)
path = Env['PATH']
path << "C:/newpath" # As path is modified, so
# is ENV['PATH']
path.delete_if { |x| x =~ /maya/ } # remove all paths that have maya
path.unshift ["C:/", "E:/bin"] # add these paths at start
Env['PATH'] = path[0,2] + path[4,6] # concat two slices
path.check_directories # check existance of directories
# for this variable only (unlike
# Env.check_directories = true)
--------------
There's a new bug fix release of Getopt-Declare, the port of Perl's
module by the same name.
This is a simple command parser using regexes where the help
documentation *is* the parser.
This version fixes some casting bug with private types and improves the
performance of parsing isolated flags a little.
GGEnv
-----
This is a simple for manipulation of environment variables that deals
with paths, using all of ruby's array functionality.
It should work properly across different platforms.
When loaded, it creates a module called Env.
Within it, it defines methods for [] and []=, so that you can do the
following:
Env.check_directories = false # turn off verification that
# directories exist (default: true)
path = Env['PATH']
path << "C:/newpath" # As path is modified, so
# is ENV['PATH']
path.delete_if { |x| x =~ /maya/ } # remove all paths that have maya
path.unshift ["C:/", "E:/bin"] # add these paths at start
Env['PATH'] = path[0,2] + path[4,6] # concat two slices
path.check_directories # check existance of directories
# for this variable only (unlike
# Env.check_directories = true)