Merge pull request #169 from bhollis/master
Include .htaccess files when building a site
This commit is contained in:
commit
a14853e2bf
|
@ -15,6 +15,7 @@ Feature: Builder
|
||||||
Then "spaces in file.html" should exist at "test-app" and include "spaces"
|
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/Read me (example).txt" should exist at "test-app"
|
||||||
Then "images/Child folder/regular_file(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
|
Scenario: Build glob
|
||||||
Given a built app at "glob-app" with flags "--glob '*.css'"
|
Given a built app at "glob-app" with flags "--glob '*.css'"
|
||||||
|
|
1
fixtures/test-app/source/.htaccess
Normal file
1
fixtures/test-app/source/.htaccess
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# I'm an htaccess file!
|
|
@ -101,7 +101,7 @@ module Middleman::Sitemap
|
||||||
def touch_file(file)
|
def touch_file(file)
|
||||||
return false if file == @source ||
|
return false if file == @source ||
|
||||||
file.match(/^\./) ||
|
file.match(/^\./) ||
|
||||||
file.match(/\/\./) ||
|
(file.match(/\/\./) && !file.match(/\/\.htaccess/)) ||
|
||||||
(file.match(/\/_/) && !file.match(/\/__/)) ||
|
(file.match(/\/_/) && !file.match(/\/__/)) ||
|
||||||
File.directory?(file)
|
File.directory?(file)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue