Tattle Host OS
Eric Hodel | Wed, 10 Jan 2007 16:03:00 GMT
After two days and 562 tattle reports a picture of rubyists' operating system choice is emerging:
$ ruby filter_host_os.rb tattle-host_os-20070110-1053.yml
darwin8: 242
linux-gnu: 161
mswin32: 116
freebsd6: 16
solaris2: 7
darwin7: 5
cygwin: 4
openbsd4: 4
linux: 2
freebsd5: 2
darwin9: 2
openbsd3: 1
Generated from:
$ cat filter_host_os.rb
require 'yaml'
data = YAML.load ARGF.read
collapsed = Hash.new 0
data['host_os'].each do |os, count|
os =~ /^(.*?)(\.|$)/
collapsed[$1] += count
end
length = collapsed.keys.sort_by { |k| -k.length }.first.length
collapsed.sort_by { |o,c| -c }.each do |os,count|
puts "%#{length}s: %d" % [os, count]
end
Tattle: The Ruby Census
Eric Hodel | Mon, 08 Jan 2007 21:23:51 GMT
The most-requested feature for RubyGems is the addition of a platform preference for automating installs and ignoring gems for the platforms you aren’t on. In order to help get there, Jim, Chad and Bruce have put together tattle:
At the first Rails Edge conference, Jim Weirich, Bruce Williams, and I were chatting about how to improve the RubyGems platform-specific behavior, when we realized that it would be really helpful to have more info about the install footprint of the Ruby community at large.
So instead of going right into hacking RubyGems as was our plan, we created a little census tool and an accompanying web site to help us collect information. Most of the info we collect is from Config::CONFIG, with the addition of the RubyGems version.
We know this information will help the implementers of RubyGems, and we hope it will also help Ruby implementers and library developers as well.
To install:
$ sudo gem install tattle
To submit your info:
$ tattle
If you want to see what would be posted before posting, you can do:
$ tattle report
The information gets posted to http://tattle.rubygarden.org. You can view the posted data with your web browser at that URL.
RubyGems Beta 0.9.0.9
Eric Hodel | Mon, 08 Jan 2007 01:28:33 GMT
Beta version 0.9.0.9 is now available with:
gem update --system --source http://onestepback.org/betagemsThis will be the last beta with major changes before the release of 0.9.1.
Upgrade note
While require_gem was deprecated in 0.9.0, the bin stubs are still using it (oops!). To get rid of the warnings printed by rake or other bin stubs simply run gem pristine --all.
What’s new since 0.9.0?
Lots! Many changes both big and small! Here’s an incomplete summary:
require_gemis deprecated and will print a warning. Usegeminstead.- RubyGems now requires ruby 1.8.2 or greater.
- gem command changes
- new gem pristine command
- new gem outdated command
- new gem sources command
- gem uninstall can uninstall multiple gems
- gem install uses the cache instead of downloading
- gem install returns non-zero exit code on failure
- gem install can now set shebang on bin stubs (env or ruby)
- gem help output now fits in 80 columns
- now -w clean
- many proxy installation improvements
- gem cert improvements
- RubyGems is now easier to use as a library
- Easier programatic installs
- Easier inspection of local and remote gems
- extension building enhancements
- error reporting enhancements (less odd exceptions)
- many bugs fixed or closed (0 bugs in tracker!)
- require now loads .jar files
- select bug fixes:
- installing from scratch fixed
- gem install --force forces
- installing from read-only location works
- gem uninstall requires full name
- gem install obeys GEM_HOME for bin scripts
- RubyGems now installs on ruby 1.9
New since beta 0.9.0.8
- fixed issue with Gem::Specification#hash for JRuby
- RubyGems now installs RDoc and ri for itself
- RubyGems is now tab-free
- require_gem warning prints file and line information
For full details, read the ChangeLog.
RubyGems Beta 0.9.0.8
Eric Hodel | Tue, 26 Dec 2006 10:17:48 GMT
Beta version 0.9.0.8 is now available with:
gem update --system --source http://onestepback.org/betagems
Merry christmas from the RubyGems project!
If you find any bugs, report them on the RubyGems bug tracker.
Upgrade note
While require_gem was deprecated in 0.9.0, the bin stubs are still using it (oops!). To get rid of the warnings printed by rake or other bin stubs simply reinstall the gem. In the next beta ‘gem pristine—all’ will fix all your gem bin stubs.
What’s new since 0.9.0?
Lots! Many changes both big and small! Here’s an incomplete summary:
- require_gem is deprecated and will print a warning. Use gem instead.
- RubyGems now requires ruby 1.8.2 or greater.
- gem command changes
- new gem pristine command
- new gem outdated command
- new gem sources command
- gem uninstall can uninstall multiple gems
- gem install uses the cache instead of downloading
- gem install returns non-zero exit code on failure
- gem install can now set shebang on bin stubs (env or ruby)
- gem help output now fits in 80 columns
- now -w clean
- many proxy installation improvements
- gem cert impromevents
- RubyGems is now easier to use as a library.
- Easier programatic installs
- Easier inspection of local and remote gems
- extension building enhancements
- error reporting enhancements (less odd exceptions)
- many bugs fixed or closed (0 bugs in tracker!)
- require now loads .jar files
- select bug fixes:
- installing from scratch fixed
- gem install—force forces
- installing from read-only location works
- gem uninstall requires full name
- gem install obeys GEM_HOME for bin scripts
- RubyGems now installs on ruby 1.9
For full details, read the ChangeLog.
Recent Gems and Gem::Specification#description=
Eric Hodel | Mon, 10 Apr 2006 17:14:00 GMT
Jim Weirich provides a recent gems RSS feed that will put the most recently uploaded gems in your favorite RSS feed reader. Unfortunately it needs some help. The body of each gem's entry is filled in from the the gemspec description field which some Gem authors neglect to fill in.
Its really easy to fill in the description field of your gem:
spec = Gem::Specification.new do |s|
s.name = 'mogilefs-client'
s.version = '1.1.0'
s.summary = 'A Ruby MogileFS client'
# Just add this line right here!
s.description = 'A Ruby MogileFS client.
MogileFS is a distributed filesystem written by Danga Interactive.
This client supports NFS mode and has untested support for HTTP mode.'
s.author = 'Eric Hodel'
s.email = 'eric@robotcoop.com'
# ...
end
If you haven't filled in your gem's description please do so now so it shows up in your next release. Currently I see several gems with interesting names in the feed but without a description I'm not that interested in looking at them. They might not be as cool as their names sound.
Rubygems + ri
Eric Hodel | Thu, 23 Feb 2006 11:42:00 GMT
I’ve almost finished doing what has previously been claimed as impossible. I’ve cleanly integrated ri and Rubygems so that you can use ri to search your installed gems’ documentation.
The first part was simple, tell Rubygems to generate ri data for its gems. Rather than have Rubygems install a gem’s ri data mixed-in with the standard library’s data it installs it into a per-gem directory.
The unfinished part is getting a patch into Ruby that makes ri go looking in the gem ri data directories. That patch is in [ruby-core:7423]. Hopefully I can push it into 1.8 so it will be usable with Rubygems 0.9.
I was right!
Eric Hodel | Fri, 17 Feb 2006 10:28:00 GMT
Super-easy!
Except that Rubygems has methods that don’t get called when you think they should.
And that there’s a strange bug in RDoc when you run it twice.
ri for Rubygems will be easy!
Eric Hodel | Fri, 17 Feb 2006 08:44:00 GMT
Something simple as:
begin
require 'rubygems'
Dir["#{Gem.path}/gems/*/ri"].each do |path|
RI::Paths::PATH << path
end
rescue LoadError
end

Articles