No commit activity in last 3 years
No release in over 3 years
Rack backend for ActiveResource for testing RESTful Rack APIs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

ActiveRacksource¶ ↑

Active**Rack**source is a Rack backend for ActiveResource.

Ok … What does that mean?¶ ↑

Here’s an example, let’s define a simple ActiveResource library

ActiveResource::Base.site = 'http://lots-of-dogs.com/'

class Dog < ActiveResource::Base
end

If you run the following command, it runs over HTTP and actually requests lots-of-dogs.com/dogs.xml

>> Dog.find( :all ).length
=> 1462

But, if you give ActiveResource a Rack application to use as a backend …

require 'active_racksource'

ActiveResource::Base.app = @my_rack_application

And run the command again …

>> Dog.find( :all ).length
=> 5

Then it runs against the Rack application, not over any TCP or anything! This is great for creating & testing ActiveResource APIs for your web applications.

Documentation¶ ↑

Read the RDoc

History¶ ↑

See the CHANGELOG

Cool, how should I get started?¶ ↑

Watch the screencast