This repository contains the code used in my "Fluent Refactoring" presentation at Lone Star Ruby Conf 2013. My slides are available via SlideShare. If you saw the talk, I'd appreciate feedback via email or SpeakerRate.
(A note on feedback: while of course I always enjoy hearing "great talk!", I especially want to know if there was any part of the talk that was unclear, confusing or vague—or if any of my jokes just weren't funny!)
Code is in lab/installations_controller.rb. There is a set of mock-driven characterization tests in lab/installations_controller_spec.rb. (These specs are relatively strict; for example, they will complain if you add a catch-all rescue clause to the request.xhr? branch!)
There are also some convenience scripts:
lab/spec
will run the specslab/autocommit
will run the specs, and if they pass, will automatically commit any changes to Git, using the arguments to the script as the commit message. For example:lab/autocommit do the thing
will create a commit whose message is "do the thing". (Quotes should work as normal if for some reason you want to include weird spacing in your commit message.)
This repository also contains a script I wrote to dump plain-text and syntax-highlighted RTFs of every commit on a particular branch. To use this, make sure you are on master and run go_meta [branch_name]
. (You'll probably also want to have Pygments installed to generate the RTFs.) This will create output in ./metadata/[branch_name] with one subdirectory per commit.
Happy hacking! -Sam