Last active
September 15, 2016 21:31
-
-
Save kcdragon/d66a319dc85935f4f91b1c6c503eef7d to your computer and use it in GitHub Desktop.
exercism.io Ruby downloader
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
# run with `sh download-exercism-io-ruby-problem.sh pangram` | |
exercism fetch ruby $1 | |
cp /Users/mdalton/Code/exercism/ruby/Guardfile /Users/mdalton/Code/exercism/ruby/$1/ | |
file=`EXERCISM_FILE_NAME=$1 ruby -e 'puts Dir["/Users/mdalton/Code/exercism/ruby/#{ENV["EXERCISM_FILE_NAME"]}/*_test.rb"].map { |f| File.basename(f) }[0].gsub("_test", "")'` | |
echo $file | |
touch /Users/mdalton/Code/exercism/ruby/$1/$file |
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
guard :minitest, test_folders: '.' do | |
# with Minitest::Unit | |
watch(%r{^(.+)_test\.rb}) { |m| "./#{m[1]}_test.rb" } | |
watch(%r{^(.+)\.rb}) { |m| "./#{m[1]}_test.rb" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment