[rspec-devel] [ rspec-Patches-10574 ] Pre_commit refactoring

noreply at rubyforge.org noreply at rubyforge.org
Fri May 4 11:27:29 EDT 2007

Patches item #10574, was opened at 2007-05-04 18:25
You can respond by visiting: 

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Antti Tarvainen (tarvaina)
Assigned to: Nobody (None)
Summary: Pre_commit refactoring

Initial Comment:
Here's a refactoring of the rails plugin part of the pre_commit code. Since it's a lot of code, you might want to try it out for a couple of days before you decide if it should be committed to the trunk.

The code is fully specced, but the specs don't run as part of the pre_commit procedure yet. To run them, run rake in new_pre_commit directory.

I tried to change the functionality as little as possible. However, a few things did change. Most notably:

* The output is a little different.
* The current Rails edge succeeds on the old pre_commit, but fails on the new one. The new pre_commit doesn't tolerate the config.breakpoint_server deprecation warning. The old pre_commit tries to guess from the script/generate output, which lines are errors and which are not. The new pre_commit uses script/generate --quiet and assumes any output is an error message.

Other things:

* The code still uses SVN export and revert, so pre_commit fails if you try to run it on svn-exported code rather than svn-checked-out.
* I have only run the code on Mac. If someone wants to test it on Windows, that would be great. You will probably need the win32-popen.gem to run it, though.

I probably won't have any time next week, but I plan to refactor the rest of the pre_commit code the week after. If someone else wants to do it before that, that's fine also.


You can respond by visiting: 

More information about the rspec-devel mailing list