Ruby: April 2007 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.

3.5.2

  • 4 bug fixes:
    • Patch up Rails fixture defaults for Test::Rails::TestCase.
    • Session now properly hooked up to controllers.
    • ruby 1.8.6 has a bug on 'raise Interrupt' with no args. Fixed on both sides.
    • Fixed redgreen to work with new getc/putc-based output. (from Finn Smith)

Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly. By writing simple builder classes, you can teach how to cope with new languages (fortran, perl, whatever). The code is compiled and run on the fly when needed.

3.6.3 / 2007-04-27

  • 7 minor enhancements:

    • Added maprubyconst and mapcconst to C builder.
    • Converted example.rb to a real benchmark setup.
    • Improved error messages.
    • Added options hash for all C builder methods.
    • Options hash can take optional :method_name param to have ruby name diff from c.
    • Converted to a more traditional setup. Now I can heckle!
    • Cleaned up ruby.h search.
  • 2 bug fixes:

    • Added CCDLFLAGS. Should pick up -fPIC on misconfigured 64 bit machines.
    • Broke up all warnings so progress report was cleaner.

autotest plugins

| | Comments (1)

Damn good writeup on all but the newest autotest plugins:

PH7 - Getting started with Autotest - Continuous Testing

Thanks to Jean-Michel Garnier for pointing this out to me!

ImageScience is a clean and happy Ruby library that generates thumbnails -- and kicks the living crap out of RMagick. Oh, and it doesn't leak memory like a sieve. :) For more information including build steps, see http://seattlerb.rubyforge.org/

Changes:

1.1.2 / 2007-04-18

  • 2 bug fixes:
    • reports bad height/width values for resize
    • explicitly removes ICC color profiles from PNGs (bug in freeimage).

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.5.1 / 2007-04-17

  • 4 bug fixes:
    • Fixed gem name to be camel-case again. Fixed on rubyforge too.
    • Fixed rdoc for hooks.
    • Fixed redgreen, results changed to an array.
    • Patch up Rails fixture defaults, since they're not inheriting properly.

Probably the best write-up on autotest I've seen out there:

DRY up testing in Rails with Autotest: "Autotest runs your tests automatically whenever your files change. As Rails developers, we've been trained hard to test early and test often. We are also acutely aware of the DRY principle (Don't Repeat Yourself). However, these ideas don't quite agree in Rails because in our test-code-test cycle, we're constantly typing rake every time we need to run our tests.

Autotest will DRY up your testing by running your tests automatically whenever your files change."

(Via "Maintainable Software")

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.5.0 / 2007-04-12

  • 5 major enhancements:
    • Now requires RubyGems 0.9.1 or newer.
    • Autotest and unit_diff are both unbuffered. Results are more live.
    • Refactored and redesigned how files map to test from Sean Carley. See fixtures plugin as an example.
    • Generalize how autotest handler is instantiated and invoked, allowing for many more autotest types, including combos.
    • functional_test_matrix.rb added!
  • 23 minor enhancements:
    • Added all_good hook if initial run was all_good as well.
    • Added assert_in_epsilon to ZentestAssertions.
    • Added autotest plugin to auto-update source ala tinderbox/cruisecontrol.
    • Added autotest plugin to update ichat/adium IM status with code stats.
    • Added autotest plugin to update the GNU screen statusbar from Yuichi Tateno.
    • Added autotest syntax error handling from Ryan Platte.
    • Added autotest/emacs emacs integration plugin!!! YAY!
    • Added autotest/migrate.rb.
    • Added camping support from Geoffrey Grossenbach.
    • Added changed file reporting to autotest via -v flag.
    • Added informative summary and filtering via ENV['VERSIONS'] to multiruby.
    • Added libnotify support from Kazuo Saito.
    • Added lots of rdoc patches from Hugh Sasse.
    • Added rjs files to view_test_case.
    • Added rspec_autotest "stolen" from caldersphere.net
    • Added run_command hook to trigger the start of a test run.
    • Added tmp to rails' exceptions list.
    • Added unit_diff command variable to autotest for customizing flags and such.
    • Added zentest_mapping.rb and test.
    • Allow session to work in Test::Rails view tests.
    • Improved autotest/growl.rb output from imajes.
    • Improved autotest/timestamp output from Josh Susser.
    • Test::Rails works with Rails 1.2.
  • 2 bug fixes:
    • Accelerated Test::Rails unit tests via sensible defaults.
    • Better assertion messages for ZentestAssertions.

I just released toggle.el, version 1.2 and autotest.el 1.0 beta 2.

Get them via: http://www.emacswiki.org/cgi-bin/wiki/RyanDavis

toggle.el

toggle.el allows you to quickly open corresponding files via a dynamic mapping. In this release I added some bug fixes and a mapping for rspec.

There are now 4 different mapping styles in this version: zentest, rails, rspec, and ruby. Feel free to submit more and I'll incorporate them.

Example Mapping (rspec style):

app/models/blah.rb      <-> spec/models.blah_spec.rb
app/controllers/blah.rb <-> spec/controllers/blah_spec.rb
app/views/blah.rb       <-> spec/views/blah_spec.rb
app/helpers/blah.rb     <-> spec/helpers/blah_spec.rb

autotest.el

autotest.el is a godsend for me. It runs all my tests inside emacs itself, providing hyperlinks in backtraces and the ability to quickly switch between the autotest output and the last buffer I was working in. The combination of autotest.el and autotest speeds me up tremendously.

My Availability

| | Comments (0)

I'm not really good on the sales and marketing side, but a number of people have been bugging me to go public about my availability, so here it is. I'll be posting this in a more permanent location (linked on the sidebar) once I get it polished up and finalized:

I'm available for consulting on a part-time basis, 10-20 hours a week, at $100 per hour. I'm usually brought in for short-term gigs as a troubleshooter/problem-solver. Probably not worth mentioning, but this page should be proof that I'm better working on backend issues than UI. Email me at: ryand-ruby@zenspider.com.

What I do:

  • Bootstrap new projects.
  • Troubleshoot deep/confusing problems so the main developers can focus.
  • Identify and fix problems to accelerate the development process.
  • Design and implement solid, well-tested, efficient backend code at a rapid development pace.
  • Retrofit or shore up tests.
  • Refactor or reimplement brittle code.
  • Profile and fix bottlenecks.
  • Develop developer tools to improve the development process.
  • Mentor.

What I Prefer to do it with:

  • Ruby (yes, and rails)

What I also do:

  • Java
  • Python (but please no more twisted python!! blech!)

What I used to do and might be bribed into doing again:

  • Smalltalk
  • Perl
  • C/C++/ObjC

Past Clients (ones I can mention):

My Projects:

I also Contribute to:

About this Archive

This page is a archive of entries in the Ruby category from April 2007.

Ruby: March 2007 is the previous archive.

Ruby: May 2007 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