The Atom Exerciser on Heroku 1

Posted by david

From some time I've been getting some visits in this blog from Tim's page and I didn't know why, until this morning when I needed to use his Ape instance and I came across it was down.

I needed to use it from outside my private network, I thought on deploy it on Google App Engine, so I took the oportunity to move the repository to a more cool home, get rid of the old mongrel code and use a Rackable framework to manage its server and move its realeases to gemcutter.

All in all, after almost an hour trying to deploy it in GAE I realized I couldn't use it because its restrictions policy, so in the 10 minutes between I wrote these two tweets, I downloaded heroku gem, wrote a rack config file and deploy Atom Exerciser on Heroku. Enjoy it.

The ape 1.5 released 0

Posted by david

Yesterday I released a new version of The atom protocol exerciser. We have been working in order to simplify its architecture and create a modular system that anyone may extend.

Now it works from the command line as well the web interface. We've added some rake tasks that you can use for exercise your server implementation and you can select the output format just invoking the correct option:


 $ rake ape:go:text['service document uri']
 $ rake ape:go:html['service document uri']
 $ rake ape:go:atom['service document uri']

It allows some configuration options through its config file $APE_HOME/aperc:


Ape.conf[:REQUESTED_ENTRY_COLLECTION] = 'collection name'
Ape.conf[:REQUESTED_MEDIA_COLLECTION] = 'collection name'

And finally, this last release allows to create and add new tests easily. The test cases must to extend the Ape Validator class and override the validate method.


module Ape
  class CustomValidator < Validator
    def validate(opts = {}) end
  end
end

We've implemented a little system for select the variables to use in your tests, just call the requires_presence_of method into the class declaration and pass the variable name that you require.


module Ape
  class CustomValidator < Validator
    requires_presence_of :entry_collection #OR
    requires_presence_of :entry_collection => 'comments' #OR
    requires_presence_of :media_collection => {:accept => 'image/png'}
    #...

Once your custom validator is ready you just need to move it to $APE_HOME/validators.

But if you really want to learn how to write your custom validator you just need to take a look at the source code.