Sample app gets a quick bump
Courtenay : April 14th, 2007
Trevor has renamed the Image model to Asset to avoid “image_path” namespace conflicts. Also, Dan Quellhorst caught a security issue in the default “user.to_xml” that was showing the passwords. Install instructions were culled from the various comments and moved to README.
Finally, I’ve tagged version 3 as stable, and we’ll backport any critical bugs to this branch, but no new features, so you can safely use it with piston. We’ll create any schema changes as new migrations in stable branch (it’s up to you to fit them to your project).
Trunk will continue to be developed and migrations will not be back-compatible; that is, if we change the user or asset tables, we won’t create new migrations. As we get enough features to warrant a release, it’ll be tagged.
You can download tarballs or view the sourcecode online at our old-school-style site,
The Caboose Sample Rails Application v3
Courtenay : April 11th, 2007
Update: Please see http://sample.caboo.se/ for the latest version of our sample apps.
Get it here:
svn://caboo.se/plugins/court3nay/empty_apps/restful_auth_rspec
Contact the author (you'll need to add .com to the email):
<court3nay+sra@gmail>
Requirements:
You'll need a few gems.
- rspec
- image_science OR rmagick
Changeset:
- removed 'with_scope' and replaced it with protocool's awesome polymorphic controller code.
- added his resource_fu plugin for restful helper methods
The most recent changes are due to Trevor/protocool, the author of the resource-fu plugin. It seems like nested resources in a polymorphic form are extremely difficult to implement in a clean manner.
Here's a snippet of code:
delegate :images, :to => '@attachable'
helper_method :images
def load_image
@image = images.find(params[:id])
end
Beautiful. It relies on the images controller being an abstract class, defining @attachable in the inherited class, and delegating "images" helper method to that @attachable object.
From the readme:
Caboose Sample App
This is a sample application containing a bunch of useful plugins and code to help you get started quicker.
It is intended to be an example of "better practices", but with the intention of ultimately being
"best practice" through collaboration and iterative improvement.
The application implements many of the basic and advanced features I find myself using in every new project:
- a user model with a few extra fields (last login, timezones)
- restful authentication
- simple authorization (can't edit other's profiles)
- full timezone support
- basic views implemented with Yahoo! YUI CSS grids
- behavioral testing with rspec, including good example of mocking in controller specs
- exception notification (remember to change the email address in environment.rb)
- nested resources (user/images) which can easily be extended (e.g. product/images)
- polymorphic image model
- around_filters to set and clear request-specific data
Many of the enhancements to the stock plugins are ripped from my private codebase, as yet unseen by the world :)
TODO:
Sample controllers and models More useful plugins Good examples of ajax Better list of requirements (required gems, etc)
TODONE:
x Polymorphic Image model using attachment_fu
Documentation project patches are in
Courtenay : March 27th, 2007
Many of the documentation project patches are being merged as we speak into the rails core. Behold the power of this partially operational battle station!
You can wait for the next release of Rails, or, see the updated API on the caboose edge rails api. Remember that the edge API has all the private (#:nodoc) methods exposed, so don’t operate heavy machinery while under its influence. (As a sidenote, the docs were not actually auto-generating since I moved servers, so I fixed the missing crontab entry)
Documentation Project progress
mrneighborly : March 19th, 2007
Hello; it’s time for a quick update on the documentation project. Jamie and I are working hard on getting the “big pieces” documented right now. The idea is that we’ll get ActionView, ActionController, and ActiveRecord well documented, and then go back to the main Rails README and edit it to effectively use the shored up docs in those packages. Jamie is still slaving away on the ActiveRecord documentation (and making good progress!) while I turned out a new README for ActionPack today.
- 7869 : Improved ActionPack README
The patch still needs a few tweaks to the examples (some of them wouldn’t make sense to a newbie), but it’s much better than it was. The target next week will be ActionView::Base and/or ActionController::Base documentation…but that’s next week. :)
Doc Project: Progress update
mrneighborly : March 12th, 2007
It’s fun coming up with the number of ways I can say “Documentation Project update.”
We got a lot done today. We finally meshed on a method template that we’ll use for documenting all methods, and started documenting a lot of methods with it! I tackled the ActionController::Assertions module(s) while Jamie kept hammering away on ActiveRecord. He got the README done (and part of the AR::Base docs) while I got two patches done for the Assertions (and one started for ActionView::Base after restarting to match our decided upon layout for README/::Base docs). Here are the tickets:
- 7747 : Better structured Active Record readme Updated to fix an rdoc formatting error
- 7802 : ActionController::DomAssertions module, explaining what it’s for, better explaining the methods, and providing examples.
- 7803 : ActionController::Assertions module, second patch in an effort to improve these docs.
- 7808 : ActiveRecord::Base, overview is a little rounder but plenty left to go on this one
See you next week. :)
it's that time again: documentation project update
mrneighborly : March 5th, 2007
It's time for another documentation project update. This week concentrated on continuing to lay down plans, with the creation of a styles and conventions page that we (and future doc writers) will do our best to adhere to. We also laid plans to create a Rails application to keep track of our Basecamp information rather than giving the public access (since someone keeps ticking off our to-do items...). Here are the patches this week:
- #7656 : ActionView::Helpers::PrototypeHelper documentation
UPDATED I updated this patch to include documentation of all the JavaScript generated by the methods; I also went back and fixed a few errors in the original documentation and my edits. - #7722 : ScriptaculousHelper documentation improvements
The documentation for ScriptaculousHelper assumed (a) that the reader knew what Scriptaculous was and (b) they knew what all the parts did. This patch adds more background information, shows the javascript generated by each method, improves the README, and cleans up the grammar a little bit.
In light of the new README convention we've developed (README's for packages will contain very high level overviews with no examples, Base class documentation will have examples with very little theory and will act as jumping pages to the relevant portions of the documentation) I'm working on a new README and Base class documentation for ActionView (ActionPack) that's about 75% done; Jamie is nearly done with the ActiveRecord documentation in the same vein. Both of those patches should probably make it in next week, which will result in a hefty upgrade to the documentation of those classes/packages.
Also, in the interest of helping out this documentation project, I've developed a tool called dcov (Documentation COVerage) that will report on the documentation coverage of Ruby code files, somewhat similarly to rcov. It basically rips a lot of Ruby parsing code off of Rdoc (which rips its code off of something else ;)) and generates a report on documentation coverage of classes, modules, and methods. Right now, it merely tests for a comment, but soon one day I want to have it crawl the code and test for options hashes and then check for documentation of those, generate documentation stubs, with placeholders for parameter documentation (and eventually any usage of the options hash it can figure out), and more...but that comes with time. I'll post the Rubyforge page when it's in a state ready to be used.
documentation project update
mrneighborly : February 27th, 2007
I just wanted to give everyone an update on the documentation project from my and Jamie's work on Monday. Here is a list of the tickets we've submitted so far.
- #7590 : More config comments added to database.yml
This patch adds a signficant piece of information to database.yml pertaining to configuration. - #7591 : smtp configuration options added
Explanation of the smtp options; we're working towards explaining every options hash for every method (ambitious? yes. psychotic? definitely.) - #7618 : [ACCEPTED] Better documentation on Form Helpers
Changed the form helper documentation to be more understanding for beginners. - #7651 : Rake annotations searching only in rxml/rhtml files and not builder/erb files (also fix reference to rhtml file in a doc)
I was working on replacing any reference to rhtml with erb, but while doing so, I noticed a rake task that searched only for rhtml/rxml files rather than rhtml/erb/rxml/builder. So I fixed that while I was at it. - #7652 : ActionController::Scaffolding documentation extended and improved
Greatly extended the Scaffolding documentation, including some information about how to replace scaffolding with your own stuff. - #7656 : ActionView::Helpers::PrototypeHelper documentation
This is much improved PrototypeHelper documentation; I'm still working on this patch. I want to add some documentation explaining what gets generated and fix a few little issues here and there.
Jamie also worked on some much improved ActiveRecord::Base documentation (excited to see that!). We're hoping to turn out a few more patches next week. We're currently working on "high level" documentation, but will eventually get down to documenting the minutia such as option hashes and the like. You can stay posted on what we're doing on the Basecamp that Jamie posted to the caboose blog yesterday.
doc project: basecamp project
fearoffish : February 26th, 2007
As part of our planning and overall management, I thought it would be a good idea to let everyone have access to the basecamp project we’ve made to keep track of our todos. So if you’d like to check out the todo list for our documentation project, or leave a comment to let us know we’re missing something (which we will be somewhere, so please do), then hop over to our basecamp address and log in with these details:
Caboose Documentation Project Basecamp
- user: guest
- pass: guest
Please be sure not to abuse it or I’ll have to shut down access which would be a shame.
doc project: Jamie delivers, Jeremy comes on board
Courtenay : February 21st, 2007
Jamie “fearoffish” has been elbow-deep in the rails API documentation, developing a plan and getting down to the task of actually writing. In the interests of full disclosure, he’ll be getting paid the daily rate of £225 (which is about $450 USD) as will all the documenters.
Part of his first day was spent collaborating with the other author (see below), DHH, and other interested parties, planning out what needs to be documented, and to make sure effort isn’t wasted. Basically, the plan is to write voluminous examples and fix the outdated code. Finally, we trawled through the rails-talk mailing list to find some of the most common questions.
Here are the patches Jamie completed.
- http://dev.rubyonrails.org/ticket/7590 - adding more examples to database.yml
- http://dev.rubyonrails.org/ticket/7591 - adding smtp configuration example to environment.rb. Since smtp is now the default in rails, this one makes sense to have in there
- http://dev.rubyonrails.org/ticket/7618 - better documentation on form helpers. lots of good examples in here.
another author!
Jeremy McAnally is the second author to devote a day a week to the project. You may know him from the “Humble little ruby book”.
fearoffish comes on board
admin : February 14th, 2007

Jamie, aka “fearoffish” from the UK, after doing his time in the trenches, comes on board as a part-time caboose blogger and the first documentation project writer.
He’ll be armpit-deep in the API, writing for one (full-time) day a week. Suggestions on where to start? Pick a file or subject matter!
Jamie’s a skilled coder whose rails-fu impressed me while working as one of my contractors last year. He’d started on an open-source book entitled, Getting Started with Rails which proves his writing ability.
Hit us up in the comments with them suggestions!
Are you a writer? There’s still plenty of days left in the week!
doc project focus
Courtenay : December 26th, 2006
update on the documentation project
Courtenay : December 26th, 2006
Professional Author working on rails API
It seems like none of the published Ruby or Rails authors want to actually work on the Rails documentation. Perhaps its the lack of glory, or the fact that there are no residuals. I’ve spoken to most of the well-known, published, ruby or rails authors, and none of them are interested. I even hit up the Ruby guys at Rubyconf in person, and all of them said “Well, I don’t really know rails that much..” I’ve chased up the names: Hal, Chad, Amy, Lucas, Jake, Dave, Obie, David—even the guys who write the blogs and don’t have books out yet. They just don’t wanna do it.
So, the conundrum facing us today is, “Where do we find an author?” I’ve chased all the people I know. There are a few good projects out there worthy of mention; the fearoffish open-source rails book at http://svn.devjavu.com/rails/ is a prime example—but we need your help on this, now, folks. How do you catch a technical writer? How do you interest them?
RDOC project
The idea with this project is to make it simple to make patches to documentation, and to reward those who do. It’s Nearly Done, and the parts that work, work well. We really are fighting against the arcane rdoc format. But if you take a look at the commit logs it’s really just me plugging away. This doesn’t scale, since I don’t actually have that kind of time, and I’m not taking money from the master fund in order to work on it (that’s not what it’s for). Many people requested svn access, and then just didn’t do anything. Others started off strongly and then just disappeared, or have contributed two or three patches. So the app just stagnates, because there isn’t the interest.
What needs to be done?
- an automated way of posting patches to the core rails trac
- a fix for editing “class-level” code
- fix the “plea” code so that people can flag some docs as requiring attention
Sure, people donated so they didn’t have to worry about any of this. But that money is locked in limbo until we have a framework for handing out the cash to the masses (aka doc patches), and/or some decent technical writers willing to put in some time. And no, I will not look at proposals for all of the money to go to one writer. I also will not look at proposals from people who’ve never published a ruby technical document before.
Hook it up in the comments and let’s get the ball rolling. The wiki is at http://caboose.stikipad.com/documentation/
doc project update
Courtenay : October 27th, 2006
Update on the documentation project
Courtenay : August 11th, 2006
The Caboose Rails Documentation Project
Courtenay : August 4th, 2006
Prizes!
When we reach $5,000, we will randomly hand out prizes! So far, we have, to give away: - 2 copies of the [Money Train](http://www.agilewebdevelopment.com/book), from [Ben Curtis](http://bencurtis.com) (building e-commerce apps in rails!) - 2 combo-packs (pdf + dead tree) of [Beginning Ruby on Rails E-Commerce](http://www.amazon.com/gp/product/1590597362/) by Jarkko Laine and Christian Hellsten, __signed__ (if you have anything as an incentive, fire court3nay a gmail)
[0........1.........2.........3.........4.........5]
[OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO] $5 000
[OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO] $10 000
[OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO] $15 000
[OOOOOOOOOOO.......................................] $20 000