-
Notifications
You must be signed in to change notification settings - Fork 125
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
Load ENV via dotenv if available #53
Conversation
@@ -1,4 +1,9 @@ | |||
require 'octokit' | |||
begin | |||
require 'dotenv' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about wrapping these two lines (also) in a if Jekyll.env == 'development'
?
I believe we'll also need to require 'jekyll'
then, which I don't think will cause any problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, sounds good! But i think we should put require 'jekyll'
also in the begin
block then because it was removed in 80370fc and it's only a development dependency in the gemspec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other way may be:
if defined? Jekyll && Jekyll.env == "development"
@benbalter Hi, i updated the PR as we discussed. |
@parkr what do you think? |
@benbalter I THINK GOOOOOOD! |
Thanks @Crunch09! 🌷 🐢 🎉 |
Hi,
i didn't know if tests are needed for this because i think they would only test the behavior already tested in the dotenv repository. Also i'm not sure if i should add something to the README about this.