Including a config file into a local directory

E

eddieroger

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top