Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ANN] HookR version 1.0.0 released

Reply
Thread Tools

[ANN] HookR version 1.0.0 released

 
 
Avdi Grimm
Guest
Posts: n/a
 
      12-03-2008
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

 
Reply With Quote
 
 
 
 
James Gray
Guest
Posts: n/a
 
      12-03-2008
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

 
Reply With Quote
 
 
 
 
Gregory Brown
Guest
Posts: n/a
 
      12-03-2008
On Wed, Dec 3, 2008 at 12:59 PM, Avdi Grimm <(E-Mail Removed)> 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

 
Reply With Quote
 
Avdi Grimm
Guest
Posts: n/a
 
      12-03-2008
On Wed, Dec 3, 2008 at 3:01 PM, Gregory Brown <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
Why Petshop Changed all static methods to instance methods when upgrading from version 3.0 to version 3.1? Neo ASP .Net 1 01-07-2005 01:46 AM
Express Version Kills Current Version Lloyd Sheen ASP .Net 11 07-02-2004 02:45 PM



Advertisments