diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-09 21:38:59 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-09 21:38:59 +0000 |
commit | 31c94ffeb5f09d09ac2c86fc9e6614e38251a43d (patch) | |
tree | 10e44506238c7af3d7c9d822111996731726e38d /lib/gauntlet_rubygems.rb | |
parent | a6afbaeb3be396c0fdea3b9077d9256c59edcfca (diff) | |
download | ruby-31c94ffeb5f09d09ac2c86fc9e6614e38251a43d.tar.gz |
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/gauntlet_rubygems.rb')
-rw-r--r-- | lib/gauntlet_rubygems.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/gauntlet_rubygems.rb b/lib/gauntlet_rubygems.rb new file mode 100644 index 0000000000..f6c4827129 --- /dev/null +++ b/lib/gauntlet_rubygems.rb @@ -0,0 +1,50 @@ +require 'rubygems' +require 'gauntlet' + +## +# GemGauntlet validates all current gems. Currently these packages are +# borked: +# +# Asami-0.04 : No such file or directory - bin/Asami.rb +# ObjectGraph-1.0.1 : No such file or directory - bin/objectgraph +# evil-ruby-0.1.0 : authors must be Array of Strings +# fresh_cookies-1.0.0 : authors must be Array of Strings +# plugems_deploy-0.2.0 : authors must be Array of Strings +# pmsrb-0.2.0 : authors must be Array of Strings +# pqa-1.6 : authors must be Array of Strings +# rant-0.5.7 : authors must be Array of Strings +# rvsh-0.4.5 : No such file or directory - bin/rvsh +# xen-0.1.2.1 : authors must be Array of Strings + +class GemGauntlet < Gauntlet + def run(name) + warn name + + spec = begin + Gem::Specification.load 'gemspec' + rescue SyntaxError + Gem::Specification.from_yaml File.read('gemspec') + end + spec.validate + + self.data[name] = false + self.dirty = true + rescue SystemCallError, Gem::InvalidSpecificationException => e + self.data[name] = e.message + self.dirty = true + end + + def should_skip?(name) + self.data[name] == false + end + + def report + self.data.sort.reject { |k,v| !v }.each do |k,v| + puts "%-21s: %s" % [k, v] + end + end +end + +gauntlet = GemGauntlet.new +gauntlet.run_the_gauntlet ARGV.shift +gauntlet.report |