Seattle.rb: June 2008 Archives

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.
  • 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 tasks.
  • docs - Build the docs HTML Files
  • email - Generate email announcement file.
  • gem - Build the gem file hoe-1.5.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.
  • release - Package and upload the release to rubyforge.
  • ridocs - Generate ri locally for testing.
  • 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.7.0 / 2008-06-30

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.
  • 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 tasks.
  • docs - Build the docs HTML Files
  • email - Generate email announcement file.
  • gem - Build the gem file hoe-1.5.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.
  • release - Package and upload the release to rubyforge.
  • ridocs - Generate ri locally for testing.
  • 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.6.0 / 2008-06-18

ruby2ruby provides a means of generating pure ruby code easily from ParseTree's Sexps. This makes making dynamic language processors much easier in ruby than ever before.

Changes:

1.1.9 / 2008-06-09

  • 5 minor enhancements:

    • Added more defensive programming in the tests to make it work with 1.9 and rubinius better.
    • Converted r2r_show to more plain parse style, no more discover_new_classes.
    • Made Proc#to_sexp and #to_ruby more resiliant.
    • Started to work on fallback to ruby_parser code. Should prolly do flog first.
    • Updated rakefile and readme format for hoe. Much cleaner!
  • 6 bug fixes:

    • Added 1.9 fixes.
    • Added code to tests to isolate rubyinline builds.
    • Fixed miniunit-deprecated assertions
    • Fixes for const2/3, esp in class names
    • Renamed ProcStoreTmp#name to #new_name. dur.
    • Skip proc tests in 1.9 since they require ParseTree.
  • http://seattlerb.rubyforge.org/

  • http://rubyforge.org/projects/seattlerb

I've been putting a LOT of effort into getting miniunit (still needs a better name... c'mon ppl!) flushed out and polished. This is the release I think is finally ready to replace test/unit in 1.9, but I need your feedback to know how it is. You can help by installing the gem and flipping it on:

% sudo gem install miniunit
% sudo use_miniunit yes

The second command will install symlinks into your sitelib directory. That comes before the stdlib dir in $LOAD_PATH so it'll take over for test/unit. You can roll it out by providing "no" as an argument instead. It should be totally easy and safe.

I've added a lot of really great stuff in this release. The biggies:

  • New useful assertions like assert_includes.
  • A refute mirrors every assert. eg refute_empty ary
  • I added mini/spec and mini/mock and they can work side-by-side with mini/test.

One of the things I did was put a lot of effort into making it work with abusive frameworks like rails (they do bad things to test frameworks). But we used the rails tests in very particular ways, so I don't know if there are other ways that don't work with miniunit.

One thing I'm proud of: Even with all the extra assertions, the spec framework, the mock framework, I still blow test/unit away. Check it:

miniunit

 lib  loc     641 total
 test loc     905 total
 totl loc    1546 total
 flog = 707.623602773533

test/unit

 lib  loc    3571 total
 test loc    2464 total
 totl loc    6035 total
 flog = 3103.27739878118

Rad eh?

So, install it and take it for a spin. Report bugs on rubyforge.

NOTE: Do not report bugs against it if you're trying to use it integrated into a GUI IDE/test-runner like komodo. It isn't meant to be compatible with GUI runners and the like. It is meant to be compatible with your tests.

Yay! Four Thousand!

| | Comments (0)

Wow! We just hit commit #4000 in the repo. 4001 was made releasing ParseTree. Thanks to everyone who's contributed directly and indirectly towards hitting that number. We hit #2000 in april 2005 and have come a long long way since then.

% p4 changes -m 1
Change 4001 on 2008/06/09 by ryand@ryand-wrath 'Branching ParseTree to version '
% cut -f 6 -d\  changes.txt | cut -f 1 -d@ | occur
 3242: ryand
  591: drbrain
   67: wilson
   47: aaronp
   19: kevinclark
   10: shaners
    6: chad
    3: topfunky
    2: yipstar
    1: pate
    1: ryan
    1: evan

mini/test is a completely minimial drop-in replacement for ruby's test/unit. This is meant to be clean and easy to use both as a regular test writer and for language implementors that need a minimal set of methods to bootstrap a working unit test suite.

mini/spec is a functionally complete spec engine.

mini/mock, by Steven Baker, is a beautifully tiny mock object framework.

Changes:

1.2.0 / 2008-06-09

  • 2 major enhancements:

    • Added Mini::Spec.
    • Added Mini::Mock. Thanks Steven Baker!!
  • 23 minor enhancements:

    • Added bin/use_miniunit to make it easy to test out miniunit.
    • Added -n filtering, thanks to Phil Hagelberg!
    • Added args argument to #run, takes ARGV from at_exit.
    • Added test name output if $DEBUG.
    • Added a refute (was deny) for every assert.
    • Added capture_io and a bunch of nice assertions from zentest.
    • Added deprecation mechanism for assert_no/not methods to test/unit/assertions.
    • Added pp output when available.
    • Added tests for all assertions. Pretty much maxed out coverage.
    • Added tests to verify consistency and good naming.
    • Aliased and deprecated all ugly assertions.
    • Cleaned out test/unit. Moved autorun there.
    • Code cleanup to make extensions easier. Thanks Chad!
    • Got spec args reversed in all but a couple assertions. Much more readable.
    • Improved error messages across the board. Adds your message to the default.
    • Moved into Mini namespace, renamed to Mini::Test and Mini::Spec.
    • Pulled the assertions into their own module...
    • Removed as much code as I could while still maintaining full functionality.
    • Moved filter_backtrace into MiniTest.
    • Removed MiniTest::Unit::run. Unnecessary.
    • Removed locationoffailure. Unnecessary.
    • Rewrote test/unit's filter_backtrace. Flog from 37.0 to 18.1
    • Removed assert_send. Google says it is never used.
    • Renamed MiniTest::Unit.autotest to #run.
    • Renamed deny to refute.
    • Rewrote some ugly/confusing default assertion messages.
    • assertindelta now defaults to 0.001 precision. Makes specs prettier.
  • 9 bug fixes:

    • Fixed assert_raises to raise outside of the inner-begin/rescue.
    • Fixed for ruby 1.9 and rubinius.
    • No longer exits 0 if exception in code PRE-test run causes early exit.
    • Removed implementors method list from mini/test.rb - too stale.
    • assertnothingraised takes a class as an arg. wtf? STUPID
    • ".EF" output is now unbuffered.
    • Bunch of changes to get working with rails... UGH.
    • Added stupid hacks to deal with rails not requiring their dependencies.
    • Now bitch loudly if someone defines one of my classes instead of requiring.
    • Fixed infect method to work better on 1.9.
    • Fixed all shadowed variable warnings in 1.9.
  • http://rubyforge.org/projects/bfts

About this Archive

This page is a archive of entries in the Seattle.rb category from June 2008.

Seattle.rb: May 2008 is the previous archive.

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

Pages

Powered by Movable Type 4.1