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

Future should be set to false in the default config #3892

Closed
wants to merge 1 commit into from

Conversation

nateberkopec
Copy link
Contributor

Solves #3882

@@ -26,7 +26,7 @@ class Configuration < Hash
# Filtering Content
'show_drafts' => nil,
'limit_posts' => 0,
'future' => true, # remove and make true just default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting... it looks like we were going to remove it anyway. Looks like #690 is where we wrote that comment. I'm cool on keeping it.

@parkr
Copy link
Member

parkr commented Aug 5, 2015

Cool. Just needs a test, please!

@nateberkopec
Copy link
Contributor Author

@parkr I'm a little confused. You're asking me to test that Jekyll::Configuration::DEFAULTS['future'] == false? I can't find any similar tests that test what the DEFAULTS constant is set to. Can you give me some guidance on what kind of test you're looking for?

@parkr
Copy link
Member

parkr commented Aug 5, 2015

You're asking me to test that Jekyll::Configuration::DEFAULTS['future'] == false?

Yes I am, but not directly. I would like to see a test that ensures that a post in the future is not in the output site. This can be tested in a number of ways, one of which is a cucumber feature. The test you changed, in fact, is a good place to start. Write a post that has a year of 2020 and ensure it isn't written by default and is written when --future is true.

@envygeeks
Copy link
Contributor

/cc #3543 install a library that can alter time so we don't have to use Hollywood dating.

@nateberkopec
Copy link
Contributor Author

@parkr alright actual ping. Testing that a future post isn't written by default + it is written with jekyll --build.

When I run jekyll build
Then the _site directory should exist
And I should see "URL: /2020/01/31/entry2/" in "_site/index.html"
And I should see "URL: /2008/01/01/entry2/" in "_site/index.html"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just negate this? "I should not see..."

parkr added a commit that referenced this pull request Aug 16, 2015
@parkr
Copy link
Member

parkr commented Aug 16, 2015

Merged in 559cd6c

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants