Seattle.rb: January 2008 Archives

ZenTest provides 4 different tools and 1 library: zentest, unit_diff, autotest, multiruby, and Test::Rails.

ZenTest scans your target and unit-test code and writes your missing code based on simple naming rules, enabling XP at a much quicker pace. ZenTest only works with Ruby and Test::Unit.

unit_diff is a command-line filter to diff expected results from actual results and allow you to quickly see exactly what is wrong.

autotest is a continous testing facility meant to be used during development. As soon as you save a file, autotest will run the corresponding dependent tests.

multiruby runs anything you want on multiple versions of ruby. Great for compatibility checking!

Test::Rails helps you build industrial-strength Rails code.

Changes:

3.9.1 / 2008-01-31

ZenTest provides 4 different tools and 1 library: zentest, unit_diff, autotest, multiruby, and Test::Rails.

ZenTest scans your target and unit-test code and writes your missing code based on simple naming rules, enabling XP at a much quicker pace. ZenTest only works with Ruby and Test::Unit.

unit_diff is a command-line filter to diff expected results from actual results and allow you to quickly see exactly what is wrong.

autotest is a continous testing facility meant to be used during development. As soon as you save a file, autotest will run the corresponding dependent tests.

multiruby runs anything you want on multiple versions of ruby. Great for compatibility checking!

Test::Rails helps you build industrial-strength Rails code.

Changes:

3.9.0 / 2008-01-30

  • 15 minor enhancements:

    • Added Wilson's patch to allow unit_diff to work with mspec. Adding rspec next.
    • Minor overhaul for autotest:
    • Added -f flag to start up without testing.
    • Added -q flag to autotest to make it extra quiet. Patch by Aaron Patterson.
    • Added ability to set test execution order, defaults to :random. EVIL!
    • Added completedre and failedresults_re to help subclasses like rspec.
    • Added deprecation warnings for hooks. Deprecated :run.
    • Added find_directories accessor, defaults to ['.']
    • Added sleep accessor, defaults to 1 second.
    • Changed findfiles to order files in the same order as finddirectories.
    • Changed how autodiscover works with $:, added lib to the front.
    • Cleaned out nearly every @ and use accessor methods instead. You should too.
    • Made test_mappings ordered.
    • Removed @files, adding @findorder and @knownfiles.
    • Renamed testsforfile to testfilesfor.
    • testfilesfor now only returns known files.
  • http://www.zenspider.com/ZSS/Products/ZenTest/

  • http://rubyforge.org/projects/zentest/
  • ryand-ruby@zenspider.com

As of this writing there are 197 authors creating 325 hoe'd projects, approximately 12.5% of all gems! Holy crap that is just awesome and I'm glad that people have benefitted from it.

I wrote 15 of them. I also apparently wrote 22 others, because those projects didn't specify their author or email values. Instead, it defaulted to mine. Why did it default to mine? Because I wrote hoe to make my Rakefiles as skinny as possible. I also did it because I thought it was funny that I wrote 37 (11%!) projects instead of 15 (only 3%)! I'm so prolific!

Well, it got boring and man do I hate boring.

So, in hoe 1.5, author and email are now mandatory values and will warn about needing to set them for the next 3 months. After that it'll start to throw a fit. The cool thing is that you can now use the developer(name, email) method to set both in a nice clean manner. Look at the previous blog post for an example.

If it makes you feel better, I have 13 more Rakefiles to fix. :)

With hoe 1.5, I finally got some changes in that I've wanted for a long long time... No more tweaking my Rakefile back and forth in order to adjust for changes in my history or readme files! Hoe now knows how to read the default structure of the files. As such, it automatically fills in description, summary, url, and changes for you (unless you override it). This takes my Rakefile from this:

require 'rubygems'
require 'hoe'
require './lib/zentest.rb'

Hoe.new("ZenTest", ZenTest::VERSION) do |p|
  p.author = ['Ryan Davis', 'Eric Hodel']

  changes = p.paragraphs_of("History.txt", 0..4).join("\n\n")
  urls, summary, *description = p.paragraphs_of("README.txt", 1, 3, 3..8)

  p.url = urls.gsub(/^\* /, '').split(/\n/)
  p.changes = changes
  p.summary = summary
  p.description = description.join("\n\n")
end

to this:

require 'rubygems'
require 'hoe'
require './lib/zentest.rb'

Hoe.new("ZenTest", ZenTest::VERSION) do |zentest|
  zentest.developer('Ryan Davis', 'ryand-ruby@zenspider.com')
  zentest.developer('Eric Hodel', 'drbrain@segment7.net')
end

Pretty, eh?

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 - Generate email announcement 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 only.
  • install - Install the package. Uses PREFIX and RUBYLIB
  • 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. Use FILTER to add to the command line.
  • test_deps - Show which test files fail when run alone.
  • uninstall - Uninstall the package.

See class rdoc for help. Hint: ri Hoe

Changes:

1.5.0 / 2008-01-30

  • 9 Minor Enhancements:

    • Added autopopulation of changes from History.txt.
    • Added autopopulation of urls from History.txt.
    • Added autopopulation of description from History.txt
    • Added autopopulation of summary from description.
    • Added description_sections to declare what sections of readme to use.
    • Added summary_sentences to declare how many sentences you want in summary.
    • Added developer(name, email) to cleanly populate both author/email arrays.
    • author and email now default to "doofus".
    • author and email warn that they'll blow up on 2008-04-01.
  • http://rubyforge.org/projects/seattlerb/

  • http://seattlerb.rubyforge.org/hoe/
  • ryand-ruby@zenspider.com

About this Archive

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

Seattle.rb: December 2007 is the previous archive.

Seattle.rb: February 2008 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.1