Move previous runtime dependencies to development dependencies.
This commit is contained in:
parent
057b8cae7f
commit
65d43ef398
9
Gemfile
9
Gemfile
|
@ -1,6 +1,14 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
|
gem 'pygments.rb', '~> 0.6.0'
|
||||||
|
gem 'redcarpet', '~> 3.1'
|
||||||
|
gem 'toml', '~> 0.1.0'
|
||||||
|
gem 'jekyll-paginate', '~> 1.0'
|
||||||
|
gem 'jekyll-gist', '~> 1.0'
|
||||||
|
gem 'jekyll-coffeescript', '~> 1.0'
|
||||||
|
gem 'classifier-reborn', '~> 2.0'
|
||||||
|
|
||||||
gem 'rake', '~> 10.1'
|
gem 'rake', '~> 10.1'
|
||||||
gem 'rdoc', '~> 3.11'
|
gem 'rdoc', '~> 3.11'
|
||||||
gem 'redgreen', '~> 1.2'
|
gem 'redgreen', '~> 1.2'
|
||||||
|
@ -16,7 +24,6 @@ gem 'mime-types', '~> 1.5'
|
||||||
gem 'activesupport', '~> 3.2.13'
|
gem 'activesupport', '~> 3.2.13'
|
||||||
gem 'jekyll_test_plugin'
|
gem 'jekyll_test_plugin'
|
||||||
gem 'jekyll_test_plugin_malicious'
|
gem 'jekyll_test_plugin_malicious'
|
||||||
gem 'rouge', '~> 1.7'
|
|
||||||
gem 'liquid-c', '~> 0.0.3'
|
gem 'liquid-c', '~> 0.0.3'
|
||||||
gem 'minitest' if RUBY_PLATFORM =~ /cygwin/
|
gem 'minitest' if RUBY_PLATFORM =~ /cygwin/
|
||||||
gem 'test-unit' if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
|
gem 'test-unit' if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
|
||||||
|
|
|
@ -33,16 +33,7 @@ Gem::Specification.new do |s|
|
||||||
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('redcarpet', '~> 3.1')
|
|
||||||
s.add_runtime_dependency('toml', '~> 0.1.0')
|
|
||||||
s.add_runtime_dependency('jekyll-paginate', '~> 1.0')
|
|
||||||
s.add_runtime_dependency('jekyll-gist', '~> 1.0')
|
|
||||||
s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0')
|
|
||||||
s.add_runtime_dependency('rouge', '~> 1.7')
|
s.add_runtime_dependency('rouge', '~> 1.7')
|
||||||
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
|
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
|
||||||
s.add_runtime_dependency('jekyll-watch', '~> 1.1')
|
s.add_runtime_dependency('jekyll-watch', '~> 1.1')
|
||||||
s.add_runtime_dependency('classifier-reborn', '~> 2.0')
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -169,11 +169,4 @@ require_all 'jekyll/converters/markdown'
|
||||||
require_all 'jekyll/generators'
|
require_all 'jekyll/generators'
|
||||||
require_all 'jekyll/tags'
|
require_all 'jekyll/tags'
|
||||||
|
|
||||||
# Eventually remove these for 3.0 as non-core
|
require 'jekyll-sass-converter'
|
||||||
Jekyll::External.require_with_graceful_fail(%w[
|
|
||||||
toml
|
|
||||||
jekyll-paginate
|
|
||||||
jekyll-gist
|
|
||||||
jekyll-coffeescript
|
|
||||||
jekyll-sass-converter
|
|
||||||
])
|
|
||||||
|
|
|
@ -115,6 +115,7 @@ module Jekyll
|
||||||
def safe_load_file(filename)
|
def safe_load_file(filename)
|
||||||
case File.extname(filename)
|
case File.extname(filename)
|
||||||
when /\.toml/i
|
when /\.toml/i
|
||||||
|
Jekyll::External.require_with_graceful_fail('toml') unless defined?(TOML)
|
||||||
TOML.load_file(filename)
|
TOML.load_file(filename)
|
||||||
when /\.ya?ml/i
|
when /\.ya?ml/i
|
||||||
SafeYAML.load_file(filename)
|
SafeYAML.load_file(filename)
|
||||||
|
|
|
@ -10,7 +10,7 @@ module Jekyll
|
||||||
def initialize(post)
|
def initialize(post)
|
||||||
@post = post
|
@post = post
|
||||||
@site = post.site
|
@site = post.site
|
||||||
require 'classifier-reborn' if site.lsi
|
Jekyll::External.require_with_graceful_fail('classifier-reborn') if site.lsi
|
||||||
end
|
end
|
||||||
|
|
||||||
def build
|
def build
|
||||||
|
|
|
@ -75,7 +75,7 @@ eos
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_pygments(code, is_safe)
|
def render_pygments(code, is_safe)
|
||||||
Jekyll::External.require_with_graceful_fail 'pygments'
|
Jekyll::External.require_with_graceful_fail('pygments')
|
||||||
|
|
||||||
@options[:encoding] = 'utf-8'
|
@options[:encoding] = 'utf-8'
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ eos
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_rouge(code)
|
def render_rouge(code)
|
||||||
Jekyll::External.require_with_graceful_fail 'rouge'
|
Jekyll::External.require_with_graceful_fail('rouge')
|
||||||
formatter = Rouge::Formatters::HTML.new(line_numbers: @options[:linenos], wrap: false)
|
formatter = Rouge::Formatters::HTML.new(line_numbers: @options[:linenos], wrap: false)
|
||||||
lexer = Rouge::Lexer.find_fancy(@lang, code) || Rouge::Lexers::PlainText
|
lexer = Rouge::Lexer.find_fancy(@lang, code) || Rouge::Lexers::PlainText
|
||||||
code = formatter.format(lexer.lex(code))
|
code = formatter.format(lexer.lex(code))
|
||||||
|
|
|
@ -490,7 +490,7 @@ gems: []
|
||||||
|
|
||||||
# Conversion
|
# Conversion
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
highlighter: pygments
|
highlighter: rouge
|
||||||
lsi: false
|
lsi: false
|
||||||
excerpt_separator: "\n\n"
|
excerpt_separator: "\n\n"
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ require 'helper'
|
||||||
class TestCoffeeScript < Test::Unit::TestCase
|
class TestCoffeeScript < Test::Unit::TestCase
|
||||||
context "converting CoffeeScript" do
|
context "converting CoffeeScript" do
|
||||||
setup do
|
setup do
|
||||||
|
External.require_with_graceful_fail('jekyll-coffeescript')
|
||||||
@site = fixture_site
|
@site = fixture_site
|
||||||
@site.process
|
@site.process
|
||||||
@test_coffeescript_file = dest_dir("js/coffeescript.js")
|
@test_coffeescript_file = dest_dir("js/coffeescript.js")
|
||||||
|
|
|
@ -181,6 +181,8 @@ class TestConfiguration < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "load multiple config files" do
|
should "load multiple config files" do
|
||||||
|
External.require_with_graceful_fail('toml')
|
||||||
|
|
||||||
mock(SafeYAML).load_file(@paths[:default]) { Hash.new }
|
mock(SafeYAML).load_file(@paths[:default]) { Hash.new }
|
||||||
mock(SafeYAML).load_file(@paths[:other]) { Hash.new }
|
mock(SafeYAML).load_file(@paths[:other]) { Hash.new }
|
||||||
mock(TOML).load_file(@paths[:toml]) { Hash.new }
|
mock(TOML).load_file(@paths[:toml]) { Hash.new }
|
||||||
|
|
Loading…
Reference in New Issue