Skip to content

Instantly share code, notes, and snippets.

@mhayes
Created February 7, 2013 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhayes/4732639 to your computer and use it in GitHub Desktop.
Save mhayes/4732639 to your computer and use it in GitHub Desktop.
Passing arguments in a Rakefile
require 'rake'
task :environment do
puts "load env..."
end
desc "This is a test"
namespace :migrate do
task :cloudfiles, [:arg1] => :environment do |t,args|
puts args[:arg1]
end
end
# rake migrate:cloudfiles["mark"]
@mhayes
Copy link
Author

mhayes commented Feb 7, 2013

NOTE: Argument passing does NOT appear to work in zsh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment