This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"#{error.message}\n#{error.backtrace.join("\n")}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open an SSH tunnel to port 3306 (default MySQL port) on a remote machine. | |
# Specify the local port with an optional 2nd argument. | |
# The default is 3307, in case you have MySQL running locally on 3306. | |
# | |
# $ tunnel user@host | |
# -> opens tunnel to host on port 3306, using local port 3307 | |
# | |
# $ tunnel user@host 3333 | |
# -> opens tunnel to host on port 3306, using local port 3333 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_tag_info(commit) | |
info = `git describe --tags #{commit}`.chomp | |
if info[/(.*)-(\d+)-g([a-z0-9]{7})/] | |
matches = Regexp.last_match | |
last_tag = matches[1] | |
commits_since_tag = matches[2] | |
noun = (commits_since_tag.to_i == 1) ? 'commit' : 'commits' | |
"#{last_tag} + #{commits_since_tag} #{noun}" | |
else |
NewerOlder