blog.segment7.net Archives - 16 May 2013, Thursday

The default output encoding for RDoc is now UTF-8. Previously RDoc used the default external encoding which was determined from your locale. Issue #106 by Justin Baker. RDoc::RI::Store is now RDoc::Store so ri data generated by RDoc 4 cannot be read by earlier versions of RDoc. RDoc::...

Related:

drbrain | Mon, 15 Nov 2010 22:12:20 GMT Posted in Rubygems If you went to the first round of RubyConf lightning talks you saw me say this already, but I got enough applause that this needs wider dissemination. Here is my STRONG recommendation on how to name gems: Use underscores fancy...

Ruby 1.9.3 Documentation Challenge drbrain | Tue, 10 May 2011 00:33:00 GMT Posted in Ruby Yugui announced a draft Ruby 1.9.3 release plan today with a feature freeze of end of May and a release target of end of July or early August. I've seen many complaints in the form of "X lacks do...

Earlier today I checked in a patch that adds streaming zlib processing to Ruby. This allows you to process a stream without needing to allocate space to hold the entire result. To add the streaming support I changed #inflate and #deflate to accept a block. A handful of other methods (...

Argument casting allows you to validate a command-line option and convert it from the user-supplied String into whichever object you like. The ri for OptionParser has an example similar to this one for casting a floating-point argument into a Float value:

drbrain | Wed, 09 May 2012 20:48:00 GMT Posted in Software Documentation Source The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, and can follow links and submit forms. Form fields can be popula...

Related:

drbrain | Fri, 04 May 2012 00:57:28 GMT Posted in Misc I sat down with Elise Worthy at RailsConf to pair with her on a Rails application that used the Wunderground API to retrieve the weather for multiple cities. If you don't know Elise, she's a Hungry Academy student formerly of Seat...

Mechanize#auth and Mechanize#basic_auth allowed disclosure of passwords to malicious servers and have been deprecated. In prior versions of mechanize only one set of HTTP authentication credentials were allowed for all connections. If a mechanize instance connected to more than one se...

Related:

drbrain | Thu, 17 Aug 2006 16:47:00 GMT Posted in Ruby You may have noticed me using both $stdout and STDOUT in my last post and been puzzled by how I could use both. When Ruby starts up the process’ standard output file descriptor is stored in both the constant STDOUT and the global ...

On Community Funding of Open Source drbrain | Fri, 30 Mar 2012 02:49:42 GMT Posted in Ruby The other day Yehuda Katz announced a kickstarter for creating Rails.app , an OS X application that makes it easy to bring new programmers to Rails and Ruby. I think the idea is fantastic. When ...

drbrain | Fri, 16 Mar 2012 23:19:07 GMT Posted in Ruby In Ruby 1.9, Enumerable has a few new methods including Enumerable#chunk (which was added for 1.9.2). The #chunk method walks your Enumerable and divides it into chunks based on a selecting block. Unlike Enumerable#partition, the ...