Updates from May, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • mcphersonz 8:39 am on May 13, 2009 Permalink | Reply  

    The RSpec Book by David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp, Dan North 

    I felt compelled to post this because this book is just great & I wanted to share it with anyone who is interested. If you are just getting into behavior driven development (BDD), RSpec or cucumber then I have a book to recommend to you! Having heard nothing but good things, I recently purchased “The RSpec Book” by David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp, Dan North from Pragmatic Programmers.

    It’s a easy read that is packed with great tips on how to approach BDD – as well as detailed info on rspec’s features, and tons of other very useful stuff.

    The book is in beta right now (not finished) but you can purchase & get the PDF right now. As updates are made you can re-download the PDF. Once the book is actually finished as paperback will be sent to me. I can’t wait!

    Worth mentioning is that I  am just a fan — not affiliated with anyone who makes money from this, nor do I make any money for posting this or my website in general. 🙂

    Advertisements
     
  • mcphersonz 3:01 am on August 27, 2008 Permalink | Reply  

    autotest+mumbles for Growl like notifications 

    I was working with a colleague today who was kind enough to introduce me to autotest for continuous test integration. Change a file in your app & tests are automatically run for you… Nice.

    my mumble alert

    screenshot of my mumble alert (top-right)

    One thing that really stood out aesthetically was how status messages were passed to Growl (in OSX) for eye-pleasing popup notifications outside of a terminal window.

    Being a ubuntu user, I started looking for a similar solution for linux. It turns out there is a great utility for linux that resembles Growl — it’s called Mumbles. The challenge was getting Mumbles to work with autotest.

    After searching google, I found one post that got me started. This is a good post, but I had to fill in a few blanks to get everything to work.

    Here’s what I did:

    1. Install ZenTest:
    • sudo gem install ZenTest
    1. Install Mumbles
      • grab the latest .deb file or source from the mumbles-project page:
      • wget https://sourceforge.net/project/showfiles.php?group_id=193587&package_id=227998
      • test out mumbles by running:
      • mumbles &
      • mumbles-send ‘a title’ ‘it works!!’
      • assuming mumbles has been installed correctly, you should see a little notification pop up. I recommend that at this point you add mumbles to your system session so it will start when you login to ubuntu.
      • gnome-session-properties
      • add -> “mumbles” for name & command -> ok
    2. Install ruby-dbus. I could not find a gem, so install manually:
      • irb
      • irb(main):001:0> require ‘dbus’
      • => true
    3. Create a .autotest file in your application root directory (or your home directory to make the settings global) Thanks to CaffinatedCode for this script — they wrote it:
    • require ‘dbus’def send_message(title, message, icon)
      begin
      bus = DBus::SessionBus.instance
      mumbles_service = bus.service(“org.mumblesproject.Mumbles”)
      mumbles = mumbles_service.object(“/org/mumblesproject/Mumbles”)
      mumbles.introspect
      mumbles_iface = mumbles[“org.mumblesproject.Mumbles”]
      sig = mumbles_iface.signals[“Notify”]
      bus.emit(mumbles_service, mumbles, mumbles_iface, sig, title, message, icon)
      rescue Exception => e
      end
      end

      Autotest.add_hook :ran_command do |at|
      begin
      output = at.results.last.slice(/(\d+) examples?, (\d+) failures?(, \d+ pending)?/)
      if output =~ /.*[1-9] failure.*/ then
      send_message(“FAIL”, “#{output}”, “fail.png”)
      else
      send_message(“PASS”, “#{output}”, “pass.png”)
      end
      rescue Exception => e
      end
      end

    Now for the fun part. From within your app root, type:

    autotest

    If everything works out, you should see a few things flash by – I get a error about “Insecure world writable dir” in my home dir. I just ignored that. After that, you should see a test summary in the terminal window, followed by a mumbles popup notificaton. Kick ass!

     
    • joban 10:27 am on December 31, 2008 Permalink | Reply

      cool topic .. really helpful !!

    • khellls 11:09 pm on January 9, 2009 Permalink | Reply

      where did u put the icons? cause for me i couldn’t c the icons

    • Shannon McPherson 12:17 am on January 11, 2009 Permalink | Reply

      I think I put the images in the same location as I put the script from step 3 — so either in your application root directory or your home directory. I can’t confirm though, because I traded in my t60 with ubuntu for a nice macbookpro — have not looked back since!

      (still running ubuntu on my home machine — but I never configured mumbles on that one)

    • angel 12:22 pm on May 4, 2011 Permalink | Reply

      hi…I get this error when I try send a mumble message…

      mumbles-send ‘a title’ ‘it works!!’
      mumbles-send ‘a title’ ‘it workssudo cp /etc/fonts/conf.avail/10-antialias.conf /etc/fonts/conf.d/’
      Traceback (most recent call last):
      File “/usr/local/bin/mumbles-send”, line 28, in
      from MumblesGlobals import *
      ImportError: No module named MumblesGlobals

      I’m using ubuntu…please if you know how solve it I would be very happy..:D…

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel