public
Description: resources_controller rails plugin: rc makes RESTful controllers fun
Homepage: http://plugins.ardes.com/doc/resources_controller
Clone URL: git://github.com/ianwhite/resources_controller.git
Click here to lend your support to: resources_controller and make a donation at www.pledgie.com !
name age message
file .gitignore Thu Nov 20 01:56:06 -0800 2008 updating to use new garlic gem style [ianwhite]
file History.txt Thu Oct 08 06:14:05 -0700 2009 Fix bug where id is the same name as the resour... [ianwhite]
file License.txt Tue Sep 29 01:11:54 -0700 2009 Words [ianwhite]
file README.rdoc Thu Oct 08 06:29:05 -0700 2009 Add note about how to contribute [ianwhite]
file Rakefile Tue Sep 29 09:11:53 -0700 2009 Use hanna rdoc if available [ianwhite]
file Todo.txt Fri Feb 13 06:26:03 -0800 2009 Simplify Rakefile and push docs to gh-pages on ... [ianwhite]
file garlic.rb Sat Jun 27 13:39:41 -0700 2009 Added 2-3-stable back into CI build [ianwhite]
file init.rb Sat Sep 19 08:42:47 -0700 2009 Added RequestPathIntrospection module and specs... [ianwhite]
directory lib/ Thu Oct 08 06:14:05 -0700 2009 Fix bug where id is the same name as the resour... [ianwhite]
directory spec/ Thu Oct 08 05:58:10 -0700 2009 Rewrite singleton nesting_request_path spec to ... [ianwhite]
README.rdoc

resources_controller

is a plugin to facilitate inheritance and DRYness in your resources controllers. It introduces some abstraction to help you override the default RESTful funtionality in a clean and simple manner.

See History.txt for recent changes.

Resources

Github for code: github.com/ianwhite/resources_controller

API docs: ianwhite.github.com/resources_controller/doc

Google group for questions: groups.google.com/group/resources_controller

Lighthouse for bugs: ianwhite.lighthouseapp.com/projects/10598-resources_controller

Blog articles: blog.ardes.com/resources_controller

RailsConfEurope presentation files: en.oreilly.com/railseurope2008/public/schedule/detail/3536

works with rails 2.x

resources_controller works with rails 2.x, and is currently tested against 2.0, 2.1, 2.2, and 2.3 stable branches

Specs and Coverage

  • The SPECDOC lists the specifications
  • Coverage is 100% (C0), and the spec suite is quite comprehensive
  • Rspec’s generated rspec_scaffold controller specs are tested against a simple rc controller (see rake spec:generate)

RSpec is used for testing, so the tests are in spec/ rather than test/ Do rake —tasks for more details.

Continuous Integration

garlic (at github.com/ianwhite/garlic) is used for CI. To run the CI suite have a look at garlic.rb

How to contribute

If you have found a bug, or have a new feature, then spec’d code is great. To make sure you haven’t broken rc, you want to run the ci suite. This is pretty easy, you just need to install garlic, and run it in a fresh checkout of rc. The first time it runs it will be a little slow, as it needs to check out various git repos, but subsequent runs will be fast. The following is how I work - you may want to only do a subset of this stuff

  sudo gem install garlic

  # add the following line to your ~/.profile
    source `garlic --path`/sh/garlic.sh

  # reload your profile
  . ~/.profile

  # grab resources_controller and run the suite for the first time
  git clone git://github.com/ianwhite/resources_controller.git
  cd resources_controller
  garlic all

  # jump into 2-3 garlic work repo to make some changes
  gcdp 2-3

  # commit some stuff, run the specs with 'rake' etc

  # then push up to the local master repo
  gpush

  # go back to the local master, run garlic again, to see if the 2-3 changes affected anything else
  gup
  garlic

Contributors

The following people have made contributions to resources_controller. Please let me know if I’ve missed you out.

  • Chris Hapgood
  • Jason Lee
  • Richard Hooker
  • Matt Mower
  • Inviz
  • Dan Kubb
  • Rein Henrichs
  • Tom Stuart
  • Joel Chippindale
  • Tim Pope
  • Tom ten Thij
  • Sergei Serdyuk

License

Copyright © 2007-2009 Ian White, MIT License