caelum / restfulie

CRUD through HTTP is a good step forward to using resources and becoming RESTful. Another step further into it is to make use of hypermedia-based services and the Restfulie gem allows you to do it very quickly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ActiveResource support

guilhermesilveira opened this issue · comments

Re-write active support on top of Restfulie with restfulie capabilities

Would definitely make Restfulie easier to integrate into current projects if we could have a Restfulie'ised ActiveModel implementation.
+1

Do you think it should be the exact same API interface? Wanna help us on this one? I can show you the way
Regards

Well, unless I am mis-understanding anything, as of Rails 3 ActiveResource is also based off of ActiveModel so I think any restfulie implementation should at least be compatible with the basics of ActiveModel and pass the ActiveModel Lint test.

Unfortunately I have too many things to do at the moment so cannot commit time to this (Plus I am not a great developer so that is probably a good thing.)

I may have some time in the future (dev skill issues aside.)

guilherme, I might be interested in helping out with this one. I've got a project that may find it useful. Any pointers to a good place to start digging?

Sure! Download the activeresource code. Then copy and paste the test suite.
Then you can find the place where AR invokes net... Just comment it and all
tests should fail. In that place ou can implement the code to make one
work... Then the second.

If you get the first one working let me.know already!

Guilherme Silveira
On Sep 8, 2011 10:35 PM, "svoynow-lz" <
reply@reply.github.com>
wrote:

guilherme, I might be interested in helping out with this one. I've got a
project that may find it useful. Any pointers to a good place to start
digging?

Reply to this email directly or view it on GitHub:
#49 (comment)

Not sure if I followed that, can you say a little more?

One possible way of doing this is to take activeresource and replace the back-end code that uses normal http libraries with code that uses restfulie, that would be the first step. So...

  1. Clone the rails/rails repository and run the activeresource tests (to make sure everything is working)
  2. Find the code that calls Net::HTTP (Some examples in this file: https://github.com/rails/rails/blob/master/activeresource/lib/active_resource/connection.rb)
  3. Comment out all these lines of code
  4. Re-run the tests and watch them fail
  5. Replace the commented out lines with equivalents that use restfulie

That would be the first stage (IMHO) to getting a restfulie backed implementation.

Hi Jeffrey

Exactly! Thanks for clarifying

Guilherme Silveira
On Sep 12, 2011 11:23 PM, "Jeffrey Jones" <
reply@reply.github.com>
wrote:

One possible way of doing this is to take activeresource and replace the
back-end code that uses normal http libraries with code that uses restfulie,
that would be the first step. So...

  1. Clone the rails/rails repository and run the activeresource tests (to
    make sure everything is working)
  2. Find the code that calls Net::HTTP (Some examples in this file:
    https://github.com/rails/rails/blob/master/activeresource/lib/active_resource/connection.rb
    )
  3. Comment out all these lines of code
  4. Re-run the tests and watch them fail
  5. Replace the commented out lines with equivalents that use restfulie

That would be the first stage (IMHO) to getting a restfulie backed
implementation.

Reply to this email directly or view it on GitHub:
#49 (comment)