Rack::Ext::Direct

Rack::Ext::Direct it’s an implementation of Ext.Direct specification draft (see links) and a client component that is able to talk Ext.Direct’s protocol for RPC communication.

The current implementation support JSON communication Form specifications it’s not implemented yet.

Installation


From remote repository

$sudo gem install vvlad-rack_ext_direct --source http://gems.github.com

From local version:

rake package && sudo rake install

Basic Usage


In a Rack environment:

require 'rack/ext/direct'
use Rack::Ext::Direct::Remoting,
      :service_root => "app/services",
      :remoting_path => /^\/services$/,
      :report_errors => (ENV["RACK_ENV"] == "development")

run app

In a Rails environment add in ‘config/environment.rb’ the following lines:

config.middleware.use Rack::Ext::Direct::Remoting,
  :service_root => "app/services",
  :remoting_path => /^\/services$/,
  :report_errors => (ENV["RAILS_ENV"] == "development")

Links


Ext.Direct specification draft:
     http://rubyforge.org/docman/view.php/7639/9465/Ext.Direct-pre-alpha.pdf