pjhyett (owner)

Fork Of

Forks

Revisions

gist: 16215 Download_button fork
public
Description:
Simulation script for building a gem on GitHub
Public Clone URL: git://gist.github.com/16215.git
github-test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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
 
spec.validate
 
puts spec
puts "OK"