public
Description: WaseEndpoint is a library for building daemons that act as WASE Endpoints for the EngineYard Wase competition: http://bit.ly/3qRMbv
Homepage:
Clone URL: git://github.com/dougal/wase_endpoint.git
dougal (author)
Thu Nov 05 09:10:43 -0800 2009
commit  56d4434f0a3fcdbb435b3d7a780491f2455cb2ae
tree    84b4324c1c43322abd1bb7da108c9b9e317f3672
parent  91b4d8634afb534dec0a02a5a5000b4e948fa8e7
name age message
file .gitignore Loading commit data...
file README.rdoc
file Rakefile Thu Nov 05 05:24:22 -0800 2009 Initial commit. [dougal]
file VERSION
directory example/
directory lib/
directory spec/
file wase_endpoint.gemspec
README.rdoc

WaseEndpoint

WaseEndpoint is a library for building daemons that act as WASE Endpoints for the EngineYard Wase competition: bit.ly/3qRMbv

Install

WaseEndpoint is hosted by gemcutter.com. Please make sure you have added them to your gem sources.

  $ sudo gem install wase_endpoint

Usage

The following are all in the example directory.

Your endpoint logic:

  # example/my_endpoint.rb

  require 'rubygems'
  require 'wase_endpoint'

  class MyEndpoint < WaseEndpoint

    # Just return our json as it came in.
    def secret_sauce(raw_json)
      raw_json
    end

  end

The init file:

  # example/init.rb

  require 'my_endpoint'

  MyEndpoint.new( :username => 'twitter_username',
                  :password => 'twitter_password',
                  :logfile => 'my_endpoint.log',
                  :sleep_period => 60 )

Now running the init file will start your daemon. The PID will be returned to allow you to monitor it or kill it later.

  ruby init.rb

That’s it! I also included a basic sinatra server in ‘server.rb’ that can be used as an input/output/program-listing node.

Problems, Comments, Suggestions?

Issues can be tracked on github: github.com/dougal/wase_endpoint/issues

All of the above are most welcome. dougal.s@gmail.com

Credits

Douglas F Shearer - douglasfshearer.com