Merge pull request #740 from stevenosloan/add_htpasswd

also "build" .htpasswd files
This commit is contained in:
Ben Hollis 2013-01-18 19:56:27 -08:00
commit 00581876b5
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

@ -220,7 +220,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