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

Already on GitHub? Sign in to your account

Directories with valid post names should be filtered out #875

Merged
merged 2 commits into from Apr 7, 2013

Conversation

Projects
None yet
4 participants
Owner

parkr commented Mar 19, 2013

@GrahamDennis ran into a problem (detailed in #488) where directories disguised as posts were read in as posts. Problem is, Post.initialize would crap out and thus Jekyll would be unsuccessful in processing the site.

This patch remedies this problem.

Owner

parkr commented Mar 19, 2013

Also, I explored several other options, but this was the one which was "DRYest".

Owner

parkr commented Mar 19, 2013

Build error is just the StackOverflowError we see every once in a while. Cucumber is weird.

Contributor

tombell commented Mar 20, 2013

This solution seems fine. 👍

@parkr parkr commented on the diff Mar 20, 2013

test/test_site.rb
categories = %w(bar baz category foo z_category publish_test win).sort
- assert_equal posts.size - 1, @site.posts.size
+ assert_equal posts.size, @site.posts.size
@parkr

parkr Mar 20, 2013

Owner

@tombell Do you know why it was posts.size - 1 in the previous version? Couldn't figure it out.

@tombell

tombell Mar 20, 2013

Contributor

I don't look at previous tests unless I wrote them or something broke.

@parkr

parkr Mar 20, 2013

Owner

Neither do I! :-) This one broke, which is weird. The previous test uses posts.size - 1 and passes. Weiiiiiird

Contributor

mojombo commented Apr 7, 2013

:shipit:

Contributor

tombell commented Apr 7, 2013

👍

parkr added a commit that referenced this pull request Apr 7, 2013

Merge pull request #875 from mojombo/posts-cant-be-dirs
Directories with valid post names should be filtered out

@parkr parkr merged commit 0f2c9d2 into master Apr 7, 2013

1 check passed

default The Travis build passed
Details

@parkr parkr deleted the posts-cant-be-dirs branch Apr 7, 2013

parkr added a commit that referenced this pull request Apr 7, 2013

@jekyllbot jekyllbot locked and limited conversation to collaborators Feb 27, 2017

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