Enforce Style/FrozenStringLiteralComment. (#6265)
Merge pull request 6265
This commit is contained in:
parent
f9f05e3f75
commit
7cf5f51ca2
|
@ -9,6 +9,7 @@ AllCops:
|
||||||
- benchmark/**/*
|
- benchmark/**/*
|
||||||
- script/**/*
|
- script/**/*
|
||||||
- vendor/**/*
|
- vendor/**/*
|
||||||
|
- tmp/**/*
|
||||||
Layout/AlignArray:
|
Layout/AlignArray:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Layout/AlignHash:
|
Layout/AlignHash:
|
||||||
|
@ -99,6 +100,9 @@ Style/BracesAroundHashParameters:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
Style/FrozenStringLiteralComment:
|
||||||
|
Enabled: true
|
||||||
|
EnforcedStyle: always
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
gemspec :name => "jekyll"
|
gemspec :name => "jekyll"
|
||||||
|
|
||||||
|
|
2
Rakefile
2
Rakefile
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
require "rake"
|
require "rake"
|
||||||
require "rdoc"
|
require "rdoc"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
STDOUT.sync = true
|
STDOUT.sync = true
|
||||||
|
|
||||||
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Before do
|
Before do
|
||||||
FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist?
|
FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist?
|
||||||
FileUtils.mkdir_p(Paths.test_dir) unless Paths.test_dir.directory?
|
FileUtils.mkdir_p(Paths.test_dir) unless Paths.test_dir.directory?
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "fileutils"
|
require "fileutils"
|
||||||
require "colorator"
|
require "colorator"
|
||||||
require "cucumber/formatter/console"
|
require "cucumber/formatter/console"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "fileutils"
|
require "fileutils"
|
||||||
require "jekyll"
|
require "jekyll"
|
||||||
require "time"
|
require "time"
|
||||||
|
@ -107,7 +109,8 @@ def run_in_shell(*args)
|
||||||
|
|
||||||
File.write(Paths.status_file, p.exitstatus)
|
File.write(Paths.status_file, p.exitstatus)
|
||||||
File.open(Paths.output_file, "wb") do |f|
|
File.open(Paths.output_file, "wb") do |f|
|
||||||
f.puts "$ " << args.join(" ")
|
f.print "$ "
|
||||||
|
f.puts args.join(" ")
|
||||||
f.puts output
|
f.puts output
|
||||||
f.puts "EXIT STATUS: #{p.exitstatus}"
|
f.puts "EXIT STATUS: #{p.exitstatus}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
lib = File.expand_path("lib", __dir__)
|
lib = File.expand_path("lib", __dir__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
$LOAD_PATH.unshift __dir__ # For use/testing when no gem is installed
|
$LOAD_PATH.unshift __dir__ # For use/testing when no gem is installed
|
||||||
|
|
||||||
# Require all of the Ruby files in the given directory.
|
# Require all of the Ruby files in the given directory.
|
||||||
|
@ -162,8 +164,9 @@ module Jekyll
|
||||||
def sanitized_path(base_directory, questionable_path)
|
def sanitized_path(base_directory, questionable_path)
|
||||||
return base_directory if base_directory.eql?(questionable_path)
|
return base_directory if base_directory.eql?(questionable_path)
|
||||||
|
|
||||||
questionable_path.insert(0, "/") if questionable_path.start_with?("~")
|
clean_path = questionable_path.dup
|
||||||
clean_path = File.expand_path(questionable_path, "/")
|
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)
|
return clean_path if clean_path.eql?(base_directory)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "set"
|
require "set"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Collection
|
class Collection
|
||||||
attr_reader :site, :label, :metadata
|
attr_reader :site, :label, :metadata
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Command
|
class Command
|
||||||
class << self
|
class << self
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Commands
|
module Commands
|
||||||
class Build < Command
|
class Build < Command
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Commands
|
module Commands
|
||||||
class Clean < Command
|
class Clean < Command
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "addressable/uri"
|
require "addressable/uri"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Commands
|
module Commands
|
||||||
class Help < Command
|
class Help < Command
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "erb"
|
require "erb"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "erb"
|
require "erb"
|
||||||
|
|
||||||
class Jekyll::Commands::NewTheme < Jekyll::Command
|
class Jekyll::Commands::NewTheme < Jekyll::Command
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Commands
|
module Commands
|
||||||
class Serve < Command
|
class Serve < Command
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "webrick"
|
require "webrick"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Configuration < Hash
|
class Configuration < Hash
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Converter < Plugin
|
class Converter < Plugin
|
||||||
# Public: Get or set the highlighter prefix. When an argument is specified,
|
# Public: Get or set the highlighter prefix. When an argument is specified,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Converters
|
module Converters
|
||||||
class Identity < Converter
|
class Identity < Converter
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Converters
|
module Converters
|
||||||
class Markdown < Converter
|
class Markdown < Converter
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Converters
|
module Converters
|
||||||
class Markdown
|
class Markdown
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Jekyll::Converters::Markdown::RedcarpetParser
|
class Jekyll::Converters::Markdown::RedcarpetParser
|
||||||
module CommonMethods
|
module CommonMethods
|
||||||
def add_code_tags(code, lang)
|
def add_code_tags(code, lang)
|
||||||
|
@ -48,9 +50,7 @@ class Jekyll::Converters::Markdown::RedcarpetParser
|
||||||
def block_code(code, lang)
|
def block_code(code, lang)
|
||||||
code = "<pre>#{super}</pre>"
|
code = "<pre>#{super}</pre>"
|
||||||
|
|
||||||
output = "<div class=\"highlight\">"
|
"<div class=\"highlight\">#{add_code_tags(code, lang)}</div>"
|
||||||
output << add_code_tags(code, lang)
|
|
||||||
output << "</div>"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Kramdown::Parser::SmartyPants < Kramdown::Parser::Kramdown
|
class Kramdown::Parser::SmartyPants < Kramdown::Parser::Kramdown
|
||||||
def initialize(source, options)
|
def initialize(source, options)
|
||||||
super
|
super
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "set"
|
require "set"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Deprecator
|
module Deprecator
|
||||||
extend self
|
extend self
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Document
|
class Document
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
class StaticFileDrop < Drop
|
class StaticFileDrop < Drop
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Drops
|
module Drops
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class EntryFilter
|
class EntryFilter
|
||||||
attr_reader :site
|
attr_reader :site
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Errors
|
module Errors
|
||||||
FatalException = Class.new(::RuntimeError)
|
FatalException = Class.new(::RuntimeError)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Excerpt
|
class Excerpt
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
@ -117,7 +119,7 @@ module Jekyll
|
||||||
if tail.empty?
|
if tail.empty?
|
||||||
head
|
head
|
||||||
else
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module External
|
module External
|
||||||
class << self
|
class << self
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "addressable/uri"
|
require "addressable/uri"
|
||||||
require "json"
|
require "json"
|
||||||
require "date"
|
require "date"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Filters
|
module Filters
|
||||||
module GroupingFilters
|
module GroupingFilters
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "addressable/uri"
|
require "addressable/uri"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
# This class handles custom defaults for YAML frontmatter settings.
|
# This class handles custom defaults for YAML frontmatter settings.
|
||||||
# These are set in _config.yml and apply both to internal use (e.g. layout)
|
# These are set in _config.yml and apply both to internal use (e.g. layout)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
Generator = Class.new(Plugin)
|
Generator = Class.new(Plugin)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Hooks
|
module Hooks
|
||||||
DEFAULT_PRIORITY = 20
|
DEFAULT_PRIORITY = 20
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Layout
|
class Layout
|
||||||
include Convertible
|
include Convertible
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module LiquidExtensions
|
module LiquidExtensions
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "jekyll/liquid_renderer/file"
|
require "jekyll/liquid_renderer/file"
|
||||||
require "jekyll/liquid_renderer/table"
|
require "jekyll/liquid_renderer/table"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class LiquidRenderer
|
class LiquidRenderer
|
||||||
class File
|
class File
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class LiquidRenderer::Table
|
class LiquidRenderer::Table
|
||||||
def initialize(stats)
|
def initialize(stats)
|
||||||
|
@ -13,7 +15,7 @@ module Jekyll
|
||||||
private
|
private
|
||||||
|
|
||||||
def generate_table(data, widths)
|
def generate_table(data, widths)
|
||||||
str = "\n"
|
str = String.new("\n")
|
||||||
|
|
||||||
table_head = data.shift
|
table_head = data.shift
|
||||||
str << generate_row(table_head, widths)
|
str << generate_row(table_head, widths)
|
||||||
|
@ -28,7 +30,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_table_head_border(row_data, widths)
|
def generate_table_head_border(row_data, widths)
|
||||||
str = ""
|
str = String.new("")
|
||||||
|
|
||||||
row_data.each_index do |cell_index|
|
row_data.each_index do |cell_index|
|
||||||
str << "-" * widths[cell_index]
|
str << "-" * widths[cell_index]
|
||||||
|
@ -40,7 +42,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_row(row_data, widths)
|
def generate_row(row_data, widths)
|
||||||
str = ""
|
str = String.new("")
|
||||||
|
|
||||||
row_data.each_with_index do |cell_data, cell_index|
|
row_data.each_with_index do |cell_data, cell_index|
|
||||||
str << if cell_index.zero?
|
str << if cell_index.zero?
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class LogAdapter
|
class LogAdapter
|
||||||
attr_reader :writer, :messages
|
attr_reader :writer, :messages
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Page
|
class Page
|
||||||
include Convertible
|
include Convertible
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Plugin
|
class Plugin
|
||||||
PRIORITIES = {
|
PRIORITIES = {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class PluginManager
|
class PluginManager
|
||||||
attr_reader :site
|
attr_reader :site
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Publisher
|
class Publisher
|
||||||
def initialize(site)
|
def initialize(site)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "csv"
|
require "csv"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class CollectionReader
|
class CollectionReader
|
||||||
SPECIAL_COLLECTIONS = %w(posts data).freeze
|
SPECIAL_COLLECTIONS = %w(posts data).freeze
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class DataReader
|
class DataReader
|
||||||
attr_reader :site, :content
|
attr_reader :site, :content
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class LayoutReader
|
class LayoutReader
|
||||||
attr_reader :site
|
attr_reader :site
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class PageReader
|
class PageReader
|
||||||
attr_reader :site, :dir, :unfiltered_content
|
attr_reader :site, :dir, :unfiltered_content
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class PostReader
|
class PostReader
|
||||||
attr_reader :site, :unfiltered_content
|
attr_reader :site, :unfiltered_content
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class StaticFileReader
|
class StaticFileReader
|
||||||
attr_reader :site, :dir, :unfiltered_content
|
attr_reader :site, :dir, :unfiltered_content
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class ThemeAssetsReader
|
class ThemeAssetsReader
|
||||||
attr_reader :site
|
attr_reader :site
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Regenerator
|
class Regenerator
|
||||||
attr_reader :site, :metadata, :cache
|
attr_reader :site, :metadata, :cache
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class RelatedPosts
|
class RelatedPosts
|
||||||
class << self
|
class << self
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Renderer
|
class Renderer
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "csv"
|
require "csv"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class StaticFile
|
class StaticFile
|
||||||
attr_reader :relative_path, :extname, :name, :data
|
attr_reader :relative_path, :extname, :name, :data
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Stevenson < ::Logger
|
class Stevenson < ::Logger
|
||||||
def initialize
|
def initialize
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Tags
|
module Tags
|
||||||
class HighlightBlock < Liquid::Block
|
class HighlightBlock < Liquid::Block
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Tags
|
module Tags
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Tags
|
module Tags
|
||||||
class Link < Liquid::Tag
|
class Link < Liquid::Tag
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Tags
|
module Tags
|
||||||
class PostComparer
|
class PostComparer
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Theme
|
class Theme
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Jekyll::ThemeBuilder
|
class Jekyll::ThemeBuilder
|
||||||
SCAFFOLD_DIRECTORIES = %w(
|
SCAFFOLD_DIRECTORIES = %w(
|
||||||
assets _layouts _includes _sass
|
assets _layouts _includes _sass
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "addressable/uri"
|
require "addressable/uri"
|
||||||
|
|
||||||
# Public: Methods that generate a URL for a resource such as a Post or a Page.
|
# Public: Methods that generate a URL for a resource such as a Post or a Page.
|
||||||
|
@ -93,7 +95,7 @@ module Jekyll
|
||||||
|
|
||||||
def generate_url_from_drop(template)
|
def generate_url_from_drop(template)
|
||||||
template.gsub(%r!:([a-z_]+)!) do |match|
|
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) }
|
winner = pool.find { |key| @placeholders.key?(key) }
|
||||||
if winner.nil?
|
if winner.nil?
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Utils
|
module Utils
|
||||||
extend self
|
extend self
|
||||||
|
@ -247,6 +249,8 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the updated permalink template
|
# Returns the updated permalink template
|
||||||
def add_permalink_suffix(template, permalink_style)
|
def add_permalink_suffix(template, permalink_style)
|
||||||
|
template = template.dup
|
||||||
|
|
||||||
case permalink_style
|
case permalink_style
|
||||||
when :pretty
|
when :pretty
|
||||||
template << "/"
|
template << "/"
|
||||||
|
@ -256,6 +260,7 @@ module Jekyll
|
||||||
template << "/" if permalink_style.to_s.end_with?("/")
|
template << "/" if permalink_style.to_s.end_with?("/")
|
||||||
template << ":output_ext" if permalink_style.to_s.end_with?(":output_ext")
|
template << ":output_ext" if permalink_style.to_s.end_with?(":output_ext")
|
||||||
end
|
end
|
||||||
|
|
||||||
template
|
template
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -296,7 +301,7 @@ module Jekyll
|
||||||
def merged_file_read_opts(site, opts)
|
def merged_file_read_opts(site, opts)
|
||||||
merged = (site ? site.file_read_opts : {}).merge(opts)
|
merged = (site ? site.file_read_opts : {}).merge(opts)
|
||||||
if merged["encoding"] && !merged["encoding"].start_with?("bom|")
|
if merged["encoding"] && !merged["encoding"].start_with?("bom|")
|
||||||
merged["encoding"].insert(0, "bom|")
|
merged["encoding"] = "bom|#{merged["encoding"]}"
|
||||||
end
|
end
|
||||||
merged
|
merged
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "open3"
|
require "open3"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Utils
|
module Utils
|
||||||
module Platforms
|
module Platforms
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Utils
|
module Utils
|
||||||
module WinTZ
|
module WinTZ
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
VERSION = "3.5.1".freeze
|
VERSION = "3.5.1".freeze
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
gemspec
|
gemspec
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
#
|
#
|
||||||
# Packaging tasks for jekyll-docs
|
# Packaging tasks for jekyll-docs
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
#
|
#
|
||||||
# Packaging tasks
|
# Packaging tasks
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
#
|
#
|
||||||
# Site tasks - https://jekyllrb.com
|
# Site tasks - https://jekyllrb.com
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "test-dependency-theme"
|
s.name = "test-dependency-theme"
|
||||||
s.version = "0.1.0"
|
s.version = "0.1.0"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "test-theme"
|
s.name = "test-theme"
|
||||||
s.version = "0.1.0"
|
s.version = "0.1.0"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
$stdout.puts "# -------------------------------------------------------------"
|
$stdout.puts "# -------------------------------------------------------------"
|
||||||
$stdout.puts "# SPECS AND TESTS ARE RUNNING WITH WARNINGS OFF."
|
$stdout.puts "# SPECS AND TESTS ARE RUNNING WITH WARNINGS OFF."
|
||||||
$stdout.puts "# SEE: https://github.com/Shopify/liquid/issues/730"
|
$stdout.puts "# SEE: https://github.com/Shopify/liquid/issues/730"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "simplecov"
|
require "simplecov"
|
||||||
|
|
||||||
SimpleCov.profiles.define "gem" do
|
SimpleCov.profiles.define "gem" do
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Dummy < Generator
|
class Dummy < Generator
|
||||||
priority :high
|
priority :high
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class TestAnsi < JekyllUnitTest
|
class TestAnsi < JekyllUnitTest
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class TestCleaner < JekyllUnitTest
|
class TestCleaner < JekyllUnitTest
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class TestCoffeeScript < JekyllUnitTest
|
class TestCoffeeScript < JekyllUnitTest
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class TestCollections < JekyllUnitTest
|
class TestCollections < JekyllUnitTest
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class TestCommand < JekyllUnitTest
|
class TestCommand < JekyllUnitTest
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "webrick"
|
require "webrick"
|
||||||
require "mercenary"
|
require "mercenary"
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue