Last active
January 21, 2016 18:07
-
-
Save durrellchamorro/dfc97681a527f502e199 to your computer and use it in GitHub Desktop.
The Rakefile I wrote to use with Exercism
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
# Include this rakefile in the same directory as your Exercism exercise. | |
# Instead of submitting with $ exercism submit my_file.rb | |
# Enter $ rake s my_file.rb | |
# Now rubocop will automatically check your file before it submits to Exercism. | |
# If there are any problems, rubocop will tell you what they are like normal, and your exercise won't get submitted. | |
# If rubocop doesn't find any problems, then your exercise will be submitted. | |
require 'fileutils' | |
task :rubocop do | |
file = ARGV.last | |
sh %(rubocop "#{file}") | |
task file.to_sym do; end | |
end | |
task :exercism do | |
file = ARGV.last | |
sh %(exercism submit "#{file}") | |
task file.to_sym do; end | |
end | |
task s: [:rubocop, :exercism] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment