easy nanite integration with rails
Ruby
Pull request Compare This branch is 21 commits behind dcu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
generators
lib/nanite
.gitignore
README
init.rb

README

== Getting Started

- Install the plugin: script/plugin install git://github.com/dcu/nanite-rails.git

- script/generate nanite

- Configure RAILS_ROOT/config/nanite_mapper.yml and RAILS_ROOT/config/nanite_worker.yml
    $ cp config/nanite_mapper.sample.yml config/nanite_mapper.yml
    $ cp config/nanite_worker.sample.yml config/nanite_worker.yml

- Add "config.gem 'nanite'" to RAILS_ROOT/config/environment.rb

- run "rake nanite:rabbitmq" as root

- run "script/nanite start"

- on a rails console run: NaniteJob.request!(Hash, :constants){|r| puts r.inspect}

== Adding a custom agent

- script/generate agent spider action1 action2
- script/nanite -a spider start
- on a rails console run:
  $ Nanite.request("/spiders/ping", 2){|r| puts r.inspect}
  $ Nanite.request("/spiders/action1"){|r| puts r.inspect}