Changes based on @mojombo's feedback
This commit is contained in:
parent
4bae42a671
commit
6eed91871f
|
@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.name = 'jekyll'
|
||||
s.version = '0.11.2'
|
||||
s.date = '2012-08-23'
|
||||
s.date = '2011-12-27'
|
||||
s.rubyforge_project = 'jekyll'
|
||||
|
||||
s.summary = "A simple, blog aware, static site generator."
|
||||
|
@ -74,12 +74,10 @@ Gem::Specification.new do |s|
|
|||
lib/jekyll/migrators/csv.rb
|
||||
lib/jekyll/migrators/drupal.rb
|
||||
lib/jekyll/migrators/enki.rb
|
||||
lib/jekyll/migrators/joomla.rb
|
||||
lib/jekyll/migrators/marley.rb
|
||||
lib/jekyll/migrators/mephisto.rb
|
||||
lib/jekyll/migrators/mt.rb
|
||||
lib/jekyll/migrators/posterous.rb
|
||||
lib/jekyll/migrators/rss.rb
|
||||
lib/jekyll/migrators/textpattern.rb
|
||||
lib/jekyll/migrators/tumblr.rb
|
||||
lib/jekyll/migrators/typo.rb
|
||||
|
@ -92,7 +90,6 @@ Gem::Specification.new do |s|
|
|||
lib/jekyll/static_file.rb
|
||||
lib/jekyll/tags/highlight.rb
|
||||
lib/jekyll/tags/include.rb
|
||||
lib/jekyll/tags/post_url.rb
|
||||
test/helper.rb
|
||||
test/source/.htaccess
|
||||
test/source/_includes/sig.markdown
|
||||
|
@ -144,9 +141,9 @@ Gem::Specification.new do |s|
|
|||
test/test_post.rb
|
||||
test/test_rdiscount.rb
|
||||
test/test_redcarpet.rb
|
||||
test/test_redcloth.rb
|
||||
test/test_site.rb
|
||||
test/test_tags.rb
|
||||
test/test_redcloth.rb
|
||||
]
|
||||
# = MANIFEST =
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ module Jekyll
|
|||
dest_files = Set.new
|
||||
Dir.glob(File.join(self.dest, "**", "*"), File::FNM_DOTMATCH) do |file|
|
||||
if self.keep_files.length > 0
|
||||
dest_files << file unless file =~ /\/\.{1,2}$/ or file =~ keep_file_regex
|
||||
dest_files << file unless file =~ /\/\.{1,2}$/ || file =~ keep_file_regex
|
||||
else
|
||||
dest_files << file unless file =~ /\/\.{1,2}$/
|
||||
end
|
||||
|
@ -248,8 +248,12 @@ module Jekyll
|
|||
FileUtils.rm_rf(obsolete_files.to_a)
|
||||
end
|
||||
|
||||
# create a regex from the keep_files array
|
||||
# ['.git','.svn'] => /\/(\.git|\/.svn)/
|
||||
# Private: creates a regular expression from the keep_files array
|
||||
#
|
||||
# Examples
|
||||
# ['.git','.svn'] creates the following regex: /\/(\.git|\/.svn)/
|
||||
#
|
||||
# Returns the regular expression
|
||||
def keep_file_regex
|
||||
or_list = self.keep_files.join("|")
|
||||
pattern = "\/(#{or_list.gsub(".", "\.")})"
|
||||
|
|
|
@ -210,7 +210,6 @@ class TestSite < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
should 'remove orphaned files in destination - keep_files .svn' do
|
||||
|
||||
config = Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'keep_files' => ['.svn']})
|
||||
@site = Site.new(config)
|
||||
@site.process
|
||||
|
|
Loading…
Reference in New Issue