Skip to content

Verifies whether your Ruby 1.8 gems are compatible with Ruby 1.9 based on entries from http://isitruby19.com

Notifications You must be signed in to change notification settings

n3bulous/amiruby19

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Am I Ruby 1.9?

Description

So you want to move to Ruby 1.9 but you need your gems? Thanks to the folks at Brightbox we have Is it Ruby 1.9 and an API.

Building off the API announcement, conveniently released a few days before I needed it, I created Am I Ruby 1.9 to quickly determine how close your installed gems are to being ready.

The highly classified algorithm is listed below. The sum is merely the number of works_for_me true responses for the gem. Only the five most recent responses are considered.

rate = sum / recent.size.to_f
ratio = "#{sum} / #{recent.size}"

if rate >= 0.80
  works[gem_name] = ratio
elsif rate >= 0.40
  may_work[gem_name] = ratio
else
  fails[gem_name] = ratio
end

Please note that this doesn’t guarantee any gem will or will not work. It merely tries to guesstimate based on what other people have reported. Better ideas will be merged!

Another fine gem created with the help of simple-gem. Your definition of fine may differ, but simple-gem is pretty good and simple.

Be Nice

I have no idea what Is it Ruby 1.9 is using for hosting, but don’t overdo it if only to be nice to their servers.

Requirements

Am I Ruby 1.9 is “tested” with Ruby 1.8.67, and requires the following gem:

  • json

Installation

gem install n3bulous-amiruby19

Usage

Right now, you just run amiruby19 with no arguments. After some amount of time directly proportional to the number of gems installed, you will see five different sections of output:

  • WORKS – 80% or more responses are positive.
  • MAY WORK – 40% or more of responses are positive
  • FAILS – Less than 40% of responses are positive.
  • UNTESTED – No responses are recorded for these gems.
  • MISSING – The gem is not known on Is It Ruby 1.9.

Example Output

Your output will look different, and this lists only the first 11 gems I have installed. This output will allow you “gem19 install” with some cut and paste to test the results.

WORKS
-----
activeresource acts_as_versioned activerecord addressable actionpack actionmailer

MAY WORK
--------
activesupport

FAILS
-----

UNTESTED
--------
abstract acts_as_cached AdoccaMemcache archive-tar-minitar

MISSING
-------

TODO

  • Maintain a blacklist of working gems.
  • Ignore already installed Ruby 1.9 gems.
  • Side project to provide interactive gem install testing and isitruby19.com form submission.

LICENSE

Copyright © 2009 Kevin McFadden
Copyright © 2009 Concepts Ahead

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Verifies whether your Ruby 1.8 gems are compatible with Ruby 1.9 based on entries from http://isitruby19.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages