Merge pull request #2591 from jekyll/extract-list
This commit is contained in:
commit
5314bbf952
|
@ -29,12 +29,15 @@ Gem::Specification.new do |s|
|
||||||
s.extra_rdoc_files = %w[README.markdown LICENSE]
|
s.extra_rdoc_files = %w[README.markdown LICENSE]
|
||||||
|
|
||||||
s.add_runtime_dependency('liquid', "~> 2.6.1")
|
s.add_runtime_dependency('liquid', "~> 2.6.1")
|
||||||
s.add_runtime_dependency('classifier', "~> 1.3")
|
|
||||||
s.add_runtime_dependency('kramdown', "~> 1.3")
|
s.add_runtime_dependency('kramdown', "~> 1.3")
|
||||||
s.add_runtime_dependency('pygments.rb', "~> 0.6.0")
|
|
||||||
s.add_runtime_dependency('mercenary', "~> 0.3.3")
|
s.add_runtime_dependency('mercenary', "~> 0.3.3")
|
||||||
s.add_runtime_dependency('safe_yaml', "~> 1.0")
|
s.add_runtime_dependency('safe_yaml', "~> 1.0")
|
||||||
s.add_runtime_dependency('colorator', "~> 0.1")
|
s.add_runtime_dependency('colorator', "~> 0.1")
|
||||||
|
|
||||||
|
# Before 3.0 drops, phase the following gems out as dev dependencies
|
||||||
|
# and gracefully handle their absence.
|
||||||
|
s.add_runtime_dependency('classifier', "~> 1.3")
|
||||||
|
s.add_runtime_dependency('pygments.rb', "~> 0.6.0")
|
||||||
s.add_runtime_dependency('redcarpet', "~> 3.1")
|
s.add_runtime_dependency('redcarpet', "~> 3.1")
|
||||||
s.add_runtime_dependency('toml', '~> 0.1.0')
|
s.add_runtime_dependency('toml', '~> 0.1.0')
|
||||||
s.add_runtime_dependency('jekyll-paginate', '~> 1.0')
|
s.add_runtime_dependency('jekyll-paginate', '~> 1.0')
|
||||||
|
|
|
@ -18,45 +18,48 @@ require 'rubygems'
|
||||||
# stdlib
|
# stdlib
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'time'
|
require 'time'
|
||||||
require 'safe_yaml/load'
|
|
||||||
require 'English'
|
require 'English'
|
||||||
require 'pathname'
|
require 'pathname'
|
||||||
require 'logger'
|
require 'logger'
|
||||||
|
|
||||||
# 3rd party
|
# 3rd party
|
||||||
|
require 'safe_yaml/load'
|
||||||
require 'liquid'
|
require 'liquid'
|
||||||
require 'kramdown'
|
require 'kramdown'
|
||||||
require 'colorator'
|
require 'colorator'
|
||||||
require 'toml'
|
|
||||||
|
SafeYAML::OPTIONS[:suppress_warnings] = true
|
||||||
|
|
||||||
|
module Jekyll
|
||||||
|
|
||||||
# internal requires
|
# internal requires
|
||||||
require 'jekyll/version'
|
autoload :Cleaner, 'jekyll/cleaner'
|
||||||
require 'jekyll/utils'
|
autoload :Collection, 'jekyll/collection'
|
||||||
require 'jekyll/log_adapter'
|
autoload :Configuration, 'jekyll/configuration'
|
||||||
require 'jekyll/stevenson'
|
autoload :Convertible, 'jekyll/convertible'
|
||||||
require 'jekyll/deprecator'
|
autoload :Deprecator, 'jekyll/deprecator'
|
||||||
require 'jekyll/configuration'
|
autoload :Document, 'jekyll/document'
|
||||||
require 'jekyll/document'
|
autoload :Draft, 'jekyll/draft'
|
||||||
require 'jekyll/collection'
|
autoload :EntryFilter, 'jekyll/entry_filter'
|
||||||
require 'jekyll/plugin_manager'
|
autoload :Errors, 'jekyll/errors'
|
||||||
require 'jekyll/frontmatter_defaults'
|
autoload :Excerpt, 'jekyll/excerpt'
|
||||||
require 'jekyll/site'
|
autoload :Filters, 'jekyll/filters'
|
||||||
require 'jekyll/convertible'
|
autoload :FrontmatterDefaults, 'jekyll/frontmatter_defaults'
|
||||||
require 'jekyll/url'
|
autoload :Layout, 'jekyll/layout'
|
||||||
require 'jekyll/layout'
|
autoload :LayoutReader, 'jekyll/layout_reader'
|
||||||
require 'jekyll/page'
|
autoload :LogAdapter, 'jekyll/log_adapter'
|
||||||
require 'jekyll/post'
|
autoload :Page, 'jekyll/page'
|
||||||
require 'jekyll/excerpt'
|
autoload :PluginManager, 'jekyll/plugin_manager'
|
||||||
require 'jekyll/draft'
|
autoload :Post, 'jekyll/post'
|
||||||
require 'jekyll/filters'
|
autoload :Publisher, 'jekyll/publisher'
|
||||||
require 'jekyll/static_file'
|
autoload :RelatedPosts, 'jekyll/related_posts'
|
||||||
require 'jekyll/errors'
|
autoload :Renderer, 'jekyll/renderer'
|
||||||
require 'jekyll/related_posts'
|
autoload :Site, 'jekyll/site'
|
||||||
require 'jekyll/cleaner'
|
autoload :StaticFile, 'jekyll/static_file'
|
||||||
require 'jekyll/entry_filter'
|
autoload :Stevenson, 'jekyll/stevenson'
|
||||||
require 'jekyll/layout_reader'
|
autoload :URL, 'jekyll/url'
|
||||||
require 'jekyll/publisher'
|
autoload :Utils, 'jekyll/utils'
|
||||||
require 'jekyll/renderer'
|
autoload :VERSION, 'jekyll/version'
|
||||||
|
|
||||||
# extensions
|
# extensions
|
||||||
require 'jekyll/plugin'
|
require 'jekyll/plugin'
|
||||||
|
@ -65,22 +68,6 @@ require 'jekyll/generator'
|
||||||
require 'jekyll/command'
|
require 'jekyll/command'
|
||||||
require 'jekyll/liquid_extensions'
|
require 'jekyll/liquid_extensions'
|
||||||
|
|
||||||
require_all 'jekyll/commands'
|
|
||||||
require_all 'jekyll/converters'
|
|
||||||
require_all 'jekyll/converters/markdown'
|
|
||||||
require_all 'jekyll/generators'
|
|
||||||
require_all 'jekyll/tags'
|
|
||||||
|
|
||||||
# plugins
|
|
||||||
require 'jekyll-coffeescript'
|
|
||||||
require 'jekyll-sass-converter'
|
|
||||||
require 'jekyll-paginate'
|
|
||||||
require 'jekyll-gist'
|
|
||||||
|
|
||||||
SafeYAML::OPTIONS[:suppress_warnings] = true
|
|
||||||
|
|
||||||
module Jekyll
|
|
||||||
|
|
||||||
# Public: Tells you which Jekyll environment you are building in so you can skip tasks
|
# Public: Tells you which Jekyll environment you are building in so you can skip tasks
|
||||||
# if you need to. This is useful when doing expensive compression tasks on css and
|
# if you need to. This is useful when doing expensive compression tasks on css and
|
||||||
# images and allows you to skip that when working in development.
|
# images and allows you to skip that when working in development.
|
||||||
|
@ -143,3 +130,19 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require_all 'jekyll/commands'
|
||||||
|
require_all 'jekyll/converters'
|
||||||
|
require_all 'jekyll/converters/markdown'
|
||||||
|
require_all 'jekyll/generators'
|
||||||
|
require_all 'jekyll/tags'
|
||||||
|
|
||||||
|
# Eventually remove these for 3.0 as non-core
|
||||||
|
Jekyll::Deprecator.gracefully_require(%w[
|
||||||
|
classifier
|
||||||
|
toml
|
||||||
|
jekyll-paginate
|
||||||
|
jekyll-gist
|
||||||
|
jekyll-coffeescript
|
||||||
|
jekyll-sass-converter
|
||||||
|
])
|
||||||
|
|
|
@ -51,7 +51,7 @@ module Jekyll
|
||||||
# Returns nothing
|
# Returns nothing
|
||||||
def process_site(site)
|
def process_site(site)
|
||||||
site.process
|
site.process
|
||||||
rescue Jekyll::FatalException => e
|
rescue Jekyll::Errors::FatalException => e
|
||||||
Jekyll.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
|
Jekyll.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
|
||||||
Jekyll.logger.error "", "------------------------------------"
|
Jekyll.logger.error "", "------------------------------------"
|
||||||
Jekyll.logger.error "", e.message
|
Jekyll.logger.error "", e.message
|
||||||
|
|
|
@ -58,7 +58,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns nothing.
|
# Returns nothing.
|
||||||
def watch(site, options)
|
def watch(site, options)
|
||||||
require 'jekyll-watch'
|
Deprecator.gracefully_require 'jekyll-watch'
|
||||||
Jekyll::Commands::Watch.watch(site, options)
|
Jekyll::Commands::Watch.watch(site, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,32 @@ module Jekyll
|
||||||
self.class.const_get(@config['markdown']).new(@config)
|
self.class.const_get(@config['markdown']).new(@config)
|
||||||
else
|
else
|
||||||
Jekyll.logger.error "Invalid Markdown Processor:", "#{@config['markdown']}"
|
Jekyll.logger.error "Invalid Markdown Processor:", "#{@config['markdown']}"
|
||||||
Jekyll.logger.error "", "Valid options are [ maruku | rdiscount | kramdown | redcarpet ]"
|
Jekyll.logger.error "", "Valid options are [ #{valid_processors.join(" | ")} ]"
|
||||||
raise FatalException, "Invalid Markdown Processor: #{@config['markdown']}"
|
raise Errors::FatalException, "Invalid Markdown Processor: #{@config['markdown']}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@setup = true
|
@setup = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def valid_processors
|
||||||
|
%w[
|
||||||
|
maruku
|
||||||
|
rdiscount
|
||||||
|
kramdown
|
||||||
|
redcarpet
|
||||||
|
] + third_party_processors
|
||||||
|
end
|
||||||
|
|
||||||
|
def third_party_processors
|
||||||
|
self.class.constants - %w[
|
||||||
|
KramdownParser
|
||||||
|
MarukuParser
|
||||||
|
RDiscountParser
|
||||||
|
RedcarpetParser
|
||||||
|
PRIORITIES
|
||||||
|
].map(&:to_sym)
|
||||||
|
end
|
||||||
|
|
||||||
def matches(ext)
|
def matches(ext)
|
||||||
rgx = '^\.(' + @config['markdown_ext'].gsub(',','|') +')$'
|
rgx = '^\.(' + @config['markdown_ext'].gsub(',','|') +')$'
|
||||||
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
|
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
|
||||||
|
|
|
@ -8,7 +8,7 @@ module Jekyll
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
||||||
STDERR.puts ' $ [sudo] gem install kramdown'
|
STDERR.puts ' $ [sudo] gem install kramdown'
|
||||||
raise FatalException.new("Missing dependency: kramdown")
|
raise Errors::FatalException.new("Missing dependency: kramdown")
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert(content)
|
def convert(content)
|
||||||
|
|
|
@ -15,7 +15,7 @@ module Jekyll
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
||||||
STDERR.puts ' $ [sudo] gem install maruku'
|
STDERR.puts ' $ [sudo] gem install maruku'
|
||||||
raise FatalException.new("Missing dependency: maruku")
|
raise Errors::FatalException.new("Missing dependency: maruku")
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_divs_library
|
def load_divs_library
|
||||||
|
|
|
@ -3,13 +3,9 @@ module Jekyll
|
||||||
class Markdown
|
class Markdown
|
||||||
class RDiscountParser
|
class RDiscountParser
|
||||||
def initialize(config)
|
def initialize(config)
|
||||||
require 'rdiscount'
|
Jekyll::Deprecator.gracefully_require "rdiscount"
|
||||||
@config = config
|
@config = config
|
||||||
@rdiscount_extensions = @config['rdiscount']['extensions'].map { |e| e.to_sym }
|
@rdiscount_extensions = @config['rdiscount']['extensions'].map { |e| e.to_sym }
|
||||||
rescue LoadError
|
|
||||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
|
||||||
STDERR.puts ' $ [sudo] gem install rdiscount'
|
|
||||||
raise FatalException.new("Missing dependency: rdiscount")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert(content)
|
def convert(content)
|
||||||
|
|
|
@ -14,7 +14,7 @@ module Jekyll
|
||||||
module WithPygments
|
module WithPygments
|
||||||
include CommonMethods
|
include CommonMethods
|
||||||
def block_code(code, lang)
|
def block_code(code, lang)
|
||||||
require 'pygments'
|
Jekyll::Deprecator.gracefully_require("pygments")
|
||||||
lang = lang && lang.split.first || "text"
|
lang = lang && lang.split.first || "text"
|
||||||
add_code_tags(
|
add_code_tags(
|
||||||
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
|
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
|
||||||
|
@ -55,27 +55,26 @@ module Jekyll
|
||||||
|
|
||||||
|
|
||||||
def initialize(config)
|
def initialize(config)
|
||||||
require 'redcarpet'
|
Deprecator.gracefully_require("redcarpet")
|
||||||
@config = config
|
@config = config
|
||||||
@redcarpet_extensions = {}
|
@redcarpet_extensions = {}
|
||||||
@config['redcarpet']['extensions'].each { |e| @redcarpet_extensions[e.to_sym] = true }
|
@config['redcarpet']['extensions'].each { |e| @redcarpet_extensions[e.to_sym] = true }
|
||||||
|
|
||||||
@renderer ||= case @config['highlighter']
|
@renderer ||= class_with_proper_highlighter(@config['highlighter'])
|
||||||
when 'pygments'
|
end
|
||||||
|
|
||||||
|
def class_with_proper_highlighter(highlighter)
|
||||||
|
case highlighter
|
||||||
|
when "pygments"
|
||||||
Class.new(Redcarpet::Render::HTML) do
|
Class.new(Redcarpet::Render::HTML) do
|
||||||
include WithPygments
|
include WithPygments
|
||||||
end
|
end
|
||||||
when 'rouge'
|
when "rouge"
|
||||||
Class.new(Redcarpet::Render::HTML) do
|
Class.new(Redcarpet::Render::HTML) do
|
||||||
begin
|
Jekyll::Deprecator.gracefully_require(%w[
|
||||||
require 'rouge'
|
rouge
|
||||||
require 'rouge/plugins/redcarpet'
|
rouge/plugins/redcarpet
|
||||||
rescue LoadError => e
|
])
|
||||||
Jekyll.logger.error "You are missing the 'rouge' gem. Please run:"
|
|
||||||
Jekyll.logger.error " $ [sudo] gem install rouge"
|
|
||||||
Jekyll.logger.error "Or add 'rouge' to your Gemfile."
|
|
||||||
raise FatalException.new("Missing dependency: rouge")
|
|
||||||
end
|
|
||||||
|
|
||||||
if Rouge.version < '1.3.0'
|
if Rouge.version < '1.3.0'
|
||||||
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
||||||
|
@ -90,10 +89,6 @@ module Jekyll
|
||||||
include WithoutHighlighting
|
include WithoutHighlighting
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue LoadError
|
|
||||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
|
||||||
STDERR.puts ' $ [sudo] gem install redcarpet'
|
|
||||||
raise FatalException.new("Missing dependency: redcarpet")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert(content)
|
def convert(content)
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Jekyll
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
STDERR.puts 'You are missing a library required for Textile. Please run:'
|
STDERR.puts 'You are missing a library required for Textile. Please run:'
|
||||||
STDERR.puts ' $ [sudo] gem install RedCloth'
|
STDERR.puts ' $ [sudo] gem install RedCloth'
|
||||||
raise FatalException.new("Missing dependency: RedCloth")
|
raise Errors::FatalException.new("Missing dependency: RedCloth")
|
||||||
end
|
end
|
||||||
|
|
||||||
def matches(ext)
|
def matches(ext)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Deprecator
|
module Deprecator
|
||||||
def self.process(args)
|
def self.process(args)
|
||||||
no_subcommand(args)
|
no_subcommand(args)
|
||||||
arg_is_present? args, "--server", "The --server command has been replaced by the \
|
arg_is_present? args, "--server", "The --server command has been replaced by the \
|
||||||
|
@ -32,5 +32,23 @@ module Jekyll
|
||||||
def self.deprecation_message(message)
|
def self.deprecation_message(message)
|
||||||
Jekyll.logger.error "Deprecation:", message
|
Jekyll.logger.error "Deprecation:", message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.gracefully_require(gem_name)
|
||||||
|
Array(gem_name).each do |name|
|
||||||
|
begin
|
||||||
|
require name
|
||||||
|
rescue LoadError => e
|
||||||
|
Jekyll.logger.error "Dependency Error:", <<-MSG
|
||||||
|
Yikes! It looks like you don't have #{name} or one of its dependencies installed.
|
||||||
|
In order to use Jekyll as currently contfigured, you'll need to install this gem.
|
||||||
|
|
||||||
|
The full error message from Ruby is: '#{e.message}'
|
||||||
|
|
||||||
|
If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
|
||||||
|
MSG
|
||||||
|
raise Errors::MissingDependencyException.new(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class FatalException < StandardError
|
module Errors
|
||||||
|
class FatalException < RuntimeError
|
||||||
|
end
|
||||||
|
|
||||||
|
class MissingDependencyException < FatalException
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
require 'jekyll/convertible'
|
|
||||||
require 'forwardable'
|
require 'forwardable'
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Configuration
|
|
||||||
# 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)
|
||||||
# and the data available to liquid.
|
# and the data available to liquid.
|
||||||
|
@ -145,4 +144,3 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ module Jekyll
|
||||||
path = File.join(@dir || "", name)
|
path = File.join(@dir || "", name)
|
||||||
msg = "Post '#{path}' does not have a valid date.\n"
|
msg = "Post '#{path}' does not have a valid date.\n"
|
||||||
msg << "Fix the date, or exclude the file or directory from being processed"
|
msg << "Fix the date, or exclude the file or directory from being processed"
|
||||||
raise FatalException.new(msg)
|
raise Errors::FatalException.new(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
# The generated directory into which the post will be placed
|
# The generated directory into which the post will be placed
|
||||||
|
|
|
@ -80,7 +80,7 @@ module Jekyll
|
||||||
dest_pathname = Pathname.new(dest)
|
dest_pathname = Pathname.new(dest)
|
||||||
Pathname.new(source).ascend do |path|
|
Pathname.new(source).ascend do |path|
|
||||||
if path == dest_pathname
|
if path == dest_pathname
|
||||||
raise FatalException.new "Destination directory cannot be or contain the Source directory."
|
raise Errors::FatalException.new "Destination directory cannot be or contain the Source directory."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -443,7 +443,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def frontmatter_defaults
|
def frontmatter_defaults
|
||||||
@frontmatter_defaults ||= Configuration::FrontmatterDefaults.new(self)
|
@frontmatter_defaults ||= FrontmatterDefaults.new(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -44,7 +44,7 @@ class TestCommand < Test::Unit::TestCase
|
||||||
context "when fatal error occurs" do
|
context "when fatal error occurs" do
|
||||||
should "exit with non-zero error code" do
|
should "exit with non-zero error code" do
|
||||||
site = Object.new
|
site = Object.new
|
||||||
stub(site).process { raise Jekyll::FatalException }
|
stub(site).process { raise Jekyll::Errors::FatalException }
|
||||||
error = assert_raise(SystemExit) { Command.process_site(site) }
|
error = assert_raise(SystemExit) { Command.process_site(site) }
|
||||||
assert_not_equal 0, error.status
|
assert_not_equal 0, error.status
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,7 +83,7 @@ class TestPost < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "raise a good error on invalid post date" do
|
should "raise a good error on invalid post date" do
|
||||||
assert_raise Jekyll::FatalException do
|
assert_raise Jekyll::Errors::FatalException do
|
||||||
@post.process("2009-27-03-foo-bar.textile")
|
@post.process("2009-27-03-foo-bar.textile")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -225,7 +225,7 @@ class TestSite < Test::Unit::TestCase
|
||||||
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => source_dir})
|
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => source_dir})
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_raise Jekyll::FatalException do
|
assert_raise Jekyll::Errors::FatalException do
|
||||||
site = Site.new(Jekyll.configuration)
|
site = Site.new(Jekyll.configuration)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -235,7 +235,7 @@ class TestSite < Test::Unit::TestCase
|
||||||
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => File.join(source_dir, "..")})
|
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => File.join(source_dir, "..")})
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_raise Jekyll::FatalException do
|
assert_raise Jekyll::Errors::FatalException do
|
||||||
site = Site.new(Jekyll.configuration)
|
site = Site.new(Jekyll.configuration)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -332,7 +332,7 @@ class TestSite < Test::Unit::TestCase
|
||||||
|
|
||||||
bad_processor = "Custom::Markdown"
|
bad_processor = "Custom::Markdown"
|
||||||
s = Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
|
s = Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
|
||||||
assert_raise Jekyll::FatalException do
|
assert_raise Jekyll::Errors::FatalException do
|
||||||
s.process
|
s.process
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ class TestSite < Test::Unit::TestCase
|
||||||
should 'throw FatalException at process time' do
|
should 'throw FatalException at process time' do
|
||||||
bad_processor = 'not a processor name'
|
bad_processor = 'not a processor name'
|
||||||
s = Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
|
s = Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
|
||||||
assert_raise Jekyll::FatalException do
|
assert_raise Jekyll::Errors::FatalException do
|
||||||
s.process
|
s.process
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue