brew-test-bot: move logic from Jenkins to Ruby.