[ANN] HookR version 1.0.0 released

Discussion in 'Ruby' started by Avdi Grimm, Dec 3, 2008.

  1. Avdi Grimm

    Avdi Grimm Guest

    HookR version 1.0.0
    by Avdi Grimm
    http://hookr.rubyforge.org

    == DESCRIPTION

    HookR is a publish/subscribe callback hook facility for Ruby.

    == CHANGES

    * 1 major enhancement
    * Birthday!

    == SYNOPSIS:

    require 'rubygems'
    require 'hookr'

    class ZeroWing
    include HookR::Hooks
    define_hook :we_get_signal, :message

    def start_game
    execute_hook:)we_get_signal, "How are you gentlemen?")
    end

    def bomb(event, message)
    puts "somebody set us up the bomb!"
    end

    we_get_signal do |event, message|
    puts "Main screen turn on!"
    puts "Cats: #{message}"
    end

    we_get_signal :bomb

    end

    zw = ZeroWing.new
    zw.we_get_signal do
    puts "Take off every zig!"
    end

    zw.start_game
    # >> Main screen turn on!
    # >> Cats: How are you gentlemen?
    # >> somebody set us up the bomb!
    # >> Take off every zig!


    --
    Avdi

    Home: http://avdi.org
    Developer Blog: http://avdi.org/devblog/
    Twitter: http://twitter.com/avdi
    Journal: http://avdi.livejournal.com
     
    Avdi Grimm, Dec 3, 2008
    #1
    1. Advertising

  2. Avdi Grimm

    James Gray Guest

    On Dec 3, 2008, at 11:59 AM, Avdi Grimm wrote:

    > == DESCRIPTION
    >
    > HookR is a publish/subscribe callback hook facility for Ruby.


    Great project name. The jokes on the site alone are worth it. :)

    Seriously, it's a great idea too. I wish we would see things like
    ActiveRecord's finder system move to something like this, instead of
    just encouraging all plugins to alias and rewrite. Nice work.

    James Edward Gray II
     
    James Gray, Dec 3, 2008
    #2
    1. Advertising

  3. On Wed, Dec 3, 2008 at 12:59 PM, Avdi Grimm <> wrote:
    > HookR version 1.0.0
    > by Avdi Grimm
    > http://hookr.rubyforge.org
    >
    > == DESCRIPTION
    >
    > HookR is a publish/subscribe callback hook facility for Ruby.


    Just had fun playing with this. However, it seems that HookR doesn't
    specify its gem dependencies which makes it a bit of a pain to install
    via RubyGems, and then requires its development dependencies to be
    installed (such as cucumber) for it to run.

    Thanks for this project, it's neat stuff!

    -greg

    --
    Technical Blaag at: http://blog.majesticseacreature.com
    Non-tech stuff at: http://metametta.blogspot.com
    "Ruby Best Practices" Book now in O'Reilly Roughcuts:
    http://rubybestpractices.com
     
    Gregory Brown, Dec 3, 2008
    #3
  4. Avdi Grimm

    Avdi Grimm Guest

    On Wed, Dec 3, 2008 at 3:01 PM, Gregory Brown <> wrote:
    > Just had fun playing with this. However, it seems that HookR doesn't
    > specify its gem dependencies which makes it a bit of a pain to install
    > via RubyGems, and then requires its development dependencies to be
    > installed (such as cucumber) for it to run.


    Oops. I'll fix this ASAP. Also, Cucumber shouldn't be needed at all
    - I think that might be part of the elaborate developer dependency
    network introduced by Newgem, which I used to create the FailFast gem.
    That's part of the reason I switched to using Mr. Bones when I made
    HookR into a Gem.

    --
    Avdi

    Home: http://avdi.org
    Developer Blog: http://avdi.org/devblog/
    Twitter: http://twitter.com/avdi
    Journal: http://avdi.livejournal.com
     
    Avdi Grimm, Dec 3, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jussi Jumppanen

    ANN: Zeus Version 3.95 Editor Released

    Jussi Jumppanen, Aug 8, 2005, in forum: VHDL
    Replies:
    0
    Views:
    441
    Jussi Jumppanen
    Aug 8, 2005
  2. Jaroslaw Kowalski

    ANN: NLog version 0.95 has been released!

    Jaroslaw Kowalski, Feb 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    437
    Jaroslaw Kowalski
    Feb 20, 2006
  3. V Green
    Replies:
    0
    Views:
    903
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,018
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    2,061
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page