diff --git a/.travis.yml b/.travis.yml index eb94e013..36d63bbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: ruby rvm: - - 2.0 - 2.1 - 2.2 - 2.3.3 diff --git a/lib/github-pages/configuration.rb b/lib/github-pages/configuration.rb index fa38a159..563411db 100644 --- a/lib/github-pages/configuration.rb +++ b/lib/github-pages/configuration.rb @@ -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" => { @@ -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", @@ -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 @@ -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 @@ -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 diff --git a/lib/github-pages/dependencies.rb b/lib/github-pages/dependencies.rb index a75f115c..2c6f324c 100644 --- a/lib/github-pages/dependencies.rb +++ b/lib/github-pages/dependencies.rb @@ -7,7 +7,7 @@ module GitHubPages class Dependencies VERSIONS = { # Jekyll - "jekyll" => "3.4.5", + "jekyll" => "3.5.1", "jekyll-sass-converter" => "1.5.0", # Converters @@ -15,7 +15,7 @@ class Dependencies "redcarpet" => "3.3.4", # Misc - "liquid" => "3.0.6", + "liquid" => "4.0.0", "rouge" => "1.11.1", "github-pages-health-check" => "1.3.5", @@ -23,7 +23,7 @@ class Dependencies "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", @@ -37,7 +37,7 @@ class Dependencies "jekyll-optional-front-matter" => "0.2.0", "jekyll-readme-index" => "0.1.0", "jekyll-default-layout" => "0.1.4", - "jekyll-titles-from-headings" => "0.2.0", + "jekyll-titles-from-headings" => "0.3.0", # Pin listen because it's broken on 2.1 & that's what we recommend. # https://github.com/guard/listen/pull/371 diff --git a/lib/github-pages/version.rb b/lib/github-pages/version.rb index 2ad0504d..946339aa 100644 --- a/lib/github-pages/version.rb +++ b/lib/github-pages/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module GitHubPages - VERSION = 146 + VERSION = 147 .to_s + '-siteleaf'.freeze end diff --git a/spec/github-pages/configuration_spec.rb b/spec/github-pages/configuration_spec.rb index 72c9dcdc..659cedef 100644 --- a/spec/github-pages/configuration_spec.rb +++ b/spec/github-pages/configuration_spec.rb @@ -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 @@ -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