parent
b0a7f9c8c9
commit
8ee1b2a1fd
|
@ -17,7 +17,7 @@ module Jekyll
|
||||||
def conscientious_require
|
def conscientious_require
|
||||||
require_plugin_files
|
require_plugin_files
|
||||||
require_gems
|
require_gems
|
||||||
self.require_from_bundler
|
self.class.require_from_bundler
|
||||||
end
|
end
|
||||||
|
|
||||||
# Require each of the gem plugins specified.
|
# Require each of the gem plugins specified.
|
||||||
|
@ -33,9 +33,9 @@ module Jekyll
|
||||||
|
|
||||||
def self.require_from_bundler
|
def self.require_from_bundler
|
||||||
unless ENV["JEKYLL_NO_BUNDLER_REQUIRE"]
|
unless ENV["JEKYLL_NO_BUNDLER_REQUIRE"]
|
||||||
require "bundler/setup"
|
require "bundler"
|
||||||
Bundler.require(:jekyll_plugins)
|
Bundler.require(:jekyll_plugins)
|
||||||
ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = true
|
ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = "true"
|
||||||
end
|
end
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
false
|
false
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
require 'helper'
|
||||||
|
|
||||||
|
class TestPluginManager < Test::Unit::TestCase
|
||||||
|
def test_requiring_from_bundler
|
||||||
|
Jekyll::PluginManager.require_from_bundler
|
||||||
|
assert ENV["JEKYLL_NO_BUNDLER_REQUIRE"], 'Gemfile plugins were not required.'
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue