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

Better index filename handling in filesystem data source #330

Conversation

Projects
None yet
2 participants
@ddfreyne
Copy link
Member

commented Aug 31, 2013

This is a fix for #327.

This makes sure that:

  • when allowing dots in identifiers, "index.html.erb" gets the identifier "/index.html/" instead of "/";
  • when either allowing or disallowing dots in identifiers, "index" gets the identifier "/" instead of "/index/".

@ghost ghost assigned bobthecow Aug 31, 2013

@@ -238,6 +238,40 @@ def test_identifier_for_filename_with_subfilename_disallowing_periods_in_identif
end
end

def test_identifier_for_filename_with_index_filenames_allowing_periods_in_identifier
expected = {
'/index.html.erb' => '/index.html/',

This comment has been minimized.

Copy link
@bobthecow

bobthecow Aug 31, 2013

Member

I'd like to see a test case for /foo/index.html.erb, /foo/index.html and /foo/index/ as well.


def test_identifier_for_filename_with_index_filenames_disallowing_periods_in_identifier
expected = {
'/index.html.erb' => '/',

This comment has been minimized.

Copy link
@bobthecow

bobthecow Aug 31, 2013

Member

Same :)

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented Aug 31, 2013

@bobthecow Merge if satisfied.

bobthecow added a commit that referenced this pull request Aug 31, 2013

Merge pull request #330 from nanoc/bug/better-index-filename-handling…
…-in-filesystem-data-sources

Better index filename handling in filesystem data source

@bobthecow bobthecow merged commit 5a8f79a into release-3.6.x Aug 31, 2013

1 check failed

default The Travis CI build could not complete due to an error
Details

@ddfreyne ddfreyne deleted the bug/better-index-filename-handling-in-filesystem-data-sources branch Aug 31, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.