diff --git a/.rubocop.yml b/.rubocop.yml index e5b26bccc9c..ba420f09b6e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -99,6 +99,9 @@ Style/BracesAroundHashParameters: Enabled: false Style/ClassAndModuleChildren: Enabled: false +Style/FrozenStringLiteralComment: + Enabled: true + EnforcedStyle: always Style/Documentation: Enabled: false Exclude: diff --git a/Gemfile b/Gemfile index 0306c71afc1..0dcb47767d4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec :name => "jekyll" diff --git a/Rakefile b/Rakefile index c80324aba5d..a7d50088d93 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubygems" require "rake" require "rdoc" diff --git a/docs/_docs/history.md b/docs/_docs/history.md index e5832bf0998..725321bddae 100644 --- a/docs/_docs/history.md +++ b/docs/_docs/history.md @@ -27,7 +27,7 @@ note: This file is autogenerated. Edit /History.markdown instead. - add plugins for multiple page pagination ([#6055]({{ site.repository }}/issues/6055)) - Update minimum Ruby version in installation.md ([#6164]({{ site.repository }}/issues/6164)) - [docs] Add information about finding a collection in `site.collections` ([#6165]({{ site.repository }}/issues/6165)) -- Add {%raw%} to Liquid example on site ([#6179]({{ site.repository }}/issues/6179)) +- Add {% raw %}`{% raw %}`{% endraw %} to Liquid example on site ([#6179]({{ site.repository }}/issues/6179)) - Added improved Pug plugin - removed 404 Jade plugin ([#6174]({{ site.repository }}/issues/6174)) - Linking the link ([#6210]({{ site.repository }}/issues/6210)) - Small correction in documentation for includes ([#6193]({{ site.repository }}/issues/6193)) diff --git a/features/step_definitions.rb b/features/step_definitions.rb index c22adb48667..29900491989 100644 --- a/features/step_definitions.rb +++ b/features/step_definitions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Before do FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist? FileUtils.mkdir_p(Paths.test_dir) unless Paths.test_dir.directory? diff --git a/features/support/formatter.rb b/features/support/formatter.rb index 79d1466480f..745c74ec905 100644 --- a/features/support/formatter.rb +++ b/features/support/formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fileutils" require "colorator" require "cucumber/formatter/console" diff --git a/features/support/helpers.rb b/features/support/helpers.rb index 118dd9cf925..13a8b78cf2d 100644 --- a/features/support/helpers.rb +++ b/features/support/helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fileutils" require "jekyll" require "time" @@ -107,7 +109,7 @@ def run_in_shell(*args) File.write(Paths.status_file, p.exitstatus) File.open(Paths.output_file, "wb") do |f| - f.puts "$ " << args.join(" ") + f.puts "$ #{args.join(" ")}" f.puts output f.puts "EXIT STATUS: #{p.exitstatus}" end diff --git a/jekyll.gemspec b/jekyll.gemspec index 5ec2e9a25f6..87031a8000c 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -1,4 +1,5 @@ # coding: utf-8 +# frozen_string_literal: true lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 5e5923c2bd1..fb5db3d43e1 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + $LOAD_PATH.unshift __dir__ # For use/testing when no gem is installed # Require all of the Ruby files in the given directory. @@ -162,8 +164,9 @@ def sites def sanitized_path(base_directory, questionable_path) return base_directory if base_directory.eql?(questionable_path) - questionable_path.insert(0, "/") if questionable_path.start_with?("~") - clean_path = File.expand_path(questionable_path, "/") + clean_path = questionable_path.dup + clean_path.insert(0, "/") if clean_path.start_with?("~") + clean_path = File.expand_path(clean_path, "/") return clean_path if clean_path.eql?(base_directory) diff --git a/lib/jekyll/cleaner.rb b/lib/jekyll/cleaner.rb index db8a9180f94..fee6418a99c 100644 --- a/lib/jekyll/cleaner.rb +++ b/lib/jekyll/cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "set" module Jekyll diff --git a/lib/jekyll/collection.rb b/lib/jekyll/collection.rb index f839915f599..ebafea38f97 100644 --- a/lib/jekyll/collection.rb +++ b/lib/jekyll/collection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Collection attr_reader :site, :label, :metadata diff --git a/lib/jekyll/command.rb b/lib/jekyll/command.rb index f9f243dd9e6..7de98e76ea8 100644 --- a/lib/jekyll/command.rb +++ b/lib/jekyll/command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Command class << self diff --git a/lib/jekyll/commands/build.rb b/lib/jekyll/commands/build.rb index 3cea607cbd0..1bd176b8be4 100644 --- a/lib/jekyll/commands/build.rb +++ b/lib/jekyll/commands/build.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Commands class Build < Command diff --git a/lib/jekyll/commands/clean.rb b/lib/jekyll/commands/clean.rb index 3a44d59683e..1c3e40bf6c4 100644 --- a/lib/jekyll/commands/clean.rb +++ b/lib/jekyll/commands/clean.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Commands class Clean < Command diff --git a/lib/jekyll/commands/doctor.rb b/lib/jekyll/commands/doctor.rb index 5c235dac132..1ef87e714d5 100644 --- a/lib/jekyll/commands/doctor.rb +++ b/lib/jekyll/commands/doctor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "addressable/uri" module Jekyll diff --git a/lib/jekyll/commands/help.rb b/lib/jekyll/commands/help.rb index b4f136bf3e5..42a8017ae8a 100644 --- a/lib/jekyll/commands/help.rb +++ b/lib/jekyll/commands/help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Commands class Help < Command diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index d1aeb5a0281..b1c8bb0bc4b 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "erb" module Jekyll diff --git a/lib/jekyll/commands/new_theme.rb b/lib/jekyll/commands/new_theme.rb index 65125d58d50..c55e68127d8 100644 --- a/lib/jekyll/commands/new_theme.rb +++ b/lib/jekyll/commands/new_theme.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "erb" class Jekyll::Commands::NewTheme < Jekyll::Command diff --git a/lib/jekyll/commands/serve.rb b/lib/jekyll/commands/serve.rb index 4bc9eaf0da8..53973b66cb4 100644 --- a/lib/jekyll/commands/serve.rb +++ b/lib/jekyll/commands/serve.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Commands class Serve < Command diff --git a/lib/jekyll/commands/serve/servlet.rb b/lib/jekyll/commands/serve/servlet.rb index 2e20ace81d5..b661940c30a 100644 --- a/lib/jekyll/commands/serve/servlet.rb +++ b/lib/jekyll/commands/serve/servlet.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "webrick" module Jekyll diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index ec8e2a22dc0..2931cba4500 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll class Configuration < Hash diff --git a/lib/jekyll/converter.rb b/lib/jekyll/converter.rb index b7fa0091cb3..3cb74de2123 100644 --- a/lib/jekyll/converter.rb +++ b/lib/jekyll/converter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Converter < Plugin # Public: Get or set the highlighter prefix. When an argument is specified, diff --git a/lib/jekyll/converters/identity.rb b/lib/jekyll/converters/identity.rb index 9574769d1a9..2296aff1966 100644 --- a/lib/jekyll/converters/identity.rb +++ b/lib/jekyll/converters/identity.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Converters class Identity < Converter diff --git a/lib/jekyll/converters/markdown.rb b/lib/jekyll/converters/markdown.rb index c718d539b7c..3e53992104d 100644 --- a/lib/jekyll/converters/markdown.rb +++ b/lib/jekyll/converters/markdown.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Converters class Markdown < Converter diff --git a/lib/jekyll/converters/markdown/rdiscount_parser.rb b/lib/jekyll/converters/markdown/rdiscount_parser.rb index f1679e796c4..654a3a6d0ed 100644 --- a/lib/jekyll/converters/markdown/rdiscount_parser.rb +++ b/lib/jekyll/converters/markdown/rdiscount_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Converters class Markdown diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb index aa170feb3b7..fae09621da2 100644 --- a/lib/jekyll/converters/markdown/redcarpet_parser.rb +++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Jekyll::Converters::Markdown::RedcarpetParser module CommonMethods def add_code_tags(code, lang) @@ -48,9 +50,7 @@ module WithRouge def block_code(code, lang) code = "
#{super}
" - output = "
" - output << add_code_tags(code, lang) - output << "
" + "
#{add_code_tags(code, lang)}
" end protected diff --git a/lib/jekyll/converters/smartypants.rb b/lib/jekyll/converters/smartypants.rb index d1bc81039a1..37fecb12172 100644 --- a/lib/jekyll/converters/smartypants.rb +++ b/lib/jekyll/converters/smartypants.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Kramdown::Parser::SmartyPants < Kramdown::Parser::Kramdown def initialize(source, options) super diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index 74125f09b1d..aea33fdcb86 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require "set" diff --git a/lib/jekyll/deprecator.rb b/lib/jekyll/deprecator.rb index ca2b8b3f74a..327358c2d4f 100644 --- a/lib/jekyll/deprecator.rb +++ b/lib/jekyll/deprecator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Deprecator extend self diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 8634082c4d9..b6493f3c075 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll class Document diff --git a/lib/jekyll/drops/collection_drop.rb b/lib/jekyll/drops/collection_drop.rb index 5f5025b1f2d..2c9c01320ea 100644 --- a/lib/jekyll/drops/collection_drop.rb +++ b/lib/jekyll/drops/collection_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/document_drop.rb b/lib/jekyll/drops/document_drop.rb index ed851821eb1..7796980c7a4 100644 --- a/lib/jekyll/drops/document_drop.rb +++ b/lib/jekyll/drops/document_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/drop.rb b/lib/jekyll/drops/drop.rb index 6227213e4dd..1ded11eb7d2 100644 --- a/lib/jekyll/drops/drop.rb +++ b/lib/jekyll/drops/drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/excerpt_drop.rb b/lib/jekyll/drops/excerpt_drop.rb index 5d61aeb1b2d..06f8ae7d016 100644 --- a/lib/jekyll/drops/excerpt_drop.rb +++ b/lib/jekyll/drops/excerpt_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/jekyll_drop.rb b/lib/jekyll/drops/jekyll_drop.rb index e3d2eb38d52..1686da418f1 100644 --- a/lib/jekyll/drops/jekyll_drop.rb +++ b/lib/jekyll/drops/jekyll_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/site_drop.rb b/lib/jekyll/drops/site_drop.rb index 97b41806444..cb4a007eb15 100644 --- a/lib/jekyll/drops/site_drop.rb +++ b/lib/jekyll/drops/site_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/static_file_drop.rb b/lib/jekyll/drops/static_file_drop.rb index e0af2f09ed1..f855cf33629 100644 --- a/lib/jekyll/drops/static_file_drop.rb +++ b/lib/jekyll/drops/static_file_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Drops class StaticFileDrop < Drop diff --git a/lib/jekyll/drops/unified_payload_drop.rb b/lib/jekyll/drops/unified_payload_drop.rb index b642bda2620..833443a46f9 100644 --- a/lib/jekyll/drops/unified_payload_drop.rb +++ b/lib/jekyll/drops/unified_payload_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/drops/url_drop.rb b/lib/jekyll/drops/url_drop.rb index 5c97190da59..e67d24d47b8 100644 --- a/lib/jekyll/drops/url_drop.rb +++ b/lib/jekyll/drops/url_drop.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Drops diff --git a/lib/jekyll/entry_filter.rb b/lib/jekyll/entry_filter.rb index f4425037afc..019133195d3 100644 --- a/lib/jekyll/entry_filter.rb +++ b/lib/jekyll/entry_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class EntryFilter attr_reader :site diff --git a/lib/jekyll/errors.rb b/lib/jekyll/errors.rb index 95aa04b4ccd..8d659e8d285 100644 --- a/lib/jekyll/errors.rb +++ b/lib/jekyll/errors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Errors FatalException = Class.new(::RuntimeError) diff --git a/lib/jekyll/excerpt.rb b/lib/jekyll/excerpt.rb index 61344e7964b..7adfec9861c 100644 --- a/lib/jekyll/excerpt.rb +++ b/lib/jekyll/excerpt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Excerpt extend Forwardable @@ -117,7 +119,7 @@ def extract_excerpt(doc_content) if tail.empty? head else - "" << head << "\n\n" << tail.scan(%r!^ {0,3}\[[^\]]+\]:.+$!).join("\n") + head.to_s.dup << "\n\n" << tail.scan(%r!^ {0,3}\[[^\]]+\]:.+$!).join("\n") end end end diff --git a/lib/jekyll/external.rb b/lib/jekyll/external.rb index bdefc798ae8..0a65dfad058 100644 --- a/lib/jekyll/external.rb +++ b/lib/jekyll/external.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module External class << self diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index e15cf7c66dd..35ed4d9f63e 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "addressable/uri" require "json" require "date" diff --git a/lib/jekyll/filters/grouping_filters.rb b/lib/jekyll/filters/grouping_filters.rb index c1029256106..4086bbe9854 100644 --- a/lib/jekyll/filters/grouping_filters.rb +++ b/lib/jekyll/filters/grouping_filters.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Filters module GroupingFilters diff --git a/lib/jekyll/filters/url_filters.rb b/lib/jekyll/filters/url_filters.rb index 6ededc956d1..5bae1b1794e 100644 --- a/lib/jekyll/filters/url_filters.rb +++ b/lib/jekyll/filters/url_filters.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "addressable/uri" module Jekyll diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb index 7cbfa358677..fc1bcc2d867 100644 --- a/lib/jekyll/frontmatter_defaults.rb +++ b/lib/jekyll/frontmatter_defaults.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll # This class handles custom defaults for YAML frontmatter settings. # These are set in _config.yml and apply both to internal use (e.g. layout) diff --git a/lib/jekyll/generator.rb b/lib/jekyll/generator.rb index bf7c0f19aba..649715f840c 100644 --- a/lib/jekyll/generator.rb +++ b/lib/jekyll/generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll Generator = Class.new(Plugin) end diff --git a/lib/jekyll/hooks.rb b/lib/jekyll/hooks.rb index 241dce3a7f1..8007edff59c 100644 --- a/lib/jekyll/hooks.rb +++ b/lib/jekyll/hooks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Hooks DEFAULT_PRIORITY = 20 diff --git a/lib/jekyll/layout.rb b/lib/jekyll/layout.rb index 3a08ad0d3be..f62fec08be2 100644 --- a/lib/jekyll/layout.rb +++ b/lib/jekyll/layout.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Layout include Convertible diff --git a/lib/jekyll/liquid_extensions.rb b/lib/jekyll/liquid_extensions.rb index 5ba7dd8e79f..4551ac19bbd 100644 --- a/lib/jekyll/liquid_extensions.rb +++ b/lib/jekyll/liquid_extensions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module LiquidExtensions diff --git a/lib/jekyll/liquid_renderer.rb b/lib/jekyll/liquid_renderer.rb index 919930ef8b0..2e15dbc6dcd 100644 --- a/lib/jekyll/liquid_renderer.rb +++ b/lib/jekyll/liquid_renderer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "jekyll/liquid_renderer/file" require "jekyll/liquid_renderer/table" diff --git a/lib/jekyll/liquid_renderer/file.rb b/lib/jekyll/liquid_renderer/file.rb index eec8c7b52a8..574bbd31300 100644 --- a/lib/jekyll/liquid_renderer/file.rb +++ b/lib/jekyll/liquid_renderer/file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class LiquidRenderer class File diff --git a/lib/jekyll/liquid_renderer/table.rb b/lib/jekyll/liquid_renderer/table.rb index aab7fdf7845..7aa2e49ee4e 100644 --- a/lib/jekyll/liquid_renderer/table.rb +++ b/lib/jekyll/liquid_renderer/table.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class LiquidRenderer::Table def initialize(stats) @@ -13,7 +15,7 @@ def to_s(n = 50) private def generate_table(data, widths) - str = "\n" + str = String.new("\n") table_head = data.shift str << generate_row(table_head, widths) @@ -28,7 +30,7 @@ def generate_table(data, widths) end def generate_table_head_border(row_data, widths) - str = "" + str = String.new("") row_data.each_index do |cell_index| str << "-" * widths[cell_index] @@ -40,7 +42,7 @@ def generate_table_head_border(row_data, widths) end def generate_row(row_data, widths) - str = "" + str = String.new("") row_data.each_with_index do |cell_data, cell_index| str << if cell_index.zero? diff --git a/lib/jekyll/log_adapter.rb b/lib/jekyll/log_adapter.rb index 965f3295702..ec33b4d90d8 100644 --- a/lib/jekyll/log_adapter.rb +++ b/lib/jekyll/log_adapter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class LogAdapter attr_reader :writer, :messages diff --git a/lib/jekyll/mime.types b/lib/jekyll/mime.types index 15828b91c4c..1aefbb586d3 100644 --- a/lib/jekyll/mime.types +++ b/lib/jekyll/mime.types @@ -14,7 +14,7 @@ application/cdmi-domain cdmid application/cdmi-object cdmio application/cdmi-queue cdmiq application/cu-seeme cu -application/dash+xml mdp +application/dash+xml mpd application/davmount+xml davmount application/docbook+xml dbk application/dssc+der dssc @@ -26,9 +26,11 @@ application/exi exi application/font-tdpfr pfr application/font-woff woff application/font-woff2 woff2 +application/geo+json geojson application/gml+xml gml application/gpx+xml gpx application/gxf gxf +application/gzip gz application/hyperstudio stk application/inkml+xml ink inkml application/ipfix ipfix @@ -142,6 +144,7 @@ application/vnd.anser-web-funds-transfer-initiation fti application/vnd.antix.game-component atx application/vnd.apple.installer+xml mpkg application/vnd.apple.mpegurl m3u8 +application/vnd.apple.pkpass pkpass application/vnd.aristanetworks.swi swi application/vnd.astraea-software.iota iota application/vnd.audiograph aep @@ -220,6 +223,9 @@ application/vnd.geonext gxt application/vnd.geoplan g2w application/vnd.geospace g3w application/vnd.gmx gmx +application/vnd.google-apps.document gdoc +application/vnd.google-apps.presentation gslides +application/vnd.google-apps.spreadsheet gsheet application/vnd.google-earth.kml+xml kml application/vnd.google-earth.kmz kmz application/vnd.grafeq gqf gqs @@ -317,6 +323,7 @@ application/vnd.ms-htmlhelp chm application/vnd.ms-ims ims application/vnd.ms-lrm lrm application/vnd.ms-officetheme thmx +application/vnd.ms-outlook msg application/vnd.ms-pki.seccat cat application/vnd.ms-pki.stl stl application/vnd.ms-powerpoint ppt pps pot @@ -422,6 +429,7 @@ application/vnd.stardivision.writer sdw vo application/vnd.stardivision.writer-global sgl application/vnd.stepmania.package smzip application/vnd.stepmania.stepchart sm +application/vnd.sun.wadl+xml wadl application/vnd.sun.xml.calc sxc application/vnd.sun.xml.calc.template stc application/vnd.sun.xml.draw sxd @@ -594,7 +602,7 @@ application/xaml+xml xaml application/xcap-diff+xml xdf application/xenc+xml xenc application/xhtml+xml xhtml xht -application/xml xml xsl xsd +application/xml xml xsl xsd rng application/xml-dtd dtd application/xop+xml xop application/xproc+xml xpl @@ -604,11 +612,13 @@ application/xv+xml mxml x application/yang yang application/yin+xml yin application/zip zip +audio/3gpp 3gpp audio/adpcm adp audio/basic au snd audio/midi mid midi kar rmi -audio/mp4 mp4a m4a -audio/mpeg mpga mp2 mp2a mp3 m2a m3a +audio/mp3 mp3 +audio/mp4 m4a mp4a +audio/mpeg mpga mp2 mp2a m2a m3a audio/ogg oga ogg spx audio/s3m s3m audio/silk sil @@ -642,6 +652,7 @@ chemical/x-cmdf cmdf chemical/x-cml cml chemical/x-csml csml chemical/x-xyz xyz +image/apng apng image/bmp bmp image/cgm cgm image/g3fax g3 @@ -690,6 +701,8 @@ image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd message/rfc822 eml mime +model/gltf+json gltf +model/gltf-binary glb model/iges igs iges model/mesh msh mesh silo model/vnd.collada+xml dae @@ -712,12 +725,14 @@ text/html html h text/jade jade text/jsx jsx text/less less +text/markdown markdown md text/mathml mml text/n3 n3 text/plain txt text conf def list log in ini text/prs.lines.tag dsc text/richtext rtx text/sgml sgml sgm +text/slim slim slm text/stylus stylus styl text/tab-separated-values tsv text/troff t tr roff man me ms @@ -744,7 +759,7 @@ text/x-fortran f for text/x-handlebars-template hbs text/x-java-source java text/x-lua lua -text/x-markdown markdown md mkd +text/x-markdown mkd text/x-nfo nfo text/x-opml opml text/x-pascal p pas @@ -753,11 +768,12 @@ text/x-sass sass text/x-scss scss text/x-setext etx text/x-sfv sfv +text/x-suse-ymp ymp text/x-uuencode uu text/x-vcalendar vcs text/x-vcard vcf text/yaml yaml yml -video/3gpp 3gp 3gpp +video/3gpp 3gp video/3gpp2 3g2 video/h261 h261 video/h263 h263 diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 02c6cfae9f1..3b3d9353879 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Page include Convertible diff --git a/lib/jekyll/plugin.rb b/lib/jekyll/plugin.rb index b6e5023d80e..2a9dbeed41b 100644 --- a/lib/jekyll/plugin.rb +++ b/lib/jekyll/plugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Plugin PRIORITIES = { diff --git a/lib/jekyll/plugin_manager.rb b/lib/jekyll/plugin_manager.rb index 979004d63b6..f53d187a337 100644 --- a/lib/jekyll/plugin_manager.rb +++ b/lib/jekyll/plugin_manager.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class PluginManager attr_reader :site diff --git a/lib/jekyll/publisher.rb b/lib/jekyll/publisher.rb index 0b67b8c6025..26fe4a3869b 100644 --- a/lib/jekyll/publisher.rb +++ b/lib/jekyll/publisher.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Publisher def initialize(site) diff --git a/lib/jekyll/reader.rb b/lib/jekyll/reader.rb index 903e36d3a48..5804d1f963a 100644 --- a/lib/jekyll/reader.rb +++ b/lib/jekyll/reader.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require "csv" diff --git a/lib/jekyll/readers/collection_reader.rb b/lib/jekyll/readers/collection_reader.rb index 062be42a4b4..7d605f421c4 100644 --- a/lib/jekyll/readers/collection_reader.rb +++ b/lib/jekyll/readers/collection_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class CollectionReader SPECIAL_COLLECTIONS = %w(posts data).freeze diff --git a/lib/jekyll/readers/data_reader.rb b/lib/jekyll/readers/data_reader.rb index 63db7c6d920..e2671f2d3b4 100644 --- a/lib/jekyll/readers/data_reader.rb +++ b/lib/jekyll/readers/data_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class DataReader attr_reader :site, :content diff --git a/lib/jekyll/readers/layout_reader.rb b/lib/jekyll/readers/layout_reader.rb index 985491c67a7..706dfed8c43 100644 --- a/lib/jekyll/readers/layout_reader.rb +++ b/lib/jekyll/readers/layout_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class LayoutReader attr_reader :site diff --git a/lib/jekyll/readers/page_reader.rb b/lib/jekyll/readers/page_reader.rb index 507c609e507..62d7419efec 100644 --- a/lib/jekyll/readers/page_reader.rb +++ b/lib/jekyll/readers/page_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class PageReader attr_reader :site, :dir, :unfiltered_content diff --git a/lib/jekyll/readers/post_reader.rb b/lib/jekyll/readers/post_reader.rb index 70688875da5..510192793b0 100644 --- a/lib/jekyll/readers/post_reader.rb +++ b/lib/jekyll/readers/post_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class PostReader attr_reader :site, :unfiltered_content diff --git a/lib/jekyll/readers/static_file_reader.rb b/lib/jekyll/readers/static_file_reader.rb index 1d43d69c659..6bf07f5a0c3 100644 --- a/lib/jekyll/readers/static_file_reader.rb +++ b/lib/jekyll/readers/static_file_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class StaticFileReader attr_reader :site, :dir, :unfiltered_content diff --git a/lib/jekyll/readers/theme_assets_reader.rb b/lib/jekyll/readers/theme_assets_reader.rb index 80a6547d8a7..2706690c5ce 100644 --- a/lib/jekyll/readers/theme_assets_reader.rb +++ b/lib/jekyll/readers/theme_assets_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class ThemeAssetsReader attr_reader :site diff --git a/lib/jekyll/regenerator.rb b/lib/jekyll/regenerator.rb index 09ff309a28d..91ce3003bdf 100644 --- a/lib/jekyll/regenerator.rb +++ b/lib/jekyll/regenerator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Regenerator attr_reader :site, :metadata, :cache diff --git a/lib/jekyll/related_posts.rb b/lib/jekyll/related_posts.rb index 3526a73b76f..fcccdd80eeb 100644 --- a/lib/jekyll/related_posts.rb +++ b/lib/jekyll/related_posts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class RelatedPosts class << self diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index b0f544e35e5..5a2d32a8d27 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll class Renderer diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 0bc3f1d577c..54155d0c8e2 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require "csv" diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 29d71cbe8e7..55f0256c24f 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class StaticFile attr_reader :relative_path, :extname, :name, :data diff --git a/lib/jekyll/stevenson.rb b/lib/jekyll/stevenson.rb index bf20b22f752..bbec66171f6 100644 --- a/lib/jekyll/stevenson.rb +++ b/lib/jekyll/stevenson.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Stevenson < ::Logger def initialize diff --git a/lib/jekyll/tags/highlight.rb b/lib/jekyll/tags/highlight.rb index 86b9171b1fb..7ea95b0b101 100644 --- a/lib/jekyll/tags/highlight.rb +++ b/lib/jekyll/tags/highlight.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Tags class HighlightBlock < Liquid::Block diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 08843047a2e..ef6c8f732ca 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Jekyll module Tags diff --git a/lib/jekyll/tags/link.rb b/lib/jekyll/tags/link.rb index a076c417252..77f4da9ca48 100644 --- a/lib/jekyll/tags/link.rb +++ b/lib/jekyll/tags/link.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Tags class Link < Liquid::Tag diff --git a/lib/jekyll/tags/post_url.rb b/lib/jekyll/tags/post_url.rb index f7e52f42b57..9a1b8337c91 100644 --- a/lib/jekyll/tags/post_url.rb +++ b/lib/jekyll/tags/post_url.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Tags class PostComparer diff --git a/lib/jekyll/theme.rb b/lib/jekyll/theme.rb index 045c91aa0c8..031c61b1e7a 100644 --- a/lib/jekyll/theme.rb +++ b/lib/jekyll/theme.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Theme extend Forwardable diff --git a/lib/jekyll/theme_builder.rb b/lib/jekyll/theme_builder.rb index f1c97e37974..aca89dd655c 100644 --- a/lib/jekyll/theme_builder.rb +++ b/lib/jekyll/theme_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Jekyll::ThemeBuilder SCAFFOLD_DIRECTORIES = %w( assets _layouts _includes _sass diff --git a/lib/jekyll/url.rb b/lib/jekyll/url.rb index 8f3047d30cf..f91578507da 100644 --- a/lib/jekyll/url.rb +++ b/lib/jekyll/url.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "addressable/uri" # Public: Methods that generate a URL for a resource such as a Post or a Page. @@ -93,7 +95,7 @@ def possible_keys(key) def generate_url_from_drop(template) template.gsub(%r!:([a-z_]+)!) do |match| - pool = possible_keys(match.sub(":".freeze, "".freeze)) + pool = possible_keys(match.sub(":", "")) winner = pool.find { |key| @placeholders.key?(key) } if winner.nil? diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb index 3f91a2b00fd..c9dcf2fd324 100644 --- a/lib/jekyll/utils.rb +++ b/lib/jekyll/utils.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + module Jekyll module Utils extend self @@ -247,6 +249,8 @@ def slugify(string, mode: nil, cased: false) # # Returns the updated permalink template def add_permalink_suffix(template, permalink_style) + template = template.dup + case permalink_style when :pretty template << "/" @@ -256,6 +260,7 @@ def add_permalink_suffix(template, permalink_style) template << "/" if permalink_style.to_s.end_with?("/") template << ":output_ext" if permalink_style.to_s.end_with?(":output_ext") end + template end @@ -296,7 +301,7 @@ def safe_glob(dir, patterns, flags = 0) def merged_file_read_opts(site, opts) merged = (site ? site.file_read_opts : {}).merge(opts) if merged["encoding"] && !merged["encoding"].start_with?("bom|") - merged["encoding"].insert(0, "bom|") + merged["encoding"] = "bom|#{merged["encoding"]}" end merged end diff --git a/lib/jekyll/utils/exec.rb b/lib/jekyll/utils/exec.rb index 33403dbc50d..fee8b2d2e5b 100644 --- a/lib/jekyll/utils/exec.rb +++ b/lib/jekyll/utils/exec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" module Jekyll diff --git a/lib/jekyll/utils/platforms.rb b/lib/jekyll/utils/platforms.rb index f66ef795bbd..f4f3382a240 100644 --- a/lib/jekyll/utils/platforms.rb +++ b/lib/jekyll/utils/platforms.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Utils module Platforms diff --git a/lib/jekyll/utils/win_tz.rb b/lib/jekyll/utils/win_tz.rb index 06a10422274..322f5ac6230 100644 --- a/lib/jekyll/utils/win_tz.rb +++ b/lib/jekyll/utils/win_tz.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll module Utils module WinTZ diff --git a/lib/jekyll/version.rb b/lib/jekyll/version.rb index 8a8b2b30c11..6a27620408a 100644 --- a/lib/jekyll/version.rb +++ b/lib/jekyll/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll VERSION = "3.5.1".freeze end diff --git a/lib/theme_template/Gemfile b/lib/theme_template/Gemfile index 3be9c3cd812..bb94df82938 100644 --- a/lib/theme_template/Gemfile +++ b/lib/theme_template/Gemfile @@ -1,2 +1,4 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec diff --git a/rake/docs.rake b/rake/docs.rake index fcae4f20162..e64c6cfdccd 100644 --- a/rake/docs.rake +++ b/rake/docs.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ############################################################################# # # Packaging tasks for jekyll-docs diff --git a/rake/release.rake b/rake/release.rake index 9d9220a49a7..ce7bf41ca94 100644 --- a/rake/release.rake +++ b/rake/release.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ############################################################################# # # Packaging tasks diff --git a/rake/site.rake b/rake/site.rake index 00ffd228b44..94aa969ea22 100644 --- a/rake/site.rake +++ b/rake/site.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ############################################################################# # # Site tasks - https://jekyllrb.com diff --git a/test/fixtures/test-dependency-theme/test-dependency-theme.gemspec b/test/fixtures/test-dependency-theme/test-dependency-theme.gemspec index 5c260329d3b..ebc8a83c3a1 100644 --- a/test/fixtures/test-dependency-theme/test-dependency-theme.gemspec +++ b/test/fixtures/test-dependency-theme/test-dependency-theme.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Gem::Specification.new do |s| s.name = "test-dependency-theme" s.version = "0.1.0" diff --git a/test/fixtures/test-theme/test-theme.gemspec b/test/fixtures/test-theme/test-theme.gemspec index 73e5deb2e94..970e1b8abdd 100644 --- a/test/fixtures/test-theme/test-theme.gemspec +++ b/test/fixtures/test-theme/test-theme.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Gem::Specification.new do |s| s.name = "test-theme" s.version = "0.1.0" diff --git a/test/helper.rb b/test/helper.rb index 83beaad3c1c..3f3227bab4f 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + $stdout.puts "# -------------------------------------------------------------" $stdout.puts "# SPECS AND TESTS ARE RUNNING WITH WARNINGS OFF." $stdout.puts "# SEE: https://github.com/Shopify/liquid/issues/730" diff --git a/test/simplecov_custom_profile.rb b/test/simplecov_custom_profile.rb index 0aaec88a58c..555acec3d7e 100644 --- a/test/simplecov_custom_profile.rb +++ b/test/simplecov_custom_profile.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "simplecov" SimpleCov.profiles.define "gem" do diff --git a/test/source/_plugins/dummy.rb b/test/source/_plugins/dummy.rb index fd11d0e1044..25eef88e21b 100644 --- a/test/source/_plugins/dummy.rb +++ b/test/source/_plugins/dummy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll class Dummy < Generator priority :high diff --git a/test/test_ansi.rb b/test/test_ansi.rb index 8f18f56ec7b..9b4fd01668c 100644 --- a/test/test_ansi.rb +++ b/test/test_ansi.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestAnsi < JekyllUnitTest diff --git a/test/test_cleaner.rb b/test/test_cleaner.rb index d3072e54977..65442cedc0d 100644 --- a/test/test_cleaner.rb +++ b/test/test_cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestCleaner < JekyllUnitTest diff --git a/test/test_coffeescript.rb b/test/test_coffeescript.rb index 189ce05df3e..a60e0595430 100644 --- a/test/test_coffeescript.rb +++ b/test/test_coffeescript.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestCoffeeScript < JekyllUnitTest diff --git a/test/test_collections.rb b/test/test_collections.rb index cb122cd9e65..e4dbe951a25 100644 --- a/test/test_collections.rb +++ b/test/test_collections.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestCollections < JekyllUnitTest diff --git a/test/test_command.rb b/test/test_command.rb index 90767013b92..33e13798cc6 100644 --- a/test/test_command.rb +++ b/test/test_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestCommand < JekyllUnitTest diff --git a/test/test_commands_serve.rb b/test/test_commands_serve.rb index ef98bab4e2b..135e83e2dba 100644 --- a/test/test_commands_serve.rb +++ b/test/test_commands_serve.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "webrick" require "mercenary" require "helper" diff --git a/test/test_configuration.rb b/test/test_configuration.rb index 50156926202..dddb61b8671 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" require "colorator" diff --git a/test/test_convertible.rb b/test/test_convertible.rb index ef70307062f..cc5be8785a7 100644 --- a/test/test_convertible.rb +++ b/test/test_convertible.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" require "ostruct" diff --git a/test/test_doctor_command.rb b/test/test_doctor_command.rb index 8861440255c..182878689cc 100644 --- a/test/test_doctor_command.rb +++ b/test/test_doctor_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" require "jekyll/commands/doctor" diff --git a/test/test_document.rb b/test/test_document.rb index 8726c83cd6a..42ba3c5748b 100644 --- a/test/test_document.rb +++ b/test/test_document.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestDocument < JekyllUnitTest diff --git a/test/test_drop.rb b/test/test_drop.rb index 80b0d0ff693..00d2116471d 100644 --- a/test/test_drop.rb +++ b/test/test_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestDrop < JekyllUnitTest diff --git a/test/test_entry_filter.rb b/test/test_entry_filter.rb index 7f32653c957..c9025092318 100644 --- a/test/test_entry_filter.rb +++ b/test/test_entry_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestEntryFilter < JekyllUnitTest diff --git a/test/test_excerpt.rb b/test/test_excerpt.rb index e0960f69663..2bcf3ba8cac 100644 --- a/test/test_excerpt.rb +++ b/test/test_excerpt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestExcerpt < JekyllUnitTest diff --git a/test/test_excerpt_drop.rb b/test/test_excerpt_drop.rb index 901b06a6f79..1eb6687266d 100644 --- a/test/test_excerpt_drop.rb +++ b/test/test_excerpt_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestExcerptDrop < JekyllUnitTest diff --git a/test/test_filters.rb b/test/test_filters.rb index e0eb2feee87..cb95a6449fb 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -1,4 +1,5 @@ # coding: utf-8 +# frozen_string_literal: true require "helper" diff --git a/test/test_front_matter_defaults.rb b/test/test_front_matter_defaults.rb index d45ab6de9a5..9bf9629a9ed 100644 --- a/test/test_front_matter_defaults.rb +++ b/test/test_front_matter_defaults.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestFrontMatterDefaults < JekyllUnitTest diff --git a/test/test_generated_site.rb b/test/test_generated_site.rb index 84345524d74..136f5fc9e68 100644 --- a/test/test_generated_site.rb +++ b/test/test_generated_site.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestGeneratedSite < JekyllUnitTest diff --git a/test/test_kramdown.rb b/test/test_kramdown.rb index 6396d67201b..3861416ff2e 100644 --- a/test/test_kramdown.rb +++ b/test/test_kramdown.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require "helper" diff --git a/test/test_layout_reader.rb b/test/test_layout_reader.rb index 1d32fa57892..96d2045a148 100644 --- a/test/test_layout_reader.rb +++ b/test/test_layout_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestLayoutReader < JekyllUnitTest diff --git a/test/test_liquid_extensions.rb b/test/test_liquid_extensions.rb index a76f378623e..e281e10e5fd 100644 --- a/test/test_liquid_extensions.rb +++ b/test/test_liquid_extensions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestLiquidExtensions < JekyllUnitTest diff --git a/test/test_liquid_renderer.rb b/test/test_liquid_renderer.rb index 6ba29299d67..32e980b8af9 100644 --- a/test/test_liquid_renderer.rb +++ b/test/test_liquid_renderer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestLiquidRenderer < JekyllUnitTest diff --git a/test/test_log_adapter.rb b/test/test_log_adapter.rb index 7e0873ca33f..2bcd2f1d7c9 100644 --- a/test/test_log_adapter.rb +++ b/test/test_log_adapter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestLogAdapter < JekyllUnitTest diff --git a/test/test_new_command.rb b/test/test_new_command.rb index 32db566d98b..c2b7def4001 100644 --- a/test/test_new_command.rb +++ b/test/test_new_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" require "jekyll/commands/new" diff --git a/test/test_page.rb b/test/test_page.rb index 431c57a63ca..ed4c2c31a9a 100644 --- a/test/test_page.rb +++ b/test/test_page.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestPage < JekyllUnitTest diff --git a/test/test_path_sanitization.rb b/test/test_path_sanitization.rb index 31a4b92ebff..184385fabd3 100644 --- a/test/test_path_sanitization.rb +++ b/test/test_path_sanitization.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestPathSanitization < JekyllUnitTest diff --git a/test/test_plugin_manager.rb b/test/test_plugin_manager.rb index 90f057641e7..213bcef6b12 100644 --- a/test/test_plugin_manager.rb +++ b/test/test_plugin_manager.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestPluginManager < JekyllUnitTest diff --git a/test/test_rdiscount.rb b/test/test_rdiscount.rb index 32289a64368..7116c29a238 100644 --- a/test/test_rdiscount.rb +++ b/test/test_rdiscount.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestRdiscount < JekyllUnitTest diff --git a/test/test_redcarpet.rb b/test/test_redcarpet.rb index 4e979f4d2ee..f4208570931 100644 --- a/test/test_redcarpet.rb +++ b/test/test_redcarpet.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestRedcarpet < JekyllUnitTest diff --git a/test/test_regenerator.rb b/test/test_regenerator.rb index 9e1559d4bec..3a5d35a8aa8 100644 --- a/test/test_regenerator.rb +++ b/test/test_regenerator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestRegenerator < JekyllUnitTest diff --git a/test/test_related_posts.rb b/test/test_related_posts.rb index 2d6165505e3..d6a8fe6f1f3 100644 --- a/test/test_related_posts.rb +++ b/test/test_related_posts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestRelatedPosts < JekyllUnitTest diff --git a/test/test_sass.rb b/test/test_sass.rb index 3a9df0aeae3..15b04162f01 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestSass < JekyllUnitTest diff --git a/test/test_site.rb b/test/test_site.rb index d039cb8a924..adc69e33436 100644 --- a/test/test_site.rb +++ b/test/test_site.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestSite < JekyllUnitTest diff --git a/test/test_site_drop.rb b/test/test_site_drop.rb index b836c70d3eb..43c52d708a5 100644 --- a/test/test_site_drop.rb +++ b/test/test_site_drop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestSiteDrop < JekyllUnitTest diff --git a/test/test_static_file.rb b/test/test_static_file.rb index 49adc96b79f..edfc9facf0e 100644 --- a/test/test_static_file.rb +++ b/test/test_static_file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestStaticFile < JekyllUnitTest diff --git a/test/test_tags.rb b/test/test_tags.rb index 68fd40398a8..7a60ec9dc18 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -1,4 +1,5 @@ # coding: utf-8 +# frozen_string_literal: true require "helper" diff --git a/test/test_theme.rb b/test/test_theme.rb index 3d557dc8ca0..69628dde1ba 100644 --- a/test/test_theme.rb +++ b/test/test_theme.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestTheme < JekyllUnitTest diff --git a/test/test_theme_assets_reader.rb b/test/test_theme_assets_reader.rb index 8d792f735d9..358789f529a 100644 --- a/test/test_theme_assets_reader.rb +++ b/test/test_theme_assets_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestThemeAssetsReader < JekyllUnitTest diff --git a/test/test_url.rb b/test/test_url.rb index 23ab9735861..859babd4574 100644 --- a/test/test_url.rb +++ b/test/test_url.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestURL < JekyllUnitTest diff --git a/test/test_utils.rb b/test/test_utils.rb index 5f5611ce55e..1b4d4813b66 100644 --- a/test/test_utils.rb +++ b/test/test_utils.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "helper" class TestUtils < JekyllUnitTest