github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ianwhite / resources_controller

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 96
    • 10
  • Source
  • Commits
  • Network (10)
  • Issues (1)
  • Downloads (0)
  • Wiki (2)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

resources_controller rails plugin: rc makes RESTful controllers fun — Read more

  cancel

http://plugins.ardes.com/doc/resources_controller

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Remove check on controller_name for namespace removal 
ianwhite (author)
Fri Jan 29 05:08:19 -0800 2010
commit  93b8ceda535b67dd39195d48b31df9fcb3877e1c
tree    2b5f5c92e91ce1510ceaf8636c11ed020d3dea61
parent  21e18a3d974e970d5647d3f07b6c66056473f1d2
resources_controller /
name age
history
message
file .gitignore Thu Nov 20 01:56:06 -0800 2008 updating to use new garlic gem style [ianwhite]
file History.txt Wed Jan 27 05:31:59 -0800 2010 added ResourceMethods#destroy_resource, which c... [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 Fri Jan 08 06:34:52 -0800 2010 Exlcude gems from coverage [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 Fri Jan 08 06:35:58 -0800 2010 Remove rails 2.0 from garlic targets, as edge r... [ianwhite]
file init.rb Sat Sep 19 08:42:47 -0700 2009 Added RequestPathIntrospection module and specs... [ianwhite]
directory lib/ Fri Jan 29 05:08:19 -0800 2010 Remove check on controller_name for namespace r... [ianwhite]
directory spec/ Fri Jan 29 04:54:57 -0800 2010 Updated spec for new namespace_segments API [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

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server