From 2bc2871a6c9f9ed83a5ad6dfbae9e722e6be79a4 Mon Sep 17 00:00:00 2001 From: Joe Winter Date: Tue, 7 Feb 2012 22:03:47 -0500 Subject: [PATCH 1/2] Set a minimum rubygems version (1.8.0 adds Specification#each) --- jasmine-headless-webkit.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/jasmine-headless-webkit.gemspec b/jasmine-headless-webkit.gemspec index 56d70af..72077d4 100644 --- a/jasmine-headless-webkit.gemspec +++ b/jasmine-headless-webkit.gemspec @@ -19,6 +19,7 @@ Gem::Specification.new do |s| s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] + s.required_rubygems_version = ">= 1.8.0" s.add_runtime_dependency 'jasmine-core', '~> 1.1' s.add_runtime_dependency 'coffee-script' -- 2.45.2 From 2753b6f9de518fd74d2ba10dc18ae04cb693d176 Mon Sep 17 00:00:00 2001 From: Joe Winter Date: Tue, 7 Feb 2012 22:07:19 -0500 Subject: [PATCH 2/2] Don't check for rubygems version at runtime since we check at installation --- lib/jasmine/headless/files_list.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/jasmine/headless/files_list.rb b/lib/jasmine/headless/files_list.rb index caac47f..31be62c 100644 --- a/lib/jasmine/headless/files_list.rb +++ b/lib/jasmine/headless/files_list.rb @@ -4,6 +4,7 @@ require 'multi_json' require 'set' require 'sprockets' require 'sprockets/engines' +require 'rubygems' module Jasmine::Headless class FilesList @@ -13,10 +14,6 @@ module Jasmine::Headless def 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 = [] Gem::Specification.each { |gemspec| @asset_paths += get_paths_from_gemspec(gemspec) } -- 2.45.2