Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump jekyll to v3.5.1 #449

Merged
merged 11 commits into from
Aug 8, 2017
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: ruby
rvm:
- 2.0
- 2.1
- 2.2
- 2.3.3
Expand Down
21 changes: 15 additions & 6 deletions lib/github-pages/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Configuration
# Default, user overwritable options
DEFAULTS = {
"jailed" => false,
"gems" => GitHubPages::Plugins::DEFAULT_PLUGINS,
"plugins" => GitHubPages::Plugins::DEFAULT_PLUGINS,
"future" => true,
"theme" => "jekyll-theme-primer",
"kramdown" => {
Expand Down Expand Up @@ -44,7 +44,6 @@ class Configuration
OVERRIDES = {
"lsi" => false,
"safe" => true,
"plugins" => SecureRandom.hex,
"plugins_dir" => SecureRandom.hex,
"whitelist" => GitHubPages::Plugins::PLUGIN_WHITELIST,
"highlighter" => "rouge",
Expand All @@ -63,7 +62,7 @@ class Configuration
# Jekyll::Site and need to be set properly when the config is updated.
CONFIGS_WITH_METHODS = %w(
safe lsi highlighter baseurl exclude include future unpublished
show_drafts limit_posts keep_files gems
show_drafts limit_posts keep_files
).freeze

class << self
Expand Down Expand Up @@ -105,9 +104,15 @@ def effective_config(user_config)
config = Jekyll::Utils.deep_merge_hashes config, OVERRIDES

# Ensure we have those gems we want.
config["gems"] = Array(config["gems"]) | DEFAULT_PLUGINS
config["whitelist"] = config["whitelist"] | config["gems"] if disable_whitelist?
config["whitelist"] = config["whitelist"] | DEVELOPMENT_PLUGINS if development?
config["plugins"] = Array(config["plugins"]) | DEFAULT_PLUGINS

if disable_whitelist?
config["whitelist"] = config["whitelist"] | config["plugins"]
end

if development?
config["whitelist"] = config["whitelist"] | DEVELOPMENT_PLUGINS
end

config
end
Expand Down Expand Up @@ -141,6 +146,10 @@ def set!(site)
CONFIGS_WITH_METHODS.each do |opt|
site.public_send("#{opt}=", site.config[opt])
end

# While Configuration renamed the gems key to plugins, Site retained
# backwards compatability and must be set manually
site.gems = site.config["plugins"]
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/github-pages/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ module GitHubPages
class Dependencies
VERSIONS = {
# Jekyll
"jekyll" => "3.4.5",
"jekyll" => "3.5.1",
"jekyll-sass-converter" => "1.5.0",

# Converters
"kramdown" => "1.13.2",

# Misc
"liquid" => "3.0.6",
"liquid" => "4.0.0",
"rouge" => "1.11.1",
"github-pages-health-check" => "1.3.5",

# Plugins
"jekyll-redirect-from" => "0.12.1",
"jekyll-sitemap" => "1.0.0",
"jekyll-feed" => "0.9.2",
"jekyll-gist" => "1.4.0",
"jekyll-gist" => "1.4.1",
"jekyll-paginate" => "1.1.0",
"jekyll-coffeescript" => "1.0.1",
"jekyll-seo-tag" => "2.2.3",
Expand Down
8 changes: 4 additions & 4 deletions spec/github-pages/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
end

it "sets default gems" do
expect(effective_config["gems"]).to include("jekyll-coffeescript")
expect(effective_config["plugins"]).to include("jekyll-coffeescript")
end

it "lets the user specify additional gems" do
expect(effective_config["gems"]).to include("jekyll-sitemap")
expect(effective_config["plugins"]).to include("jekyll-sitemap")
end

it "honors the user's config" do
Expand Down Expand Up @@ -84,11 +84,11 @@
end

it "sets default gems" do
expect(site.config["gems"]).to include("jekyll-coffeescript")
expect(site.config["plugins"]).to include("jekyll-coffeescript")
end

it "lets the user specify additional gems" do
expect(site.config["gems"]).to include("jekyll-sitemap")
expect(site.config["plugins"]).to include("jekyll-sitemap")
end

it "honors the user's config" do
Expand Down