Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The ruby implementation of https://github.com/trondn/vacuum
Ruby
tree: f297440901

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Gemfile
Gemfile.lock
README.markdown
vacuum.rb

README.markdown

vacuum.rb

This is an example of use couchbase gem. The application is listening for (uses rev to listen efficiently) given directory and try to add all new files to the database. The files should be valid JSON document (otherwise script reports an error and deletes the file) and contain _id key which will be used as key.

Setup

Clone repository:

$ git clone git://github.com/avsej/vacuum.rb.git

Install dependencies, using bundler (see couchbase gem README file for installation details):

$ cd vacuum.rb
$ bundle install

Usage

To show available options run script with -? argument:

$ ./vacuum.rb -?
Usage: vacuum.rb [options]
    -v, --[no-]verbose               Run verbosely
    -h, --hostname HOSTNAME          Hostname to connect to (default: )
    -u, --user USERNAME              Username to log with (default: none)
    -p, --passwd PASSWORD            Password to log with (default: none)
    -b, --bucket NAME                Name of the bucket to connect to (default: default)
    -s, --spool-directory DIRECTORY  Location of spool directory (default: /var/spool/vacuum)
    -?, --help                       Show this message

To listen /tmp/couchbase-input and store it on dropbox bucket on cluster http://example.com:8091 use the following command:

$ ./vacuum.rb -s /tmp/couchbase-input -b dropbox -h example.com:8091
Something went wrong with that request. Please try again.