Seattle.rb: April 2009 Archives

spec yoda will

| | Comments (0)
class Bowling
  def hit(pins)
  end

  def score
    0
  end
end

require 'yoda'

Bowling.yoda {
  "score 0 for gutter game".it_will {
    bowling = Bowling.new
    20.times { bowling.hit(0) }

    bowling.score 0.it_is
    bowling.score 42.it_is_not!
  }
}

This is what happens when Aaron Patterson and I hack together. Be afraid. Be very afraid.

Spec yoda will, and spec you shall too.

Changes:

1.0.0 / 2009-04-22

rubygems now has plugins!

| | Comments (1)

Rubygems has plugins now! I've got an awesome one in the works for Apple's Dictionary.app coming soonish.

To see the gem plugins in action, try this:

% sudo gem update --system
% sudo gem install graph
% gem graph

Assuming you have graphviz's dot somewhere in your path, you'll wind up with a dot file and a png file of your rubygem state. Here's mine:

RubygemsAnalyzer_thumb.png (click to view full size)

You can read more about rubygems plugins by reading the doco for Gem and Gem::CommandManager.

Graph is a type of hash that outputs in graphviz's dot format. It comes with a command-line interface that is easily pluggable.

It ships with plugins to graph dependencies and status of installed rubygems, mac ports, and freebsd ports, coloring leaf nodes blue, outdated nodes red, and outdated leaf nodes purple (red+blue).

Changes:

1.1.0 / 2009-04-16

Hoe is a simple rake/rubygems helper for project Rakefiles. It generates all the usual tasks for projects including rdoc generation, testing, packaging, and deployment.

Tasks Provided:

  • announce - Create news email file and post to rubyforge.
  • audit - Run ZenTest against the package.
  • checkextradeps - Install missing dependencies.
  • check_manifest - Verify the manifest.
  • clean - Clean up all the extras.
  • config_hoe - Create a fresh ~/.hoerc file.
  • debug_gem - Show information about the gem.
  • default - Run the default task(s).
  • deps:email - Print a contact list for gems dependent on this gem
  • deps:fetch - Fetch all the dependent gems of this gem into tarballs
  • deps:list - List all the dependent gems of this gem
  • docs - Build the docs HTML Files
  • email - Generate email announcement file.
  • flay - Analyze for code duplication.
  • flog - Analyze code complexity.
  • gem - Build the gem file hoe-1.9.0.gem
  • generate_key - Generate a key for signing your gems.
  • install_gem - Install the package as a gem.
  • multi - Run the test suite using multiruby.
  • package - Build all the packages
  • post_blog - Post announcement to blog.
  • post_news - Post announcement to rubyforge.
  • publish_docs - Publish RDoc to RubyForge.
  • rcov - Analyze code coverage with tests
  • release - Package and upload the release to rubyforge.
  • ridocs - Generate ri locally for testing.
  • tasks - Generate a list of tasks for doco.
  • test - Run the test suite.
  • test_deps - Show which test files fail when run alone.

See class rdoc for help. Hint: ri Hoe

Changes:

1.12.2 / 2009-04-16

graph is awesome

| | Comments (0)

Things I was able to do in the last two weeks because of graph:

pkg_delete mpeg2codec* bigreq* xine* xf86bigfontproto* renderproto* libXext*
pkg_delete xextproto* libXt* libSM* e2fsprogs-libuuid* libICE* fixesproto*
pkg_delete inputproto* xcmiscproto*
pkg_delete xtrans* libxslt*
pkg_delete libX11* libxcb*
pkg_delete libcheck*
pkg_delete libXau* libXdmcp* libpthread-stubs* libtool*
pkg_delete kbproto* xcb-proto* xproto*
pkg_delete python25*

and on another server:

pkg_delete help2man-1.36.4_2 p5-gettext-1.05_2 automake-1.9.6_3
pkg_delete automake-wrapper-20071109 autoconf-2.62
pkg_delete autoconf-wrapper-20071109 libassuan-1.0.5 dirmngr-1.0.2_1
pkg_delete pth-2.0.7 libksba-1.0.5 libgcrypt-1.4.4 libgpg-error-1.7
pkg_delete curl-7.19.4 ca_root_nss-3.11.9_2 openldap-client-2.3.43
pkg_delete p5-File-Temp-0.21 p5-IO-stringy-2.110
pkg_delete gnupg-2.0.11 p5-Net-1.22_1,1
pkg_delete p5-Authen-SASL-2.12 p5-GSSAPI-0.26
pkg_delete mutt-1.4.2.3_3 mime-support-3.44.1 libslang2-2.1.4_1
pkg_delete png-1.2.35 urlview-0.9_2 ispell-3.3.02_4

This makes me happy.

About this Archive

This page is a archive of entries in the Seattle.rb category from April 2009.

Seattle.rb: March 2009 is the previous archive.

Seattle.rb: May 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en