Deanswerify

Remove content between answer blocks from every file in a git repository. Solutions are specified by the following (case insensitive) delimiters:

var myDumbFunction = function() {
  var stayinAlive = "I won't go anywhere.";
  /* SOLUTION */
  var theAnswerToYourQuestion = function() {
    return "But I'll be removed :("
  };
  /* END SOLUTION */

  return /* solution */ You can even remove things inline /* end solution */;
};

Installation

Build it manually until I put it up on RubyGems. Sari gurl.

gem build deanswerify.gemspec && gem install deanswerify-0.0.1.gem

Usage

Enter a git repository and execute deanswerify. Watch in amazement as everything within solution delimiters disappears. You don't have to be at the base path, either--it'll work even if you're in a subdirectory.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request