From c495fd33413d3436680c4f4ca16bc7d2a8b21b6b Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Fri, 5 Jan 2018 17:46:52 +0100 Subject: [PATCH 1/2] CI: test against Ruby 2.4 Match current GitHub Pages version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index be3bd52..f67593a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ rvm: - - 2.2 + - 2.4 before_install: gem install bundler language: ruby script: script/cibuild From a37e75f487c17c63ce01e25e28704196f44b1b5e Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sat, 6 Jan 2018 09:47:03 +0100 Subject: [PATCH 2/2] Fix rubocop offenses --- Gemfile | 2 ++ jekyll-default-layout.gemspec | 4 ++-- lib/jekyll-default-layout.rb | 2 ++ lib/jekyll-default-layout/generator.rb | 2 ++ lib/jekyll-default-layout/version.rb | 2 ++ spec/jekyll-default-layout/generator_spec.rb | 2 ++ spec/spec_helper.rb | 2 ++ 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index b4e2a20..be173b2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec diff --git a/jekyll-default-layout.gemspec b/jekyll-default-layout.gemspec index d025cdc..b5f0f05 100644 --- a/jekyll-default-layout.gemspec +++ b/jekyll-default-layout.gemspec @@ -1,4 +1,4 @@ -# encoding: utf-8 +# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path("../lib", __FILE__) require "jekyll-default-layout/version" @@ -17,6 +17,6 @@ Gem::Specification.new do |s| s.license = "MIT" s.add_runtime_dependency "jekyll", "~> 3.0" - s.add_development_dependency "rubocop", "~> 0.43" s.add_development_dependency "rspec", "~> 3.5" + s.add_development_dependency "rubocop", "~> 0.43" end diff --git a/lib/jekyll-default-layout.rb b/lib/jekyll-default-layout.rb index 959d8cc..e362bdf 100644 --- a/lib/jekyll-default-layout.rb +++ b/lib/jekyll-default-layout.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "jekyll" require "jekyll-default-layout/generator" diff --git a/lib/jekyll-default-layout/generator.rb b/lib/jekyll-default-layout/generator.rb index 7ec1365..74fd9e8 100644 --- a/lib/jekyll-default-layout/generator.rb +++ b/lib/jekyll-default-layout/generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module JekyllDefaultLayout # Injects front matter defaults to set default layouts, if they exist class Generator < Jekyll::Generator diff --git a/lib/jekyll-default-layout/version.rb b/lib/jekyll-default-layout/version.rb index 3d2bb5b..d36ca12 100644 --- a/lib/jekyll-default-layout/version.rb +++ b/lib/jekyll-default-layout/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module JekyllDefaultLayout VERSION = "0.1.4".freeze end diff --git a/spec/jekyll-default-layout/generator_spec.rb b/spec/jekyll-default-layout/generator_spec.rb index 497ffe1..b154d45 100644 --- a/spec/jekyll-default-layout/generator_spec.rb +++ b/spec/jekyll-default-layout/generator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe JekyllDefaultLayout::Generator do let(:overrides) { {} } let(:site) { fixture_site("site", overrides) } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4e95987..71468e1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "jekyll-default-layout" RSpec.configure do |config|