Hello,

lately, with the help of Torsten, I've been working on ruote-kit.

I'd like to change the way ruote-kit is configured. It currently wraps ruote's 
core configuration in a too inflexible way.

The original intent of Kenneth was to make it easy to do :

  RuoteKit.configure do |conf|
    conf.run_worker = true
    conf.register do
      participant "alpha", MyAlphaParticipant, :flavour => 'vanilla'
      catchall
    end
  end

(the register block courtesy of Torsten).

This would create a ruote-kit (RuoteKit.engine) bould to a default filesystem 
storage. You could use a HashStorage by doing

  RuoteKit.configure do |conf|
    conf.mode = :transient
  end

But then, we got a ruote-kit stuck with only two modes :file_system (the 
default) and :transient.

I added a Configuration#set_storage method to do things like

  conf.set_storage(
    Ruote::Couch::CouchStorage,
    uri.host, uri.port,
    'couch_prefix' => "roma_#{Rails.env}")

There is then two or three options to decide whether to run an engine (in fact 
they never run) and to run workers.

All is good, but IMO, ruote's configuration is sufficiently easy and convenient 
not to be hidden.

  RuoteKit.engine = Ruote::Engine.new(
    Ruote::Worker.new(
      Ruote::FsStorage.new('ruote_work')))
  RuoteKit.engine.register do
    participant "alpha", MyAlphaParticipant, :flavour => 'vanilla'
    catchall
  end

The convention here is that the engine is located in the RuoteKit.engine 
'singleton'.

The trick here is that I will port the register block configuration from 
ruote-kit to ruote.

(BTW, there is a new way of registering participants, inspired by Don French on 
IRC :

  
http://github.com/jmettraux/ruote/commit/b6976e508b6d7d0f7801669186a84bf77a706dda

)

I've been working on simplifying ruote-kit's configuration this week-end :

  http://github.com/jmettraux/ruote-kit/

But I really want to make it simpler. I also don't want to have to maintain a 
doc for configuring ruote-kit that cannot heavily borrow/reference ruote's 
configuration doc.


Comments ?

-- 
John Mettraux - http://jmettraux.wordpress.com

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to