Ruby: October 2006 Archives
Jester is a java test tool that finds code that is not covered by tests. It does this via bytecode mutation to modify code paths of the class under test. First it runs your tests and they should all pass (ass usual). Then it will modify conditionals for branching, change literals, and generally wreck havok, making one change at a time. By rerunning the tests per change, if they don't fail, then you've missed a test case. All in all this is pretty damn cool.
It turns out that getting a simple prototype up and running with 'if' node flipping takes about 100 lines of code. The meat of it is:
def process_defn(exp)
self.method = exp.shift
result = [:defn, method]
result << process(exp.shift) until exp.empty?
heckle(result) if should_heckle?
return result
end
def process_if(exp)
cond = process(exp.shift)
t = process(exp.shift)
f = process(exp.shift)
if should_heckle? then
[:if, cond, f, t]
else
[:if, cond, t, f]
end
end
I've named it heckle and released it on rubyforge and Kevin Clark went insane last night and poured through it, ruby2ruby, and ParseTree to dig deeper. I haven't seen him this morning yet so I don't know if he's succeeded extending it yet. We'll see. There will be a more official release soon.
hoe version 1.1.2 has been released!
http://rubyforge.org/projects/seattlerb/
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
- debug_gem - Show information about the gem.
- default - Run the default tasks
- docs - Build the docs HTML Files
- email - Generate email announcement file.
- install - Install the package. Uses PREFIX and RUBYLIB
- multi - Run the test suite using multiruby
- package - Build all the packages
- 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.
- uninstall - Uninstall the package.
See class rdoc for help. Hint: ri Hoe
Changes:
1.1.2
- Added -d and -t flags to sow to make dev or trunk subdirs for p4 and svn projects.
- Added install_gem to further test gem builds.
- Added test_globs to customize your test file list.
- Removed demo.rb from clean_globs. I'm torn on this one.
- Fixed bug in install rule.
InlineFortran version 1.0.0 has been released!
http://www.rubyforge.org/projects/rubyinline
FEATURES/PROBLEMS:
- Very rudimentary right now. Needs some love.
SYNOPSYS:
inline :Fortran do |builder|
builder.subroutine('print_integer', ["void", "int"], <<-END)
subroutine print_integer( integer )
integer, intent(in) :: integer
print *, 'integer: ', integer
end
END
end
Changes:
1.0.0 / 2006-10-21
- 1 major enhancement
- Birthday!
ZenTest version 3.4.1 has been released!
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.4.1 / 2006-10-13
- 3 minor enhancements:
- FUNDAMENTALLY changed the way failures map back to tests. This requires users of autotest to ensure that their tests and impls map 1:1 at every scoping level. I'll blog more details soon.
- Hoe'd rakefile
- Added support for render :collection to RenderTree.
- 7 bug fixes:
- Fixed autotest tests for custom ruby names.
- Fixed some documentation errors in ControllerTestCase.
- Fixed setup in FunctionalTestCase.
- Allowed @assignsignored to contain either Symbols or Strings, bug 5233.
- Using Object.path2class to look up classes in helper test cases, bug 5493.
- Added asserttextarea, bug 5452.
- Renamed assertselect to assertselecttag. Stupid rails. We were here first.
RubyInline version 3.6.2 has been released! This is a quick patch for weird versions of GCC and/or linux and makes ParseTree work again on (hopefully) everything under the sun.
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.
Changes:
3.6.2 / 2006-10-12
- 2 bug fixes
- comment stripper much more sane to fix problems on certain linux distros
- fixed a nit with older C compilers.
I just finished releasing:
- hoe 1.1.1
- RubyInline 3.6.1
- ParseTree 1.6.0
- and new to the (official) family: ruby2ruby 1.1.0!
The biggies are:
- ParseTree just got a major enema. 2k lines o' diff with an overall net loss of 800 loc. Awesome
- ParseTree's new testing infrastructure is solid as all hell.
- and it is circularly validated via ruby2ruby's tests.
- We flushed out a bunch of completely unknown bugs by this process. About 6 nodes were broken in one way or another.
Also of note:
- mingw32 patches for RubyInline
- lots and lots of nice little bug fixes and enhancements all over.
I've been trying to keep up with the furious pace I've had on releases recently but have been failing at it over the last week or so... I've been over-polishing. Like under-polishing, it can lead to dullness. In this specific case, I should have been making more and smaller releases instead of making sure That One Last Thing™ was covered.
That said, I've buffed everything back to a nice sparkle. Tomorrow (today really) I'll be releasing new versions of hoe, RubyInline, ParseTree, and a nice little surprise. Yes, four releases in one day to make up for the lull!
But now I'm going to bed... g'night!
hoe version 1.1.0 has been released!
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.
See class rdoc for help. Hint: ri Hoe
Changes:
= 1.1.0 2006-10-04
- Added sow, a command-line tool for quickly creating new projects.
- Added check_manifest task.
Two announcements:
Skip all this blah blah and them both with one simple command:
rubyforge 0.3.0
I'm proud to announce that codeforpeople's rubyforge 0.3.0 has been released! This release further refines rubyforge's abilities, adding news posting and finally adding multiple file releases!
We still have a lot of plans for this library. Next on the list is to be able interact with tracker, error checking, and a much more powerful and mostly automatic configuration system.
- 0.3.0 / 2006-10-03:
- Added more debugging output if $DEBUG
- Added news posting.
- Added multiple file release to addrelease (uses addfile for extras).
- addrelease now returns releaseid
- Fixed config scraper to include '-' in names.
hoe 1.0.5
Hoe has become a monster I'm falling for. Tiny, simple, nicely constrained, yet rather powerful.
- Doco cleanup.
- Removed Manifest.txt from rdoc and added title.
- Added changeset support.
- Added spec_extras for easy gemspec attribute setting.
- Added release_notes, changeset setting for releases.
- Added paragraphs_of utility method.
- Added email and rubyforge news announcement tasks.
- Url attribute may now be an array of urls.
