Don't check for rubygems version at runtime since we check at installation

This commit is contained in:
Joe Winter 2012-02-07 22:07:19 -05:00
parent 2bc2871a6c
commit 2753b6f9de

View File

@ -4,6 +4,7 @@ require 'multi_json'
require 'set' require 'set'
require 'sprockets' require 'sprockets'
require 'sprockets/engines' require 'sprockets/engines'
require 'rubygems'
module Jasmine::Headless module Jasmine::Headless
class FilesList class FilesList
@ -13,10 +14,6 @@ module Jasmine::Headless
def asset_paths def asset_paths
return @asset_paths if @asset_paths return @asset_paths if @asset_paths
require 'rubygems'
raise StandardError.new("A newer version of Rubygems is required to use vendored assets. Please upgrade.") if !Gem::Specification.respond_to?(:each)
@asset_paths = [] @asset_paths = []
Gem::Specification.each { |gemspec| @asset_paths += get_paths_from_gemspec(gemspec) } Gem::Specification.each { |gemspec| @asset_paths += get_paths_from_gemspec(gemspec) }