This file contains 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
#!/usr/bin/ruby | |
def prompt(message) | |
STDOUT.write "#{message}: " | |
STDIN.gets.strip | |
end | |
def error_and_exit!(error) | |
$stderr.puts error | |
exit(1) |
This file contains 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
#!/usr/bin/ruby | |
# This script will take the ticket number from your current git branch and prepend it to your | |
# commit so you don't have to type it yourself. | |
# Run it either like this `./jira_commit Your commit message here` | |
# or just as `./jira_commit ` and enter your commit message when prompted | |
current = `git branch`.split("\n").detect{|l| l.start_with?("*")}.gsub("* ", "").strip | |
ticket = current.match(/(qweb-\d+)/)[1].upcase | |
message = |
This file contains 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
config.after(:suite) do | |
examples = RSpec.world.filtered_examples.values.flatten | |
if examples.none?(&:exception) | |
file = "spec/pass.wav" | |
else | |
file = "spec/fail.wav" | |
end | |
fork{exec "play -q -V0 #{file}"} | |