Include .htaccess files when building a site.

This commit is contained in:
Ben Hollis 2011-11-27 20:22:51 -08:00
parent d12b3a95d2
commit 0cc00a74b4
3 changed files with 3 additions and 1 deletions

View file

@ -15,6 +15,7 @@ Feature: Builder
Then "spaces in file.html" should exist at "test-app" and include "spaces"
Then "images/Read me (example).txt" should exist at "test-app"
Then "images/Child folder/regular_file(example).txt" should exist at "test-app"
Then ".htaccess" should exist at "test-app"
Scenario: Build glob
Given a built app at "glob-app" with flags "--glob '*.css'"

View file

@ -0,0 +1 @@
# I'm an htaccess file!

View file

@ -101,7 +101,7 @@ module Middleman::Sitemap
def touch_file(file)
return false if file == @source ||
file.match(/^\./) ||
file.match(/\/\./) ||
(file.match(/\/\./) && !file.match(/\/\.htaccess/)) ||
(file.match(/\/_/) && !file.match(/\/__/)) ||
File.directory?(file)