also "build" .htpasswd files

This commit is contained in:
Steven Sloan 2013-01-18 20:13:49 -05:00 committed by Thomas Reynolds
parent af132f6207
commit 17ad2caf11
6 changed files with 6 additions and 2 deletions

View file

@ -14,6 +14,7 @@ Feature: Builder
| images/Read me (example).txt |
| images/Child folder/regular_file(example).txt |
| .htaccess |
| .htpasswd |
| feed.xml |
Then the following files should not exist:
| _partial |

View file

@ -0,0 +1 @@
# .htpasswd

View file

@ -231,7 +231,7 @@ module Middleman::Cli
paths = ::Middleman::Util.all_files_under(@destination)
@cleaning_queue += paths.select do |path|
!path.to_s.match(/\/\./) || path.to_s.match(/\.htaccess/)
!path.to_s.match(/\/\./) || path.to_s.match(/\.htaccess|\.htpasswd/)
end
end

View file

@ -29,7 +29,7 @@ module Middleman
# Files starting with an dot, but not .htaccess
:source_dotfiles => proc { |file|
file.match(%r{/\.}) && !file.match(%r{/\.htaccess})
file.match(%r{/\.}) && !file.match(%r{/\.htaccess|\.htpasswd})
},
# Files starting with an underscore, but not a double-underscore

View file

@ -11,6 +11,7 @@ Feature: Directory Index
| wildcard_leave_me_alone.html |
| regular/index.html |
| .htaccess |
| .htpasswd |
Then the following files should not exist:
| egular/index/index.html |
| needs_index.html |

View file

@ -0,0 +1 @@
# .htpasswd