From 066345135e1d5f6f010f3463c1f72cea1bdb0f96 Mon Sep 17 00:00:00 2001 From: Ryan Tomayko Date: Sun, 31 Aug 2008 03:29:14 -0700 Subject: [PATCH] read gemspec in simulated github environment --- Rakefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 8eaf0e19..f1ffc8ed 100644 --- a/Rakefile +++ b/Rakefile @@ -17,9 +17,16 @@ end # PACKAGING ============================================================ +# Load the gemspec using the same limitations as github def spec @spec ||= - eval(File.read('sinatra.gemspec')) + begin + require 'rubygems/specification' + data = File.read('sinatra.gemspec') + spec = nil + Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join + spec + end end def package(ext='')