Created
April 10, 2013 08:42
-
-
Save jacoyutorius/5352937 to your computer and use it in GitHub Desktop.
Coding-dojo Rakefile
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
namespace :dojo do | |
desc "When you greet 'osu!' , gate of the 'dojo' would open." | |
task :osu! do | |
dir = ENV["dojo_name"] | |
fail "please specify 'dojo_name'" unless dir | |
sh "mkdir #{dir}" | |
Dir::chdir(dir) do | |
sh "rspec --init" | |
sh "bundle init" | |
sh <<-EOS | |
echo gem "'rspec'" >> Gemfile | |
EOS | |
sh "bundle install --path .bundle" | |
sh "mkdir src" | |
end | |
puts "\r\nCongratulations.\r\nGates of the dojo was opened." | |
puts "'cd #{dir}' , and Strive to 'Shugyo'." | |
end | |
desc "Delete your dojo" | |
task :hamon do | |
dir = ENV["dojo_name"] | |
fail "please specify 'dojo_name'" unless dir | |
sh "rm -rf #{dir}" | |
puts "You was 'Hamon'" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment