Skip to content
Browse files

Properly select dotfiles during directory scan.

Fixes #363.
Fixes #431.
Fixes #377.
  • Loading branch information...
1 parent e27e255 commit 9d70088f01d41dccbc3e4eedd7f2435ff25dcd31 @mojombo mojombo committed Jan 23, 2012
Showing with 20 additions and 1 deletion.
  1. +1 −0 History.txt
  2. +6 −0 features/create_sites.feature
  3. +12 −0 features/site_configuration.feature
  4. +1 −1 lib/jekyll/site.rb
View
1 History.txt
@@ -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
View
6 features/create_sites.feature
@@ -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"
View
12 features/site_configuration.feature
@@ -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
View
2 lib/jekyll/site.rb
@@ -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)

0 comments on commit 9d70088

Please sign in to comment.
Something went wrong with that request. Please try again.