a file to check the gem build

This commit is contained in:
Chris Anderson 2008-11-26 13:42:27 -08:00
parent 3da20217fd
commit 292ac5b3d5

20
github_gemtest.rb Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env ruby
require 'yaml'
if ARGV.size < 1
puts "Usage: github-test.rb my-project.gemspec"
exit
end
require 'rubygems/specification'
data = File.read(ARGV[0])
spec = nil
if data !~ %r{!ruby/object:Gem::Specification}
Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
else
spec = YAML.load(data)
end
puts spec
puts "OK"