Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the parser to handle more use-cases #7

Merged
merged 1 commit into from
Dec 6, 2014
Merged

Refactor the parser to handle more use-cases #7

merged 1 commit into from
Dec 6, 2014

Conversation

jamieconnolly
Copy link
Contributor

Carrying on the conversation started in #3, I've refactored the parser to handle more use-cases and better match default behaviour (based off of bkeepers/dotenv).

A summary of the changes:

  • Use a regex for line matching
  • Substitute environment variables in a value
  • Correct behaviour between no quote/single quote/double quote values
  • Handle correct escaping of values
  • Add in lots of tests

* Use a regex for line matching (based off of bkeepers/dotenv)
* Substitute environment variables in a value
* Handle unescaping of values
* Add in lots of tests
@jpadilla
Copy link
Owner

jpadilla commented Dec 3, 2014

@jamieconnolly this looks great for what I've been too look through. And it seems that it actually replaces #2 and #5, right?

@jamieconnolly
Copy link
Contributor Author

Yes, this supersedes both of those as well.

jpadilla added a commit that referenced this pull request Dec 6, 2014
Refactor the parser to handle more use-cases
@jpadilla jpadilla merged commit eb08e7b into jpadilla:master Dec 6, 2014
@jamieconnolly jamieconnolly deleted the enhance-parser branch December 6, 2014 13:42
This was referenced Dec 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants