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"
|
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 "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 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']"
|
And I have a configuration file with "exclude" set to "['Rakefile', 'README']"
|
||||||
When I run jekyll build
|
When I run jekyll build
|
||||||
Then I should see "I want to be included" in "_site/index.html"
|
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/Rakefile" file should not exist
|
||||||
And the "_site/README" file should not exist
|
And the "_site/README" file should not exist
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@ module Jekyll
|
||||||
"safe" => false,
|
"safe" => false,
|
||||||
"include" => [".htaccess"],
|
"include" => [".htaccess"],
|
||||||
"exclude" => %w(
|
"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"],
|
"keep_files" => [".git", ".svn"],
|
||||||
"encoding" => "utf-8",
|
"encoding" => "utf-8",
|
||||||
|
|
|
@ -29,6 +29,15 @@ markdown: kramdown
|
||||||
theme: minima
|
theme: minima
|
||||||
gems:
|
gems:
|
||||||
- jekyll-feed
|
- jekyll-feed
|
||||||
exclude:
|
|
||||||
- Gemfile
|
# Exclude from processing.
|
||||||
- Gemfile.lock
|
# 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
|
should "exclude ruby vendor directories" do
|
||||||
exclude = Configuration.from({})["exclude"]
|
exclude = Configuration.from({})["exclude"]
|
||||||
|
assert_includes exclude, "Gemfile"
|
||||||
|
assert_includes exclude, "Gemfile.lock"
|
||||||
assert_includes exclude, "vendor/bundle/"
|
assert_includes exclude, "vendor/bundle/"
|
||||||
assert_includes exclude, "vendor/cache/"
|
assert_includes exclude, "vendor/cache/"
|
||||||
assert_includes exclude, "vendor/gems/"
|
assert_includes exclude, "vendor/gems/"
|
||||||
|
|
Loading…
Reference in New Issue