Tidying up abbreviate_target_ids method and tests.
Review Request #1918 - Created March 15, 2015 and discarded
|benjyw, ity, stuhood|
Hey, Peter Seibel here from Twitter. Just starting to browse the pants code. I'm realize this is probably not super critical code but as long as I was trying to figure it out I figured I'd tidy it up a bit. I also realize this looks like a complete rewrite but I actually got here by a lot of little steps. As far as I know this preserves the exact behavior of the old code; anyway it passes the unit tests. Comments and feedback on any aspect of this change are welcome.
John commented on the Github PR I posted (not having noticed about how I was supposed to use RBCommons) and pointed out that this code may well be dead. Anyone use this in any local plugins? If not I'll be happy to delete this code but in the meantime I'd love to ship this just to get on the board as a Pants contributor. ;-)
Ran unit tests. Clean bill of health from Travis CI.
> this code may well be dead D'oh. Wish I'd noticed that before I looked at this. You probably have a similar wish :-)
Noting this generated the standard odd @twitter.com email chain that only spread to pants-reviews once Larry gave feedback since RBCommons sending on behalf of @twitter.com fails the DMARC check. It would be a good idea to associated a non-twitter.com email address with your RB account or else do like David Turner and Dominic Hamon did and get a @twopensource.com address. It would also be useful for reviewers if you linked the PR id in the bugs field.
Removing unneeded import.
Revision 2 (+36 -83)