From 4e40593a53e51c9f1e2ce567677bc1803bbd4829 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 5 Feb 2017 01:26:41 +0530 Subject: [PATCH 1/5] exclude Gemfile and its lockfile by default --- lib/jekyll/configuration.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 27e245e4..b4bf7c5a 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -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", From 6316856773a8c41d16c887e2df82ec8735f3890b Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 5 Feb 2017 01:28:43 +0530 Subject: [PATCH 2/5] comment out 'exclude:' in config file --- lib/site_template/_config.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/site_template/_config.yml b/lib/site_template/_config.yml index f5df9830..aa255a64 100644 --- a/lib/site_template/_config.yml +++ b/lib/site_template/_config.yml @@ -29,6 +29,17 @@ markdown: kramdown theme: minima gems: - jekyll-feed -exclude: - - Gemfile - - Gemfile.lock + +# Exclude from processing. +# The items below are excluded by default, to customize the list, uncomment the +# lines below and simply add to the list. Items removed will **not** be excluded +# from processing. +# +# exclude: +# - Gemfile +# - Gemfile.lock +# - node_modules +# - vendor/bundle/ +# - vendor/cache/ +# - vendor/gems/ +# - vendor/ruby/ From 2813b9c03985e2c4bd7c1f74b246d5432cb41bf0 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 5 Feb 2017 01:49:38 +0530 Subject: [PATCH 3/5] test exclusion of Gemfile --- test/test_configuration.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_configuration.rb b/test/test_configuration.rb index febc0cbe..9602c5c3 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -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/" From eb36ea095fb948ad21a820ba35fe145a43cbf352 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 5 Feb 2017 01:56:49 +0530 Subject: [PATCH 4/5] test overriding default excludes --- features/site_configuration.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/site_configuration.feature b/features/site_configuration.feature index 2d00f9b7..3aace794 100644 --- a/features/site_configuration.feature +++ b/features/site_configuration.feature @@ -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 From 3745b2456409882ba81f1c2e7cd6c4f868175f3b Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 5 Feb 2017 07:55:26 +0530 Subject: [PATCH 5/5] update comment for `exclude` array --- lib/site_template/_config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/site_template/_config.yml b/lib/site_template/_config.yml index aa255a64..436d5999 100644 --- a/lib/site_template/_config.yml +++ b/lib/site_template/_config.yml @@ -31,10 +31,8 @@ gems: - jekyll-feed # Exclude from processing. -# The items below are excluded by default, to customize the list, uncomment the -# lines below and simply add to the list. Items removed will **not** be excluded -# from processing. -# +# The following items will not be processed, by default. Create a custom list +# to override the default setting. # exclude: # - Gemfile # - Gemfile.lock