Sha256: 50598eadc08c70b59f7f500bbe1a13a17d8a7ac0db7f24f9715fa072dec23bfa

Contents?: true

Size: 1.39 KB

Versions: 19

Compression:

Stored size: 1.39 KB

Contents

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 # :nodoc:
  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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rubygems-update-2.5.1 lib/gauntlet_rubygems.rb
rubygems-update-2.5.0 lib/gauntlet_rubygems.rb
rubygems-update-2.2.5 lib/gauntlet_rubygems.rb
rubygems-update-2.4.8 lib/gauntlet_rubygems.rb
rubygems-update-2.2.4 lib/gauntlet_rubygems.rb
rubygems-update-2.4.7 lib/gauntlet_rubygems.rb
rubygems-update-2.4.6 lib/gauntlet_rubygems.rb
rubygems-update-2.2.3 lib/gauntlet_rubygems.rb
rubygems-update-2.4.5 lib/gauntlet_rubygems.rb
rubygems-update-2.4.4 lib/gauntlet_rubygems.rb
rubygems-update-2.4.3 lib/gauntlet_rubygems.rb
rubygems-update-2.4.2 lib/gauntlet_rubygems.rb
rubygems-update-2.4.1 lib/gauntlet_rubygems.rb
rubygems-update-2.4.0 lib/gauntlet_rubygems.rb
rubygems-update-2.3.0 lib/gauntlet_rubygems.rb
rubygems-update-2.2.2 lib/gauntlet_rubygems.rb
rubygems-update-2.2.1 lib/gauntlet_rubygems.rb
rubygems-update-2.2.0 lib/gauntlet_rubygems.rb
rubygems-update-2.2.0.rc.1 lib/gauntlet_rubygems.rb