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.

The APE meets RubyGems 2

Posted by david

When I talked about the ape in the past Conferencia Rails 07 I remarked that it wasn't quite easy to install and configure. Today I can announce that this is no longer true.

We've transformed a lot of scripts in a ruby gem that provides a Mongrel based server. Once the ape gem is installed and this server is running, the web interface is available in the port 4000 of your localhost.


  $ sudo gem install ape && ape_server

Moreover, the new ape gem uses the erubis library to load the atom entry templates that it uses to test the atomPub server. These templates can be overrided by the user, the gem searchs the APE_HOME enviromment variable or the .ape directory into the user home directory. Within this directory the user can leave his atom entry templates with the names mini_entry.eruby, basic_entry.eruby or unclean_xhtml_entry.eruby.

We are excited with this release and we are working hard to eliminate possible bugs and add documentation in addition to new capabilities in order to test any atomPub server behaviour.

Enjoy it!

Update: I just put an instance of The Ape running on Heroku to use it online, you can see more details in the announcement.