Skip to content

Commit

Permalink
Properly select dotfiles during directory scan.
Browse files Browse the repository at this point in the history
Fixes #363.
Fixes #431.
Fixes #377.
  • Loading branch information
mojombo committed Jan 23, 2012
1 parent e27e255 commit 9d70088
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Allow some special characters in highlight names
* URL escape category names in URL generation (#360)
* Fix error with limit_posts (#442)
* Properly select dotfile during directory scan (#363, #431, #377)

== 0.11.2 / 2011-12-27
* Bug Fixes
Expand Down
6 changes: 6 additions & 0 deletions features/create_sites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ Feature: Create sites
When I run jekyll
Then the _site directory should exist
And I should see "URL: /2020/01/31/entry2/" in "_site/index.html"

Scenario: Basic site with whitelisted dotfile
Given I have an ".htaccess" file that contains "SomeDirective"
When I run jekyll
Then the _site directory should exist
And I should see "SomeDirective" in "_site/.htaccess"
12 changes: 12 additions & 0 deletions features/site_configuration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,15 @@ Feature: Site configuration
And the "_site/2009/04/05/bananas.html" file should exist
And the "_site/2009/04/01/oranges.html" file should exist
And the "_site/2009/03/27/apples.html" file should not exist

Scenario: Copy over normally excluded files when they are explicitly included
Given I have a ".gitignore" file that contains ".DS_Store"
And I have an ".htaccess" file that contains "SomeDirective"
And I have a configuration file with "include" set to:
| value |
| .gitignore |
| .foo |
When I run jekyll
Then the _site directory should exist
And I should see ".DS_Store" in "_site/.gitignore"
And the "_site/.htaccess" file should not exist
2 changes: 1 addition & 1 deletion lib/jekyll/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def read_layouts(dir = '')
# Returns nothing.
def read_directories(dir = '')
base = File.join(self.source, dir)
entries = Dir.chdir(base) { filter_entries(Dir['*']) }
entries = Dir.chdir(base) { filter_entries(Dir.entries('.')) }

self.read_posts(dir)

Expand Down

0 comments on commit 9d70088

Please sign in to comment.