├── README.md └── learning ├── TCR.py └── tcr.sh /README.md: -------------------------------------------------------------------------------- 1 | # TCR 2 | Tools for TCR (test && commit || revert) 3 | -------------------------------------------------------------------------------- /learning/TCR.py: -------------------------------------------------------------------------------- 1 | import sublime 2 | import sublime_plugin 3 | import os 4 | 5 | # This is the Sublime Text 3 plugin to run tcr.sh on save. 6 | # 7 | # Put this file here: ~/Library/Application Support/Sublime Text 3/Packages/User 8 | 9 | class TcrOnSave(sublime_plugin.EventListener): 10 | def on_post_save_async(self, view): 11 | filename = view.file_name() 12 | view.window().run_command('exec', { 13 | 'cmd': ['./tcr.sh'], 14 | 'working_dir': '/Users/kelly.sutton/workspace/plain-david', 15 | }) 16 | -------------------------------------------------------------------------------- /learning/tcr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is a simple TCR setup for a Ruby-based project with 4 | # RSpec. 5 | 6 | (rspec && git commit -am "WIP") || git checkout . 7 | 8 | --------------------------------------------------------------------------------