Class: Gem::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/echoe/platform.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



39
# File 'lib/echoe/platform.rb', line 39

alias :old_validate :validate

#validateObject



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/echoe/platform.rb', line 43

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