a file to check the gem build
This commit is contained in:
parent
3da20217fd
commit
292ac5b3d5
1 changed files with 20 additions and 0 deletions
20
github_gemtest.rb
Normal file
20
github_gemtest.rb
Normal 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"
|
Loading…
Reference in a new issue