Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.mdown

ruote-postgres

Postgres storage implementation for ruote >= 2.2.0

usage

This is how a ruote engine is setup with a ruote-postgres storage and a worker :

require 'rubygems'
require 'json'
require 'ruote'
require 'ruote-postgres' # gem install ruote-postgres

pg = PG.connect(dbname: "foobars", user: "foo", password: "bars")

engine = Ruote::Engine.new(
  Ruote::Worker.new(
    Ruote::Postgres::Storage.new(pg)))

To create the table in the database :

Ruote::Postgres.create_table(pg, true)

Tested with pg 0.14.1.

A single 'documents' table is used. To change this name :

opts = { 'table_name' => 'ruote_docs' }

engine = Ruote::Engine.new(
  Ruote::Worker.new(
    Ruote::Postgres::Storage.new(pg, opts)))

running tests

Configure the database connection in spec/config/database.yml

Install required gems using bundler

$ bundle install

Run the tests

$ bundle exec rspec spec/unit/*_spec.rb

license

MIT

links

http://github.com/ifad/ruote-postgres

developers

IFAD - ICT

Lleir Borras http://github.com/lleirborras

Amedeo Paglione http://github.com/amedeo

Emili Parreno http://github.com/eparreno

Peter Brindisi http://github.com/npj

Marcello Barnaba http://github.com/vjt

About

Ruote Storage driver for PostgreSQL

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.