Sha256: 9356b7b6b3b82122d85bdb70915b74fef4ccc50fd0ccdea371849a0a716ed50a
Contents?: true
Size: 1.95 KB
Versions: 2
Compression:
Stored size: 1.95 KB
Contents
# commit-msg-url-shortener Shortens the urls that may appear in your commit message (and more fun stuff) ## Install it $ gem install commit-msg-url-shortener ## Use it Move to a git-controlled folder and type the command commit-msg-url-shortener to show the help page. Available commands are: $ commit-msg-url-shortener use [service] $ commit-msg-url-shortener remove $ commit-msg-url-shortener status Example: $ commit-msg-url-shortener use tinyurl.com > Using "tinyurl.com". $ git commit -m "fixes a security flow, see http://railspikes.com/2008/9/22/is-your-rails-application-safe-from-mass-assignment" > [master d0adf01] fixes a security flow, see http://tinyurl.com/2g9mqh 1 files changed, 10 insertions(+), 9 deletions(-) ## Hack it Fork it, and add support for new url-shortener sites. You can also create your own service that pre-process commit messages! For example you can create a must-have service that automatically translate your commit message into leetspeak: 1. Create a new file called leetspeak.rb in the services folder 2. Fill the leetspeak.rb file with the following code: CommitMsgUrlShortener::Service.define do |commit_message| translation = {:a=>4,:b=>8,:e=>3,:i=>'!', :k=>:X,:l=>1,:o=>0,:s=>7,:t=>7,:z=>2} new_message = '' commit_message.each_char do |c| t = translation[c.downcase.to_sym] new_message += t ? t.to_s : c end new_message end 3. Rebuild/reinstall the gem: $ bundle exec rake install 4. Now you can use your brand new service! Move to your super-secret-git-versioned-project and type: $ commit-msg-url-shortener use leetspeak > Using "leetspeak". $ git commit -am "initial commit!" > [master d0adf00] !n!7!41 c0mm!7! 1 files changed, 4 insertions(+), 4 deletions(-)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
commit-msg-url-shortener-0.0.2 | README.md |
commit-msg-url-shortener-0.0.1 | README.md |