Sha256: 71c33ce7258fa5a346d4dc5e35ffb11f3354b7799c1095b743dee78d093a608a
Contents?: true
Size: 1.06 KB
Versions: 42
Compression:
Stored size: 1.06 KB
Contents
### Overrides for cross packaging, which Rubygems 0.9.5 doesn't do module Gem class Specification alias :old_validate :validate PLATFORM_CROSS_TARGETS = ["aix", "cygwin", "darwin", "freebsd", "hpux", "java", "linux", "mingw", "mswin", "netbsdelf", "openbsd", "solaris", "_platform", "jruby"] 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 end end ### Some runtime Echoe hacks $platform = "ruby" # or Gem::PLATFORM::RUBY maybe def reset_target target #:nodoc: $platform = target Object.send(:remove_const, "RUBY_PLATFORM") Object.send(:const_set, "RUBY_PLATFORM", target) end if target = ARGV.detect do |arg| # Hack to get the platform set before the Rakefile evaluates Gem::Specification::PLATFORM_CROSS_TARGETS.include? arg end reset_target target end
Version data entries
42 entries across 33 versions & 5 rubygems