RubyGems 1.3.4

Eric Hodel | Sat, 30 May 2009 14:20:00 GMT

NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.

Release 1.3.4 fixes some bugs and adds some features.

Bug Fixes:

  • Fixed various warnings
  • Gem::ruby_version works correctly for 1.8 branch and trunk
  • Prerelease gems now show up in `gem list` and can be used
  • Fixed option name for `gem setup --format-executable`
  • RubyGems now matches Ruby > 1.9.1 gem paths
  • Gem::RemoteFetcher#download now works for explicit Windows paths across drives. Bug #25882 by Lars Christensen
  • Fix typo in Gem::Requirement#parse. Bug #26000 by Mike Gunderloy.

Deprecation Notices:

  • Bulk index update is no longer supported (the code currently remains, but not the tests)
  • Gem::manage_gems was removed in 1.3.3.
  • Time::today was removed in 1.3.3.

For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

  $ gem update --system   (you might need to be admin/root)

NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.

NOTE: You may have to run the command twice if you have any previosly installed rubygems-update gems.

If you have an older version of RubyGems installed, then you can still do it in two steps:

  $ gem install rubygems-update  (again, might need to be admin/root)
  $ update_rubygems              (... here too)

If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:

  1. DOWNLOAD FROM: rubyforge.org/frs/?group_id=126
  2. UNPACK INTO A DIRECTORY AND CD THERE
  3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)

To File Bugs

The RubyGems bug tracker can be found on RubyForge at: rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, `gem env` output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with `gem —debug the_command`.

Thanks

Keep those gems coming!

— The RubyGems team

Posted in ,  | no comments

A Project Naming Recommendation

Eric Hodel | Wed, 20 May 2009 23:08:02 GMT

I’ve gone through many different styles of project names, but I think I’ve finally found a naming scheme I like.

In the past, I’ve used class names with uppercase letters, dashed names and underscored names, and I think the underscores are the best for projects I’m packaging in ruby.

Rails solidified the convention of mapping CamelCase class names to underscored file names (class IMAPProcesor is defined in imap_processor.rb). Using underscored gem names makes it easy for people to figure out what file to require (same as the project name) or what class name to look for in ri.

If I have a plugin gem or an extension I’ll tack on the sub-project’s name with a dash. If I wanted to add a new handler for imap_to_rss for Chase bank email, the gem would be named imap_to_rss-chase.

This makes it easy to find in gem list -p and it conveniently namespaces the extension. It also would look nice with gems from github which break up author and project with a dash (drbrain-imap_to_rss-chase, if I used github). As an added bonus, when double-clicking any underscored part OS X only highlights a part of the name making cut-and-paste a little more convenient for picking apart gem names.

Currently almost 95% of gem names start with lowercase letters, 6% contain uppercase letters anywhere in the name, a little over 20% use dashes, 16% use underscore. Sixteen use both underscores and dashes (my favorite name being what_does_this_error_mean-merb).

Posted in ,  | 2 comments

Fat binary gems

Eric Hodel | Tue, 12 May 2009 23:10:58 GMT

Right now people who publish native gems targeting the windows platform have a problem. Our problem is supporting ruby 1.8 and 1.9 at the same time. Right now, we can’t build one gem targeting 1.8 and one gem targeting 1.9, and have rubygems differentiate the two. I have a solution: fat binary gems. We can build a gem that contains dynamic libraries that target ruby 1.8 and ruby 1.9 on windows, with no changes to rubygems whatsoever. I’ve put together a proof of concept that I want to share. I will walk through the steps for building a fat binary gem with the tools we have today. The steps I am going to present are not necessarily the best steps, they are just the steps I took to get this idea working.

Fat binary gems make the rockin’ world go round via Tender Love Making

Posted in ,  | no comments

RubyGems 1.3.3

Eric Hodel | Mon, 04 May 2009 23:13:34 GMT

NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.

Release 1.3.3 fixes some bugs and adds some features.

New Features:

  • `gem server` allows port names (from /etc/services) with —port.
  • `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir Dobriakov.
  • `gem spec` can retrieve single fields from a spec (like `gem spec rake authors`).
  • Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true)
  • RDoc is now generated regardless of Gem::Specification#has_rdoc?

Bug Fixes:

  • `gem clean` now cleans up —user-install gems. Bug #25516 by Brett Eisenberg.
  • Gem.bin_path now escapes paths with spaces.
  • Rake extension builder uses explicit correctly loads rubygems when invoking rake.
  • Prerelease versions now match “~>” correctly. Patch #25759 by Yossef Mendelssohn.
  • Check bindir for executables, not root when validating. Bug reported by David Chelimsky.
  • Remove Time.today, no way to override it before RubyGems loads. Bug #25564 by Emanuele Vicentini
  • Raise Gem::Exception for #installation_path when not installed. Bug #25741 by Daniel Berger.
  • Don’t raise in Gem::Specification#validate when homepage is nil. Bug #25677 by Mike Burrows.
  • Uninstall executables from the correct directory. Bug #25555 by Brett Eisenberg.
  • Raise Gem::LoadError if Kernel#gem fails due to previously-loaded gem. Bug reported by Alf Mikula.

Deprecation Notices:

  • Gem::manage_gems has been removed.
  • Time::today has been removed early. There was no way to make it warn and be easy to override with user code.

For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

  $ gem update --system   (you might need to be admin/root)

NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.

NOTE: You may have to run the command twice if you have any previosly installed rubygems-update gems.

If you have an older version of RubyGems installed, then you can still do it in two steps:

  $ gem install rubygems-update  (again, might need to be admin/root)
  $ update_rubygems              (... here too)

If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:

  1. DOWNLOAD FROM: <a href=”http://rubyforge.org/frs/?group_id=126”>rubyforge.org/frs/?group_id=126
  2. UNPACK INTO A DIRECTORY AND CD THERE
  3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)

To File Bugs

Submit bugs on RubyForge at the <a href=”http://rubyforge.org/tracker/?func=add&group_id=126&atid=575”>RubyGems bug tracker

When filing a bug, `gem env` output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with `gem —debug the_command`.

Thanks

Keep those gems coming!

— The RubyGems team

Posted in ,  | no comments

InfoQ on RubyGems Plugins

Eric Hodel | Thu, 23 Apr 2009 00:05:39 GMT

RubyGems 1.3.2 introduced a new feature: plugins that can hook into the install process and provide new commands. An example is Ryan Davis’ graph that visualizes dependencies between installed Gems. We talked to RubyGems maintainer Eric Hodel to learn more. By Mirko Stocker

RubyGems Gets Plugins via InfoQ

Posted in ,  | no comments

rubypan 1.0 released

Eric Hodel | Fri, 17 Apr 2009 00:19:00 GMT

rubypan version 1.0 has been released!

A gem command plugin that adds `gem ferret` to perform fulltext searching of rubypan.org. Requires RubyGems 1.3.2+

$ gem ferret Eric Hodel
action_profiler (1.0.0)
ar_mailer (1.3.1)
ar_mailer_generator (1.0.0)
cached_model (1.3.1)
firebrigade_api (1.0.0)
geocoder-us (1.1.1)
[...]

Posted in , ,  | no comments

RubyGems 1.3.2

Eric Hodel | Wed, 15 Apr 2009 21:48:00 GMT

NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.

Release 1.3.2 fixes some bugs and adds some features.

Select New Features:

  • RubyGems now loads plugins from rubygems_plugin.rb in installed gems. This can be used to add commands (See Gem::CommandManager) or add install/uninstall hooks (See Gem::Installer and Gem::Uninstaller).
  • Gem::Version now understands prerelease versions using letters. (eg. ‘1.2.1.b’) Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg.
  • RubyGems now includes a Rake task for creating gems which replaces rake’s Rake::GemPackageTask. See Gem::PackageTask.
  • Gem::find_files now returns paths in $LOAD_PATH.
  • Added Gem::promote_load_path for use with Gem::find_files
  • Added Gem::bin_path to make finding executables easier. Patch #24114 by James Tucker.
  • Various improvements to build arguments for installing gems.
  • `gem contents` added --all and --no-prefix.
  • Gem::Specification
    • #validate strips directories and errors on not-files.
    • #description no longer removes newlines.
    • #name must be a String.
    • FIXME and TODO are no longer allowed in various fields.
    • Added support for a license attribute. Feature #11041 (partial).
    • Removed Gem::Specification::list, too much process growth. Bug #23668 by Steve Purcell.
  • `gem generate_index`
    • Can now generate an RSS feed.
    • Modern indicies can now be updated incrementally.
    • Legacy indicies can be updated separately from modern.

Select Bugs Fixed:

  • Better gem activation error message. Patch #23082.
  • Kernel methods are now private. Patch #20801 by James M. Lawrence.
  • Fixed various usability issues with `gem check`.
  • `gem update` now rescues InstallError and continues. Bug #19268 by Gabriel Wilkins.
  • Allow ‘https’, ‘file’ as a valid schemes for --source. Patch #22485.
  • `gem install`
    • Now removes existing path before installing. Bug #22837.
    • Uses Gem::bin_path in executable stubs to work around Kernel#load bug in 1.9.
    • Correctly handle build args (after --) via the API. Bug #23210.
  • --user-install
    • `gem install --no-user-install` now works. Patch #23573 by Alf Mikula.
    • `gem uninstall` can now uninstall from ~/.gem. Bug #23760 by Roger Pack.
  • setup.rb
    • Clarify RubyGems RDoc installation location. Bug #22656 by Gian Marco Gherardi.
    • Allow setup to run from read-only location. Patch #21862 by Luis Herrera.
    • Fixed overwriting ruby executable when BASERUBY was not set. Bug #24958 by Michael Soulier.
    • Ensure we’re in a RubyGems dir when installing.
    • Deal with extraneous quotation mark when autogenerating .bat file on MS Windows. Bug #22712.

Deprecation Notices:

  • Gem::manage_gems has been removed.
  • Time::today will be removed in RubyGems 1.4.

For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.

Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena and Daniel Berger for continuing windows support.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

  $ gem update --system   (you might need to be admin/root)

NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.

NOTE: You may have to run the command twice if you have any previosly installed rubygems-update gems.

If you have an older version of RubyGems installed, then you can still do it in two steps:

  $ gem install rubygems-update  (again, might need to be admin/root)
  $ update_rubygems              (... here too)

If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:

  1. DOWNLOAD FROM: rubyforge.org/frs/?group_id=126
  2. UNPACK INTO A DIRECTORY AND CD THERE
  3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)

To File Bugs

The RubyGems bug tracker can be found on RubyForge at: rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, `gem env` output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with `gem --debug the_command`.

Thanks

Keep those gems coming!

— The RubyGems team

PS: This blog post brought to you by rdoc --pipe

Posted in , ,  | no comments

RubyForge Gems RSS Feed

Eric Hodel | Mon, 09 Mar 2009 21:20:35 GMT

Thanks to the assistance of Tom Copeland, RubyForge now has an RSS feed of recent gems:

http://gems.rubyforge.org/index.rss

The feed is updated daily and contains the last two days of releases. If you forget, you can also access the feed via RSS autodiscovery on http://rubyforge.org

Posted in ,  | 4 comments

A RubyGems + GitHub proposal

Eric Hodel | Thu, 05 Feb 2009 02:33:09 GMT

I know many people have added GitHub to their RubyGems sources list and find it sub-optimal. For example, Nokogiri is installed via gem install nokogiri from RubyForge and gem install tenderlove-nokogiri from GitHub. Furthermore, it’s possible to create a username/gem name combo on GitHub that overlaps a RubyForge name which could lead to pain and suffering for GitHub users.

I’ve come up with a potential solution to this problem:

  • Add an alias name attribute to gem specifications that point to the “RubyForge name” for the gem
  • Add an index to the gem server that maps alias names to “RubyForge names”
  • Only signed gems with an alias name will be included in this index
  • When RubyGems looks for a gem to install it considers aliased gems as exact matches for a name, provided they satisfy the user’s trust policy

Using this solution, a user could install a gem that has a dependency on nokogiri. If nokogiri is signed on GitHub and there’s a newer version on GitHub than on RubyForge, the GitHub version would be installed.

Here are some discussions points this solution presents:

  • GitHub currently builds gems for authors, so it is impossible for these gems to be signed. GitHub would have to store the author’s private key for signing.
  • By default RubyGems sets no security policy, so it doesn’t address the name overlap problem (this default could be changed)
  • Furthermore, it would not prevent a trusted author from turning rogue
  • Using a trust policy, a user can choose to pull gems from GitHub for specific authors by trusting the author’s public key (e.g. only install signed gems, only install trusted gems)
  • There’s no infrastructure for easily trusting an author’s key (beyond gem cert)
  • It doesn’t give GitHub a central authority for gems, but one could be built through a web of trust

Posted in  | 21 comments

RubyGems code_swarm

Eric Hodel | Wed, 28 Jan 2009 00:59:32 GMT

I built a code_swarm visualization of the RubyGems repository history:


RubyGems code_swarm (HD) from Eric Hodel on Vimeo.

Coincidentally, you can find a code_swarm visualization for Rails and other projects by Ilya Grigorik. He points to Peter Burns’ fork on GitHub which has a much improved toolset for generating these types of visualizations.

I used the original repository which involves a lot more work. For RubyGems I did roughly the following:

  1. Get a log: svn log -v > rubygems.log
  2. Convert the log: python convert_logs.py -s rubygems.log -o rubygems.xml
  3. Munge the XML to remove the CVS conversion commits and hide the renames from trunk/rubygems/ to trunk/
  4. Run code_swarm: code_swarm rubygems.config
  5. Encode PNGs to an MP4: ffmpeg -f image2 -b 1500 -r 24 -i frames/rubygems-%05d.png -sameq rubygems.mp4
  6. Upload to Vimeo

I played around with the code_swarm configuration a bit and ended up with this config for code_swarm. My changes give a larger video with more lingering of files as they float around and bumps up font sizes for readability. For more active projects you may need to decrease FileLife and PersonLife. (Really, I’m not sure how they affect things.)

Posted in ,  | 3 comments

Older posts: 1 2 3 ... 5