From b0c30db1149c841035f580d5bbf5acf000c5d498 Mon Sep 17 00:00:00 2001 From: jabenninghoff Date: Sat, 19 Nov 2016 18:52:01 -0600 Subject: [PATCH] Dynamically load GitHub Pages dependencies Thanks to https://byparker.com/blog/2014/stay-up-to-date-with-the-latest-github-pa ges-gem/. --- Gemfile | 9 +++++++-- Gemfile.lock | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 6fcdd72..3f17c1a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,9 @@ source 'https://rubygems.org' -ruby '2.3.1' -gem 'github-pages', '104', group: :jekyll_plugins + +require 'json' +require 'open-uri' +version = JSON.parse(open('https://pages.github.com/versions.json').read) + +ruby version['ruby'] +gem 'github-pages', version['github-pages'], group: :jekyll_plugins gem 'html-proofer', group: :htmlproofer diff --git a/Gemfile.lock b/Gemfile.lock index e40252b..0d1b001 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -153,6 +153,7 @@ PLATFORMS DEPENDENCIES github-pages (= 104) html-proofer + json RUBY VERSION ruby 2.3.1p112