Piston 1.3.3: Now with specifications (at last !)
Well, I’m sorry. The whole Piston package was broken for the last two weeks. In fact, it was a problem with internal reorganizations and broken requires.
This also illustrated the fact that I needed some kind of automated testing… Which I advocate, but didn’t do anything about until now for Piston. Well, no more ! Piston now has a suite of specifications, coded using RSpec.
I briefly touched on this issue a week ago in Piston import bugs and behavioural specifications. Back then, I had three specifications. I now have twenty:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
$ spec --format specdoc specs update when no local changes - retrieves the latest fulltext from the remote repository - records remote revision that was merged update when a local change - should merge local changes with remote ones convert with no svn:externals - does not touch the working copy convert with one svn:externals - removes existing folder to replace with piston export - remembers the revision we converted from convert with hard-coded revision in svn:externals - retrieves the specified revision text - locks the pistoned directory to that revision convert with non HEAD externals - retrieves the same revision we had in our WC - remembers the revision that was present, not HEAD - does not lock the pistoned directory import with a valid repository URL - gets the fulltext of all files - remembers the root of the import - remembers the upstream repository's UUID - remembers the revision we imported from - remembers the revision this WC was at when we imported switching to a branch in the same repository (without local mods) - gets the fulltext of the branch - changes the root of the pistoned dir to the new import location - keeps the upstream repository's UUID unchanged - remembers the upstream revision we pistoned from Finished in 103.968133 seconds 20 specifications, 0 failures |
At the moment, the four most important commands are specified: convert, import, update and switch. And even then, only the golden path. Which means I am missing tons of specifications. But at least, I can now guarantee that Piston works, which is a huge step forward from the 1.3.2 relelase.
As I continue to further specify Piston, things can only get better.
Also, a very big thank you to all the people who told me they had problems with Piston. Bug reports, although never enjoyable, are an absolute necessity.
October 12th, 2007 at 10:25 PM
Francois,
Thanks for your diligence in working on Piston. I know I was one of the guilty people who mentioned a bug, but didn’t submit a patch.
I love piston, keep up the great work!
Josh
October 12th, 2007 at 10:25 PM
Here’s another case that’s not covered:
script/plugin install foo (no svn:externals etc)
foo gets svn’d into the project svn db exactly like the rest of the project structure
import foo? no, piston:commanderror – folder already exists
convert foo? no, no svn:externals definition
Would be nice to say ‘convert foo url’, or even ‘convert foo’ ‘url pls kthx’ ‘url’.
Thanks. :-)
- Sai
October 12th, 2007 at 10:25 PM
Sai, I think I understand what you want. You would like to be able to tell Piston that an exported Subversion directory should now be managed by Piston. Except, how would Piston know which revision you have, and if you made any changes or not ?
I’ll think about it, but I don’t think this is acceptable for the core Piston use cases.
François
October 12th, 2007 at 10:25 PM
Great work François! Great to see you added those tests :)
October 12th, 2007 at 10:25 PM
Thanks for all your work on this. I’ve come to depend on piston for all of my rails work.