1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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

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