mattetti / couchrest forked from jchris/couchrest

A RESTful CouchDB client based on Heroku's RestClient and Couch.js

This URL has Read+Write access

Tapajós (author)
Sun Nov 01 04:47:48 -0800 2009
commit  40bef6cafb9769652c1b19e4964fe1246abf663a
tree    78e71c6851bf7205a6d159fedcfe272ef74fd747
parent  ca2faa81fe166a0391b4724acf5cee1d359fe266
couchrest / github_gemtest.rb
100644 20 lines (16 sloc) 0.343 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"