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

noreply at rubyforge.org noreply at rubyforge.org
Thu May 10 09:35:41 EDT 2007


Patches item #10574, was opened at 2007-05-04 11:25
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=10574&group_id=797

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.


----------------------------------------------------------------------

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-05-10 09:35

Message:
What's the purpose of this refactoring?

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-05-04 11:37

Message:
Just a quick heads up before I look at this. I just removed the call to config.breakpoint_server, so that shouldn't be an issue any more.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=10574&group_id=797


More information about the rspec-devel mailing list