parent
a83b668409
commit
7d7a312b33
10
.rubocop.yml
10
.rubocop.yml
|
|
@ -35,6 +35,8 @@ Metrics/LineLength:
|
||||||
- !ruby/regexp /features\/.*.rb/
|
- !ruby/regexp /features\/.*.rb/
|
||||||
- Rakefile
|
- Rakefile
|
||||||
- rake/*.rake
|
- rake/*.rake
|
||||||
|
- Gemfile
|
||||||
|
- jekyll.gemspec
|
||||||
Max: 90
|
Max: 90
|
||||||
Severity: warning
|
Severity: warning
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
|
|
@ -82,6 +84,8 @@ Style/EmptyLinesAroundAccessModifier:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/EmptyLinesAroundModuleBody:
|
Style/EmptyLinesAroundModuleBody:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
Style/EndOfLine:
|
||||||
|
EnforcedStyle: lf
|
||||||
Style/ExtraSpacing:
|
Style/ExtraSpacing:
|
||||||
AllowForAlignment: true
|
AllowForAlignment: true
|
||||||
Style/FileName:
|
Style/FileName:
|
||||||
|
|
@ -99,8 +103,12 @@ Style/IndentArray:
|
||||||
EnforcedStyle: consistent
|
EnforcedStyle: consistent
|
||||||
Style/IndentHash:
|
Style/IndentHash:
|
||||||
EnforcedStyle: consistent
|
EnforcedStyle: consistent
|
||||||
|
Style/IndentHeredoc:
|
||||||
|
Enabled: false
|
||||||
Style/IndentationWidth:
|
Style/IndentationWidth:
|
||||||
Severity: error
|
Severity: error
|
||||||
|
Style/InverseMethods:
|
||||||
|
Enabled: false
|
||||||
Style/ModuleFunction:
|
Style/ModuleFunction:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/MultilineMethodCallIndentation:
|
Style/MultilineMethodCallIndentation:
|
||||||
|
|
@ -138,6 +146,8 @@ Style/StringLiterals:
|
||||||
EnforcedStyle: double_quotes
|
EnforcedStyle: double_quotes
|
||||||
Style/StringLiteralsInInterpolation:
|
Style/StringLiteralsInInterpolation:
|
||||||
EnforcedStyle: double_quotes
|
EnforcedStyle: double_quotes
|
||||||
|
Style/SymbolArray:
|
||||||
|
Enabled: false
|
||||||
Style/TrailingCommaInLiteral:
|
Style/TrailingCommaInLiteral:
|
||||||
EnforcedStyleForMultiline: consistent_comma
|
EnforcedStyleForMultiline: consistent_comma
|
||||||
Style/UnneededCapitalW:
|
Style/UnneededCapitalW:
|
||||||
|
|
|
||||||
6
Gemfile
6
Gemfile
|
|
@ -25,9 +25,9 @@ group :test do
|
||||||
gem "nokogiri"
|
gem "nokogiri"
|
||||||
gem "rspec"
|
gem "rspec"
|
||||||
gem "rspec-mocks"
|
gem "rspec-mocks"
|
||||||
gem "rubocop", "~> 0.47.1"
|
gem "rubocop", "~> 0.48.1"
|
||||||
gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__))
|
|
||||||
gem "test-dependency-theme", :path => File.expand_path("./test/fixtures/test-dependency-theme", File.dirname(__FILE__))
|
gem "test-dependency-theme", :path => File.expand_path("./test/fixtures/test-dependency-theme", File.dirname(__FILE__))
|
||||||
|
gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__))
|
||||||
|
|
||||||
gem "jruby-openssl" if RUBY_ENGINE == "jruby"
|
gem "jruby-openssl" if RUBY_ENGINE == "jruby"
|
||||||
end
|
end
|
||||||
|
|
@ -77,9 +77,9 @@ group :jekyll_optional_dependencies do
|
||||||
gem "classifier-reborn", "~> 2.1.0"
|
gem "classifier-reborn", "~> 2.1.0"
|
||||||
gem "liquid-c", "~> 3.0"
|
gem "liquid-c", "~> 3.0"
|
||||||
gem "pygments.rb", "~> 0.6.0"
|
gem "pygments.rb", "~> 0.6.0"
|
||||||
gem "yajl-ruby", "~> 1.2"
|
|
||||||
gem "rdiscount", "~> 2.0"
|
gem "rdiscount", "~> 2.0"
|
||||||
gem "redcarpet", "~> 3.2", ">= 3.2.3"
|
gem "redcarpet", "~> 3.2", ">= 3.2.3"
|
||||||
|
gem "yajl-ruby", "~> 1.2"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
|
|
|
||||||
2
Rakefile
2
Rakefile
|
|
@ -106,7 +106,7 @@ def siteify_file(file, overrides_front_matter = {})
|
||||||
front_matter = {
|
front_matter = {
|
||||||
"title" => title,
|
"title" => title,
|
||||||
"permalink" => "/docs/#{slug}/",
|
"permalink" => "/docs/#{slug}/",
|
||||||
"note" => "This file is autogenerated. Edit /#{file} instead."
|
"note" => "This file is autogenerated. Edit /#{file} instead.",
|
||||||
}.merge(overrides_front_matter)
|
}.merge(overrides_front_matter)
|
||||||
contents = "#{front_matter.to_yaml}---\n\n#{content_for(file)}"
|
contents = "#{front_matter.to_yaml}---\n\n#{content_for(file)}"
|
||||||
File.write("#{docs_folder}/_docs/#{slug}.md", contents)
|
File.write("#{docs_folder}/_docs/#{slug}.md", contents)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
lib = File.expand_path("../lib", __FILE__)
|
lib = File.expand_path("../lib", __FILE__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require "jekyll/version"
|
require "jekyll/version"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
|
||||||
require "csv"
|
require "csv"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
|
||||||
require "csv"
|
require "csv"
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
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"
|
||||||
s.licenses = ['MIT']
|
s.licenses = ["MIT"]
|
||||||
s.summary = "This is another theme used to test Jekyll"
|
s.summary = "This is another theme used to test Jekyll"
|
||||||
s.authors = ["Jekyll"]
|
s.authors = ["Jekyll"]
|
||||||
s.files = ["lib/example.rb"]
|
s.files = ["lib/example.rb"]
|
||||||
s.homepage = 'https://github.com/jekyll/jekyll'
|
s.homepage = "https://github.com/jekyll/jekyll"
|
||||||
|
|
||||||
s.add_runtime_dependency "jekyll_test_plugin"
|
s.add_runtime_dependency "jekyll_test_plugin"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
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"
|
||||||
s.licenses = ['MIT']
|
s.licenses = ["MIT"]
|
||||||
s.summary = "This is a theme used to test Jekyll"
|
s.summary = "This is a theme used to test Jekyll"
|
||||||
s.authors = ["Jekyll"]
|
s.authors = ["Jekyll"]
|
||||||
s.files = ["lib/example.rb"]
|
s.files = ["lib/example.rb"]
|
||||||
s.homepage = 'https://github.com/jekyll/jekyll'
|
s.homepage = "https://github.com/jekyll/jekyll"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,9 @@ class TestCollections < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "read document in subfolders with dots" do
|
should "read document in subfolders with dots" do
|
||||||
assert @collection.docs.any? { |d| d.path.include?("all.dots") }
|
assert(
|
||||||
|
@collection.docs.any? { |d| d.path.include?("all.dots") }
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -424,9 +424,9 @@ class TestDocument < JekyllUnitTest
|
||||||
|
|
||||||
context "with output overrides" do
|
context "with output overrides" do
|
||||||
should "be output according its front matter" do
|
should "be output according its front matter" do
|
||||||
assert_nil @files.find { |doc|
|
assert_nil(
|
||||||
doc.relative_path == "_slides/non-outputted-slide.html"
|
@files.find { |doc| doc.relative_path == "_slides/non-outputted-slide.html" }
|
||||||
}
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -184,8 +184,8 @@ class TestFrontMatterDefaults < JekyllUnitTest
|
||||||
should "parse date" do
|
should "parse date" do
|
||||||
@site.process
|
@site.process
|
||||||
date = Time.parse("2015-01-01 00:00:01")
|
date = Time.parse("2015-01-01 00:00:01")
|
||||||
assert @site.pages.find { |page| page.data["date"] == date }
|
assert(@site.pages.find { |page| page.data["date"] == date })
|
||||||
assert @site.posts.find { |page| page.data["date"] == date }
|
assert(@site.posts.find { |page| page.data["date"] == date })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,11 @@ class TestGeneratedSite < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "include a post with a abbreviated dates" do
|
should "include a post with a abbreviated dates" do
|
||||||
refute_nil @site.posts.index { |post|
|
refute_nil(
|
||||||
|
@site.posts.index do |post|
|
||||||
post.relative_path == "_posts/2017-2-5-i-dont-like-zeroes.md"
|
post.relative_path == "_posts/2017-2-5-i-dont-like-zeroes.md"
|
||||||
}
|
end
|
||||||
|
)
|
||||||
assert_exist dest_dir("2017", "02", "05", "i-dont-like-zeroes.html")
|
assert_exist dest_dir("2017", "02", "05", "i-dont-like-zeroes.html")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class TestTags < JekyllUnitTest
|
class TestTags < JekyllUnitTest
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue