From 59cd2257b6a86e16781dd91dfe5ca00cd300fcf9 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 22 Oct 2017 18:37:44 +0200 Subject: [PATCH] Style: Rubocop auto-correct --- .rubocop.yml | 9 ++------- Gemfile | 2 ++ jekyll-seo-tag.gemspec | 8 ++++---- lib/jekyll-seo-tag.rb | 2 ++ lib/jekyll-seo-tag/author_drop.rb | 2 ++ lib/jekyll-seo-tag/drop.rb | 2 ++ lib/jekyll-seo-tag/filters.rb | 2 ++ lib/jekyll-seo-tag/image_drop.rb | 2 ++ lib/jekyll-seo-tag/json_ld.rb | 2 ++ lib/jekyll-seo-tag/json_ld_drop.rb | 2 ++ lib/jekyll-seo-tag/url_helper.rb | 2 ++ lib/jekyll-seo-tag/version.rb | 2 ++ spec/jekyll_seo_tag/author_drop_spec.rb | 2 ++ spec/jekyll_seo_tag/drop_spec.rb | 2 ++ spec/jekyll_seo_tag/filters_spec.rb | 2 ++ spec/jekyll_seo_tag/image_drop_spec.rb | 2 ++ spec/jekyll_seo_tag/json_ld_spec.rb | 2 ++ spec/jekyll_seo_tag_integration_spec.rb | 2 ++ spec/jekyll_seo_tag_spec.rb | 2 ++ spec/spec_helper.rb | 2 ++ 20 files changed, 42 insertions(+), 11 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d60d44a..abd6e6a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,16 +10,11 @@ Metrics/BlockLength: Exclude: - spec/**/* -Style/Documentation: - Enabled: false - -Style/FileName: - Enabled: false - -Style/IndentHeredoc: +Layout/IndentHeredoc: Exclude: - spec/**/* AllCops: + TargetRubyVersion: 2.1 Exclude: - vendor/**/* diff --git a/Gemfile b/Gemfile index 2ee12d7..83c46ca 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec diff --git a/jekyll-seo-tag.gemspec b/jekyll-seo-tag.gemspec index 4dddf8c..9ba4c98 100644 --- a/jekyll-seo-tag.gemspec +++ b/jekyll-seo-tag.gemspec @@ -1,4 +1,4 @@ -# coding: utf-8 +# frozen_string_literal: true lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) @@ -27,8 +27,8 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_dependency "jekyll", "~> 3.3" - spec.add_development_dependency "bundler", "~> 1.14" + spec.add_development_dependency "bundler", "~> 1.15" + spec.add_development_dependency "html-proofer", "~> 3.7" spec.add_development_dependency "rspec", "~> 3.5" - spec.add_development_dependency "html-proofer", "~> 3.6" - spec.add_development_dependency "rubocop", "~> 0.48" + spec.add_development_dependency "rubocop", "~> 0.5" end diff --git a/lib/jekyll-seo-tag.rb b/lib/jekyll-seo-tag.rb index 663a491..ca04c65 100644 --- a/lib/jekyll-seo-tag.rb +++ b/lib/jekyll-seo-tag.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "jekyll" require "jekyll-seo-tag/version" diff --git a/lib/jekyll-seo-tag/author_drop.rb b/lib/jekyll-seo-tag/author_drop.rb index 6992539..94a6b68 100644 --- a/lib/jekyll-seo-tag/author_drop.rb +++ b/lib/jekyll-seo-tag/author_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag # A drop representing the current page's author diff --git a/lib/jekyll-seo-tag/drop.rb b/lib/jekyll-seo-tag/drop.rb index a554201..fa380d2 100644 --- a/lib/jekyll-seo-tag/drop.rb +++ b/lib/jekyll-seo-tag/drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag class Drop < Jekyll::Drops::Drop diff --git a/lib/jekyll-seo-tag/filters.rb b/lib/jekyll-seo-tag/filters.rb index 2874aed..6cbdf81 100644 --- a/lib/jekyll-seo-tag/filters.rb +++ b/lib/jekyll-seo-tag/filters.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag class Filters diff --git a/lib/jekyll-seo-tag/image_drop.rb b/lib/jekyll-seo-tag/image_drop.rb index 2bffa92..74c0bf3 100644 --- a/lib/jekyll-seo-tag/image_drop.rb +++ b/lib/jekyll-seo-tag/image_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag # A drop representing the page image diff --git a/lib/jekyll-seo-tag/json_ld.rb b/lib/jekyll-seo-tag/json_ld.rb index b00ce29..34d424a 100644 --- a/lib/jekyll-seo-tag/json_ld.rb +++ b/lib/jekyll-seo-tag/json_ld.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag # This module is deprecated, but is included in the Gem to avoid a breaking diff --git a/lib/jekyll-seo-tag/json_ld_drop.rb b/lib/jekyll-seo-tag/json_ld_drop.rb index 3f88be0..3c0120e 100644 --- a/lib/jekyll-seo-tag/json_ld_drop.rb +++ b/lib/jekyll-seo-tag/json_ld_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag class JSONLDDrop < Jekyll::Drops::Drop diff --git a/lib/jekyll-seo-tag/url_helper.rb b/lib/jekyll-seo-tag/url_helper.rb index d8d799b..ead8e41 100644 --- a/lib/jekyll-seo-tag/url_helper.rb +++ b/lib/jekyll-seo-tag/url_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class SeoTag # Mixin to share common URL-related methods between class diff --git a/lib/jekyll-seo-tag/version.rb b/lib/jekyll-seo-tag/version.rb index 223da5b..6cd555f 100644 --- a/lib/jekyll-seo-tag/version.rb +++ b/lib/jekyll-seo-tag/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Prevent bundler errors module Liquid; class Tag; end; end diff --git a/spec/jekyll_seo_tag/author_drop_spec.rb b/spec/jekyll_seo_tag/author_drop_spec.rb index 764b2a2..e5cc991 100644 --- a/spec/jekyll_seo_tag/author_drop_spec.rb +++ b/spec/jekyll_seo_tag/author_drop_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag::AuthorDrop do let(:data) { {} } let(:config) { { "author" => "site_author" } } diff --git a/spec/jekyll_seo_tag/drop_spec.rb b/spec/jekyll_seo_tag/drop_spec.rb index 4fa5a22..5099e17 100644 --- a/spec/jekyll_seo_tag/drop_spec.rb +++ b/spec/jekyll_seo_tag/drop_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag::Drop do let(:config) { { "title" => "site title" } } let(:page_meta) { { "title" => "page title" } } diff --git a/spec/jekyll_seo_tag/filters_spec.rb b/spec/jekyll_seo_tag/filters_spec.rb index c3cf1c2..e6a1437 100644 --- a/spec/jekyll_seo_tag/filters_spec.rb +++ b/spec/jekyll_seo_tag/filters_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag::Filters do let(:page) { make_page } let(:site) { make_site } diff --git a/spec/jekyll_seo_tag/image_drop_spec.rb b/spec/jekyll_seo_tag/image_drop_spec.rb index f8f2507..50c79c6 100644 --- a/spec/jekyll_seo_tag/image_drop_spec.rb +++ b/spec/jekyll_seo_tag/image_drop_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag::ImageDrop do let(:config) { { "title" => "site title" } } let(:image) { nil } diff --git a/spec/jekyll_seo_tag/json_ld_spec.rb b/spec/jekyll_seo_tag/json_ld_spec.rb index 8452b62..df463d5 100644 --- a/spec/jekyll_seo_tag/json_ld_spec.rb +++ b/spec/jekyll_seo_tag/json_ld_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag::JSONLDDrop do let(:author) { "author" } let(:image) { "image" } diff --git a/spec/jekyll_seo_tag_integration_spec.rb b/spec/jekyll_seo_tag_integration_spec.rb index 6ba1b14..1202677 100755 --- a/spec/jekyll_seo_tag_integration_spec.rb +++ b/spec/jekyll_seo_tag_integration_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag do let(:page) { make_page } let(:site) { make_site } diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 087eea8..54d4f8b 100644 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Jekyll::SeoTag do let(:config) { { "title" => "site title" } } let(:page_meta) { {} } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1de9de6..554ba2f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + $LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "jekyll" require "jekyll-seo-tag"