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/env bash | |
if [ -z $1 ]; then | |
docker_machine_count=`docker-machine ls -q | wc -l | sed 's/ //g'` | |
if [ $docker_machine_count == "1" ]; then | |
machine=`docker-machine ls -q` | |
elif [ $docker_machine_count == "0" ]; then | |
echo 'No docker machines were found with the following command:' | |
echo ' docker-machine ls -q' | |
exit | |
else |
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
# - Add it into 'spec/support/factory_doctor.rb` | |
# - require 'support/factory_doctor' into rails_helper.rb | |
# - Run it with FDOC=1 rspec | |
module FactoryGirl | |
module Doctor | |
module FloatDuration | |
refine Float do | |
def duration | |
t = self | |
format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000) |