I’ve been experimenting with Duby for faster computations in Opaz-PlugDK. I wanted to stay in the editor, triggering compilations with opt+s, and to be notified through Growl when something happens (in my case, compiling duby).
Here’s how to do it, using FSSM and Ruby-Growl.
# all cross-platforms gems in theory
require 'fssm'
require 'ruby-growl'
growl = Growl.new "localhost", "ruby-growl", ["Opaz-PlugDK"]
FSSM.monitor('plugins', '**/*.duby') do
update do |base, relative|
in_folder(base) do
growl.notify "Opaz-PlugDK", relative, "Compiling..."
unless system("dubyc -java #{relative}")
growl.notify "Opaz-PlugDK", relative, "Duby compile failed"
else
growl.notify "Opaz-PlugDK", relative, "OK!"
end
end
end
end
I really love Ruby for those things :)
To receive each article,
subscribe by RSS
or
by email.
The comments system is brand new - don't be afraid to comment!
All the posts are listed below and on the homepage.
- HackerBooks.com (books from StackOverflow and HackerNews) (March 4th, 2011)
- On JRuby, Resque and Windows (August 2nd, 2010)
- Notes from Sinatra, Heroku and MongoHQ deployment (June 29th, 2010)
- How to use Google Calendar and Rufus-Google for Basic Time Tracking (November 27th, 2009)
- Using JRuby to prototype VST plugins (November 17th, 2009)
- Introducing Learnivore.com (September 15th, 2009)
- How to create small, unique tokens in Ruby (July 2nd, 2009)
- Detecting Which Ruby Interpreter is Running (JRuby, IronRuby) (March 4th, 2009)
- How to create an empty Rails Edge application (January 28th, 2009)
- How to Freeze Gems with Rails >= 2.1 (December 23rd, 2008)
- Thoughts on IronRuby and .Net Testing (December 1st, 2008)
- How to Retrieve Delicious Tags and Number of Bookmarks for a Given Url (November 30th, 2008)
- Fixing Symbol not found _rl_filename_completion_function (November 6th, 2008)
- How to Generate a Gradient for your CSS using RMagick (October 21st, 2008)

