Restolog-1.2 (beta1) - RESTful blog example

before several weeks i announced the first Restolog release (1.1,
there was my mistake so, the title was for version 1.2), but something
happened with my email - i found it in the ML archives, but it never
reached GMail (and maybe the mailing list).

To not repeat myself (DRY remember :wink: ) just some words again:

== What is restolog?

Restolog is very simple blog system based on REST/CRUD ideas. Sources
(all credits going to the authors, i just combined their work):

* RestBlog by Alisdair McDiarmid [ ]
* restful_authentication plugin by techno-weenie
  [ ]
* graseful delete degradation

The purpose is mostly proof of concept, not typo/mephisto etc. competition.

== Download

* tarballs:
  [ ] (restolog-1.2b1.tgz is the last one)
* SVN:
    svn checkout restolog

== Requirements

* Ruby 1.8.4+ (I'm using mongrel, do you?)
* Edge Rails (RESTful by default)
* SQLite 3 (easy to deploy/move)

== Install

   $ rails freeze_edge
   $ rake migrate
   $ server/start
   (create admin user)
   (create usual user - optional, but recommended)

== Example REST Usage

  # GET article(s), tag(s), user(s) info
  $ script/rester /articles
  $ script/rester -h -P 3002 /articles
  $ script/rester /articles/1

  # POST article/comment
  $ script/rester -X POST -u admin -p admin \
    -d 'article[title]=Test only;article[body]=Hello
world;article[tag_list]=test rest' \
  $ script/rester -X POST \
    -d 'comment[author]=Some User;comment[body]=Very Good' \

# DELETE article/comment
  $ script/rester -X DELETE -u admin -p admin /articles/2/comments/1
  $ script/rester -X DELETE -u admin -p admin /articles/2

You can use also:

  $ curl -i -H 'Accept: application/xml' http://…

More information:
* the initial announce for version 1.1:
  [ ]
* online README file copy:
  [ ]
* online USAGE file copy (with REST usage examples):
  [ ]

What's new in this version:

* Textile markup for articles body (act_as_textiled plugin)
* REST client ('script/rester') - pure Ruby, for systems without curl or wget
* New REST API calls added (mostly for articles and comments)
* Some documentation (README, USAGE, CHANGELOG)

Now the problems/questions (that's why the current version is still beta):
* for some reason update via REST (PUT method) do not work - returns
error code 406 Not Acceptable
* is it possible to make the authentication with sending keys like a
part of URL (maybe something with 'remember_me' field in restful
authentication) (something like for example Openomy API [ ] or maybe Amazon's S3 - initial login + some
session/application key in the URL)?

Nice! I checked out the source and it's a nice example of how to use
Rails methods to clean up code. I've noticed that some of my own code
has gotten crufty, and this gave me a few ideas.


Tom Lieber