1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

also "build" .htpasswd files

This commit is contained in:
Steven Sloan 2013-01-18 20:13:49 -05:00
parent cad7f8a0a4
commit c121c407df
6 changed files with 6 additions and 2 deletions

View file

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

View file

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

View file

@ -220,7 +220,7 @@ module Middleman::Cli
paths = ::Middleman::Util.all_files_under(@destination) paths = ::Middleman::Util.all_files_under(@destination)
@cleaning_queue += paths.select do |path| @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
end end

View file

@ -29,7 +29,7 @@ module Middleman
# Files starting with an dot, but not .htaccess # Files starting with an dot, but not .htaccess
:source_dotfiles => proc { |file| :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 # Files starting with an underscore, but not a double-underscore

View file

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

View file

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