Class: Gem::Specification

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

Overview

Overrides for cross packaging, which Rubygems 0.9.5 doesn’t do

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



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

alias :old_validate :validate

#validateObject



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

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