I think t0fuu has hit upon gold with SimpleConsole, his new Ruby framework for console applications. Imagine Ruby on Rails, but entirely for command line scripts, and that’s SimpleConsole. It has automatic options parsing, before and after filter support, has logic and view separation, and a routing system. It’s real thinking out of the box, and with more work it could be an incredibly powerful and productive way to knock up quick scripts for the command line. Read More
Rb-AppScript is an event bridge between Ruby and OS X that allows you to get AppleScript-esque control in OS X. The Appscript creators claim Appscript is a ‘serious alternative’ to AppleScript and it certainly looks good. Check out this example:
AS.app(‘TextEdit’).documents[1].paragraphs[1].get
The equivalent AppleScript?
tell application “TextEdit”
get paragraph 1 of document 1
end tell
Appscript provides the system to perform remote procedure calls to OS X applications, converts values between Ruby and Apple classes, and allows developers to get full use out of OS X while still using Ruby’s object oriented environment. Read More
Courtenay has come up with an ingenious solution to caching and precaching in Ruby on Rails with memcached. It caches data from database requests, as you’d expect, but you can also put together a special forking method that caches data in advance. Courtenay’s suggestion for this is if a user does a search and you cache the initial page of search results, you could speculate the user might progress onto page two of the search, so you can get Rails to precache that data in advance so the next page load is blazing fast. Read More
The eminent Dr. Nic Williams has put together a useful generator that makes it a lot easier to construct your own gems. It’s an ideal script if you’ve never put a gem together before, or if you’re sick of the repetition involved. Nic tells me that this tool might make its way into the core RubyGems distribution in the future, but it’s worth playing with straight away.
Once installed, all you do is run newgem followed by the desired name of your gem, and Nic’s generator creates the correct directories and pre-populates several relevant files (for testing, documentation, Rake tasks, etc.). Read More
Tesly Jr. is a service that provides good-looking HTML reports for your tests. It can hook into Ruby / Rails’ Test::Unit library and receive the results of tests as they’re being completing. The results are logged and shown on the Tesly Jr. site, allowing your customers to see up to date results as you go. You can also subscribe to RSS feeds that are updated every time your tests are run. Read More
Some user mail from Nathan Murray:
I just wanted to let you guys know I’ve just released the first version of my Backup Gem. You can read the manual here:
http://tech.natemurray.com/backup/
BackupGem aims to be the easiest and most flexible backup, archive and rotate tool. It’s a beginning-to-end solution for scheduled backups in a clean ruby package that is simple use and powerful when customized.
A configuration as simple as:
set :backup_path, “/var/local/backups/my_old_logs”
action :content, :is_contents_of => “/var/my_logs”
Will compress, encrypt, deliver, and rotate the contents of /var/my_logs. But this is just a taste of the power this gem has.
You can install the gem easily with gem install backup and the official documentation is very complete and full of examples. Read More
Ruby on Rails Camp is a gathering (in the ‘unconference’ style) of Ruby and Rails enthusiasts on November 9 in San Jose, California. The event’s sponsored by the IBM Almaden Research Center and registration costs $25. To learn more, check out the official Ruby on Rails Camp site. Read More
It’s not the final version, but there’s now a cover and a page on Amazon for my book, Beginning Ruby, due March 2007. APress also have a page about the book up now too, although that biography’s going to need a bit of a re-write I think :) In terms of the practicalities, the book is well over half-written and there’s a very dim light at the end of the tunnel, but it’s hard work! Read More
Tom Preston-Werner demonstrates his Chronic “natural date parsing” library for Ruby in this cool, live presentation / screencast. He goes deep into how the library works and how it parses the natural language inputs. Read More
After watching Geoffrey Grosenbach’s latest episode of Peepcode, a pay-for screencast series showing you how to do cool stuff with Ruby on Rails, I can safely say Restful Rails is the best $9 you could spend on Rails knowledge right now. Almost 90 minutes of screencast bliss packed with info is a steal, especially since you’ll save so much time playing about.
It covers REST (Representational State Transfer), a concept, in Rails at least, where your models and data rule the roost. URLs are accessed with differing HTTP verbs depending on the action (GET to get data, POST to create data, etc) and data can be returned in different formats (HTML, XML, sometimes RSS) on the fly. Read More
Check out this cool PDF cheatsheet covering REST on Rails. It was put together by Geoffrey Grosenbach and covers routing, verb/path formats, nested resources, MIME types, the scaffold resource generator, and custom method examples. Read More
This is going to be child’s play to most of you, but Eric Lake has a cool video up about how to enable a simple prompt and tab completion in IRB. I’d never thought of having that feature in IRB before so I found it interesting at least. Still not sure I need it, but if you do.. Read More
Following on from his original interview with Charles Nutter and Thomas Enebo of the JRuby team, Pat Eyler has interviewed the team again (read part 1 then part 2), with the addition of Ola Bini. Both parts are quite long and go into a lot of detail about JRuby and Ruby’s existence under the Java umbrella.
In Part 1, Ola comments:
I’m tackling performance from my side, by creating extensions in Java instead of Ruby (YAML and ZLib, for example).
JRuby might feel like an alternate bizarro reality, but these guys are doing a great job while staring one giant mountain in the face. Read More
Amy Hoy has put together a PDF that’s a cross between a very basic cheatsheet and an introduction to RJS (the AJAX / JavaScript DSL included with Rails). It’s extremely colorful and cute with good illustration and layout, although only particularly useful to beginners as it’s not really a cheat sheet in the traditional sense. Read More
Rob Sanheim (one of the Ajaxians) has put together a great review of Ruby For Rails by David Black. It’s a great book, and if you haven’t got it yet, let Rob’s review convince you. I personally found it an interesting read and it’s really easy to get stuck into. It’s an ideal book if you’ve made it through Agile Web Development for Ruby on Rails and are hankering for more as it dives into the Ruby side of things a lot more. Read More