read gemspec in simulated github environment

This commit is contained in:
Ryan Tomayko 2008-08-31 03:29:14 -07:00
parent be5a174158
commit 066345135e
1 changed files with 8 additions and 1 deletions

View File

@ -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='')