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

Version Path
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.6/lib/echoe/rubygems.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.5/lib/echoe/rubygems.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.3/lib/echoe/rubygems.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.0/lib/echoe/rubygems.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.5/lib/echoe/rubygems.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.3/lib/echoe/rubygems.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.6/lib/echoe/rubygems.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.0/lib/echoe/rubygems.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.6/lib/echoe/rubygems.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.5/lib/echoe/rubygems.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.0/lib/echoe/rubygems.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/echoe-4.6.3/lib/echoe/rubygems.rb
ric-0.13.0 vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/lib/echoe/rubygems.rb
ric-0.12.2 vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/lib/echoe/rubygems.rb
elliottcable-echoe-3.1.1 lib/echoe/rubygems.rb
elliottcable-echoe-3.1.2 lib/echoe/rubygems.rb
elliottcable-echoe-3.1.3 lib/echoe/rubygems.rb
fauna-echoe-3.2 lib/echoe/rubygems.rb
echoe-4.6.6 lib/echoe/rubygems.rb
echoe-4.6.5 lib/echoe/rubygems.rb