Including a config file into a local directory

Discussion in 'Ruby' started by eddieroger, Feb 25, 2007.

  1. eddieroger

    eddieroger Guest

    Hello group,

    I'm working on a library for accessing MediaWiki wikies through its
    new API, and I had a question about a config file and gem
    distribution. I'd like for my include to look in the working directory
    for a file called 'config.yaml' that will hold a set of variables for
    accessing the wiki - namely, the API URI, username and password. I
    have a backup plan if there's just no way to do this, but I'm new to
    gems, and thought maybe there was a way to include a basic config
    template file that would install somewhere besides where gems normally
    go. Any insight?

    An example: Writing a wikibot that named "Sentinel". The Ruby program
    requires the gem I create, and is run using 'ruby sentinel.rb'. I'd
    like it to look in whatever directory sentinel.rb lives for my file. I
    hope that helps.

    Thanks in advance.
    eddieroger
     
    eddieroger, Feb 25, 2007
    #1
    1. Advertising

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. Benny Ng
    Replies:
    9
    Views:
    10,146
    Benny Ng
    Oct 13, 2005
  2. Lyndon
    Replies:
    1
    Views:
    538
    Leonard Blaisdell
    Jul 25, 2005
  3. CSharpner
    Replies:
    0
    Views:
    1,109
    CSharpner
    Apr 9, 2007
  4. Hongyu
    Replies:
    10
    Views:
    511
    James Kanze
    Aug 13, 2008
  5. Jerry C
    Replies:
    5
    Views:
    533
    Allen Chen [MSFT]
    Oct 27, 2008
Loading...

Share This Page