public
Description: Waves Layer - receives CIA pushes from GitHub
Clone URL: git://github.com/automatthew/spook.git
spook /
name age message
file LICENSE Wed Apr 16 09:59:12 -0700 2008 refactored into gem [automatthew]
file README Wed Apr 16 10:24:07 -0700 2008 read me has stuff [automatthew]
file Rakefile Wed Apr 16 09:59:12 -0700 2008 refactored into gem [automatthew]
directory lib/ Wed Apr 16 10:58:11 -0700 2008 hardcoded url of /spook/github-push [automatthew]
directory test/ Wed Apr 16 10:58:11 -0700 2008 hardcoded url of /spook/github-push [automatthew]
README
Spook is a Waves Layer.  At the time of this writing, Layers are a bleeding edge
feature, found only in the foundation branch of Dan Yoder's github repo: https://github.com/dyoder/waves/tree

Here's how you use Spook in a Waves application definition:

  # Do something clever to get Waves and Spook in your loadpath
  require 'waves'
  require 'spook'
  
  # Create a waves application
  module Thingy
  
    include Waves::Foundations::Simple
    include Waves::Layers::SimpleErrors
    include Waves::Layers::Spook
    
    # Define Thingy::Spook.callback
    Spook.module_eval do
      def self.callback(push)
        # do whatever you want with the push info
        File.open(push.repository["name"], "a") do |f|
          f.puts push.after
        end
        # return value becomes the http response body
        "ok"
      end
    end
    
  end
  Waves << Thingy

The way you run a Waves app with Layers is in flux as I write.  See the docs
for the foundation branch, or email me, or pester us at irc.freenode.net#waves