Class: Gem::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/echoe/rubygems.rb

Constant Summary collapse

PLATFORM_CROSS_TARGETS =
["aix", "cygwin", "darwin", "freebsd", "hpux", "java", "linux", "mingw", "mswin", "netbsdelf", "openbsd", "solaris", "_platform", "jruby"]

Instance Method Summary collapse

Instance Method Details

#old_validateObject



6
# File 'lib/echoe/rubygems.rb', line 6

alias :old_validate :validate

#validateObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/echoe/rubygems.rb', line 10

def validate
  begin
    old_validate
  rescue Gem::InvalidSpecificationException
    if platform =~ /(#{PLATFORM_CROSS_TARGETS.join("|")})/i
      true
    else
      raise Gem::InvalidSpecificationException, "Unknown package target \"#{platform}\"."
    end
  end
end