chrislee35/configparser — pull request #1 by easco (2014-03-05 00:00:58+00:00)
Title: Allow parsing from sources other than files

I wanted to use the ConfigParser to parse from a StringIO for a unit test instead of from a file. I've refactored the parsing code out into a "parse" method that will accept anything that knows how to do "each" and return individual lines. I then changed initialize to have a default argument of "nil" and it will only open a file and parse the file content if it is given a path name.

In order to make the code run on the current ruby-head, I added "minitest" to the gem config.

I ran the unit tests on a wide variety of Ruby's including 1.8.7, 1.9.3, 2.0, 2.1, and the current head.