The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Gem Platform Matching

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
Gem Platform Matching Posted: Aug 25, 2007 2:50 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: Gem Platform Matching
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

RubyGems now figures out if your platform matches they gem you want to install, and here’s how it does it.

First, the platform is compared to the list of legacy platforms. These are the platform strings that currently exist in the gems.rubyforge.org index. If the platform matches one of these it is expanded into an Array of CPU, OS and OS version. (New platforms are already an Array.)

Next the platform is compared with your RubyGems configured platforms (“ruby” and your OS platform by default) to see if any match. A platform’s CPU will match if it matches the local platform’s CPU exactly or if either side is ‘universal’. The OS must match exactly. Either OS version can be nil, or it must match exactly.

A potential improvement to the platform matching would be to upgrade a platform to a real object from an Array and make the OS version a Gem::Version and encode in each OS’ versioning scheme. I don’t think there is much benefit to that at present since most gems with platforms are for win32 which doesn’t have versions in Config::CONFIG[‘arch’].

Read: Gem Platform Matching

Topic: Testing, Web 2.0 Entrepreneurship, and Karma Previous Topic   Next Topic Topic: Ruby Ternary operator re-written with Boolean operators

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use