parent
							
								
									b0a7f9c8c9
								
							
						
					
					
						commit
						8ee1b2a1fd
					
				| 
						 | 
				
			
			@ -31,4 +31,4 @@ Feature: Configuring and using plugins
 | 
			
		|||
    Then the _site directory should exist
 | 
			
		||||
    And I should see "Whatever" in "_site/index.html"
 | 
			
		||||
    And the "_site/test.txt" file should exist
 | 
			
		||||
    And I should see "this is a test" in "_site/test.txt"
 | 
			
		||||
    And I should see "this is a test" in "_site/test.txt"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ module Jekyll
 | 
			
		|||
    def conscientious_require
 | 
			
		||||
      require_plugin_files
 | 
			
		||||
      require_gems
 | 
			
		||||
      self.require_from_bundler
 | 
			
		||||
      self.class.require_from_bundler
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Require each of the gem plugins specified.
 | 
			
		||||
| 
						 | 
				
			
			@ -33,9 +33,9 @@ module Jekyll
 | 
			
		|||
 | 
			
		||||
    def self.require_from_bundler
 | 
			
		||||
      unless ENV["JEKYLL_NO_BUNDLER_REQUIRE"]
 | 
			
		||||
        require "bundler/setup"
 | 
			
		||||
        require "bundler"
 | 
			
		||||
        Bundler.require(:jekyll_plugins)
 | 
			
		||||
        ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = true
 | 
			
		||||
        ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = "true"
 | 
			
		||||
      end
 | 
			
		||||
    rescue LoadError
 | 
			
		||||
      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