Sha256: 7b38ffe07da42f376cac098264f09babd3180f99e136ee13702470d5270cde71

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

ActiveRacksource
================

NOT COMPLETE - CHECK BACK REAL SOON!
====================================

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 http://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. 

Cool, how should I get started?
-------------------------------

... ( documentation coming soon! ) ...


[rack]:            http://rack.rubyforge.org
[activeresource]:  http://api.rubyonrails.org/classes/ActiveResource/Base.html

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openrain-active_racksource-0.1.0 README.markdown