Merge pull request #5860 from ashmaroli/exclude-patch
Merge pull request 5860
This commit is contained in:
commit
afe6e3622c
|
@ -44,9 +44,11 @@ Feature: Site configuration
|
|||
Given I have an "Rakefile" file that contains "I want to be excluded"
|
||||
And I have an "README" file that contains "I want to be excluded"
|
||||
And I have an "index.html" file that contains "I want to be included"
|
||||
And I have a "Gemfile" file that contains "gem 'include-me'"
|
||||
And I have a configuration file with "exclude" set to "['Rakefile', 'README']"
|
||||
When I run jekyll build
|
||||
Then I should see "I want to be included" in "_site/index.html"
|
||||
And the "_site/Gemfile" file should exist
|
||||
And the "_site/Rakefile" file should not exist
|
||||
And the "_site/README" file should not exist
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ module Jekyll
|
|||
"safe" => false,
|
||||
"include" => [".htaccess"],
|
||||
"exclude" => %w(
|
||||
node_modules vendor/bundle/ vendor/cache/ vendor/gems/ vendor/ruby/
|
||||
Gemfile Gemfile.lock node_modules vendor/bundle/ vendor/cache/ vendor/gems/
|
||||
vendor/ruby/
|
||||
),
|
||||
"keep_files" => [".git", ".svn"],
|
||||
"encoding" => "utf-8",
|
||||
|
|
|
@ -29,6 +29,15 @@ markdown: kramdown
|
|||
theme: minima
|
||||
gems:
|
||||
- jekyll-feed
|
||||
exclude:
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
|
||||
# Exclude from processing.
|
||||
# The following items will not be processed, by default. Create a custom list
|
||||
# to override the default setting.
|
||||
# exclude:
|
||||
# - Gemfile
|
||||
# - Gemfile.lock
|
||||
# - node_modules
|
||||
# - vendor/bundle/
|
||||
# - vendor/cache/
|
||||
# - vendor/gems/
|
||||
# - vendor/ruby/
|
||||
|
|
|
@ -55,6 +55,8 @@ class TestConfiguration < JekyllUnitTest
|
|||
|
||||
should "exclude ruby vendor directories" do
|
||||
exclude = Configuration.from({})["exclude"]
|
||||
assert_includes exclude, "Gemfile"
|
||||
assert_includes exclude, "Gemfile.lock"
|
||||
assert_includes exclude, "vendor/bundle/"
|
||||
assert_includes exclude, "vendor/cache/"
|
||||
assert_includes exclude, "vendor/gems/"
|
||||
|
|
Loading…
Reference in New Issue