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

Wilson is a pure ruby x86 assembler. No, really. Worst Idea Evar.

Why "wilson"? I wanted to name it "metal", but there is an existing project with that name... So I'm naming it after Wilson Bilkovich, who is about as metal as you can get (and it is easier to spell than "bilkovich", even tho that sounds more metal).

Changes:

1.0.1 / 2009-04-22

ParseTree EOL

| | Comments (4)

There seems to be some confusion and/or panic about ParseTree that I'd like to clear up:

ParseTree is dead on ruby 1.9 and there is no plan to make it work.

Because of changes to internals in 1.9, ParseTree simply can not work. I asked for hooks/options to allow us to get to the information but they never arrived.

Specifically if you're using ParseTree to access the AST of a live method/block/proc, you're SOL. If you're just using ParseTree to do static analysis, then you can switch to ruby_parser in about a minute of work and you're good to go.

Here is the plan for my projects:

  • RubyToC-1.0.0.5 = switching to ruby_parser
  • flog-2.1.0 = switching to ruby_parser
  • heckle-1.4.2 = dead, unless we can think of something soon.
  • ruby2ruby-1.2.2 = dropping block/proc support.
  • ruby_parser-2.0.2 = no clue why it has a dependency still, no worries here.
  • ZenHacks-1.0.1 = dropping block/proc support -- not that I support this.

I don't know the status of most of the projects dependent on PT or how they're going to deal with this issue. If you use one of these projects directly or indirectly and that project relies on PT for live method/block/proc, then you're probably going to be stuck on 1.8 for a while:

  • SuperCaller-1.0.0 = unsupported - can drop live method support
  • ambition-0.5.4
  • argible-0.1.1
  • integrity-0.1.9.3
  • merb-action-args-1.0.11
  • nitpick-1.0.2
  • protocol-0.8.1
  • red-4.1.7
  • reek-1.0.0 = probably doesn't need live analysis
  • roodi-1.3.5
  • ruby_diff-0.2
  • rubyjs-0.8.0
  • sake-1.0.15
  • thorero-action-args-0.9.4

There are probably other projects out there dependent on PT that I don't know about. All I've listed here are rubyforge gems that depend on PT in their gemspec.

You can check your gems using this:

gem list | egrep "(ambition|argible|integrity|merb-action-args|nitpick|protocol|red|reek|roodi|ruby_diff|rubyjs|sake|thorero-action-args)"

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 an archive of entries from April 2009 listed from newest to oldest.

March 2009 is the previous archive.

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