[ANN] Getopt-Declare 1.12 (gem/zip) and GGEnv (gem/zip)

Discussion in 'Ruby' started by gga, Jul 18, 2005.

  1. gga

    gga Guest

    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)
     
    gga, Jul 18, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Kuhlman

    ANN: zip-ls -- Zip file listing program

    Dave Kuhlman, Jul 19, 2003, in forum: Python
    Replies:
    0
    Views:
    538
    Dave Kuhlman
    Jul 19, 2003
  2. GGarramuno
    Replies:
    4
    Views:
    217
    Pit Capitain
    Jan 11, 2004
  3. Joel VanderWerf

    gem install getopt problem

    Joel VanderWerf, Nov 18, 2005, in forum: Ruby
    Replies:
    4
    Views:
    205
    Joel VanderWerf
    Nov 18, 2005
  4. Nexos
    Replies:
    0
    Views:
    192
    Nexos
    May 11, 2006
  5. gga
    Replies:
    6
    Views:
    230
  6. Nexos
    Replies:
    4
    Views:
    210
    Nexos
    Mar 21, 2007
  7. gga
    Replies:
    1
    Views:
    194
    Duane Johnson
    Mar 21, 2007
  8. Replies:
    0
    Views:
    610
Loading...